Run.hh
// -*- C++ -*-
#ifndef RIVET_Run_HH
#define RIVET_Run_HH
#include "Rivet/AnalysisHandler.fhh"
#include "Rivet/RivetBoost.hh"
namespace HepMC {
class IO_GenEvent;
}
namespace Rivet {
class Run {
public:
Run(AnalysisHandler& ah);
~Run();
public:
Run& setCrossSection(const double xs);
double crossSection() const;
Run& setListAnalyses(const bool dolist);
bool init(const std::string& evtfile, double weight=1.0);
bool openFile(const std::string& evtfile, double weight=1.0);
bool readEvent();
bool processEvent();
bool finalize();
private:
AnalysisHandler& _ah;
double _fileweight;
double _xs;
bool _listAnalyses;
shared_ptr<GenEvent> _evt;
shared_ptr<std::istream> _istr;
shared_ptr<HepMC::IO_GenEvent> _io;
};
}
#endif
Rivet
Definition: MC_JetAnalysis.hh:9
Rivet::Run
Interface to handle a run of events read from a HepMC stream or file.
Definition: Run.hh:17
Rivet::Run::setListAnalyses
Run & setListAnalyses(const bool dolist)
Declare whether to list available analyses.
Definition: Run.cc:30
Rivet::Run::crossSection
double crossSection() const
Get the current cross-section from the analysis handler in pb.
Definition: Run.cc:25
Rivet::Run::Run
Run(AnalysisHandler &ah)
The standard constructor.
Definition: Run.cc:11
Rivet::Run::finalize
bool finalize()
Close up HepMC I/O.
Definition: Run.cc:132
Rivet::Run::readEvent
bool readEvent()
Read the next HepMC event.
Definition: Run.cc:37
Rivet::Run::init
bool init(const std::string &evtfile, double weight=1.0)
Set up HepMC file readers (using the appropriate file weight for the first file)
Definition: Run.cc:74
Rivet::Run::openFile
bool openFile(const std::string &evtfile, double weight=1.0)
Open a HepMC GenEvent file (using the appropriate file weight for the first file) ...
Definition: Run.cc:54
Rivet::Run::processEvent
bool processEvent()
Handle next event.
Definition: Run.cc:106
Rivet::AnalysisHandler
Definition: AnalysisHandler.hh:29
HepMC
Definition: Run.hh:8
Rivet::Run::setCrossSection
Run & setCrossSection(const double xs)
Get the cross-section for this run.
Definition: Run.cc:19
Rivet::Run::~Run
~Run()
The destructor.
Definition: Run.cc:16