Page MenuHomeHEPForge

No OneTemporary

diff --git a/include/HEJ/LesHouchesReader.hh b/include/HEJ/LesHouchesReader.hh
index fd8175a..4892ba6 100644
--- a/include/HEJ/LesHouchesReader.hh
+++ b/include/HEJ/LesHouchesReader.hh
@@ -1,78 +1,78 @@
/** \file
* \brief Header file for reading events in the Les Houches Event File format.
*
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019
* \copyright GPLv2 or later
*/
#pragma once
#include <string>
#include "LHEF/LHEF.h"
#include "HEJ/Event.hh"
#include "HEJ/EventReader.hh"
#include "HEJ/stream.hh"
namespace HEJ{
//! Class for reading events from a file in the Les Houches Event File format
class LesHouchesReader : public EventReader{
public:
//! Contruct object reading from the given file
explicit LesHouchesReader(std::string const & filename):
stream_{filename},
reader_{stream_}
{}
//! Read an event
bool read_event() override {
return reader_.readEvent();
}
//! Access header text
std::string const & header() const override {
return reader_.headerBlock;
}
//! Access run information
LHEF::HEPRUP const & heprup() const override {
return reader_.heprup;
}
//! Access last read event
LHEF::HEPEUP const & hepeup() const override {
return reader_.hepeup;
}
private:
HEJ::istream stream_;
protected:
LHEF::Reader reader_;
};
/**
* @brief Les Houches Event file reader for LHE files created by Sherpa
* @details In Sherpa the cross section is given by
* sum(weights)/(number of trials). This EventReader converts the
* weights such that cross section=sum(weights)
* @note Reading from a pipe is not possible!
*/
class SherpaLHEReader : public LesHouchesReader{
public:
explicit SherpaLHEReader(std::string const & filename);
bool read_event() override;
- virtual HEJ::optional<size_t> number_events() const override {
+ HEJ::optional<size_t> number_events() const override {
return num_events;
}
private:
double num_trials;
size_t num_events;
};
} // namespace HEJ

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 6:27 PM (7 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023801
Default Alt Text
(2 KB)

Event Timeline