Public Member Functions | |
HepMCEventWriter (const edm::ParameterSet ¶ms) | |
virtual | ~HepMCEventWriter () |
Protected Member Functions | |
virtual void | analyze (const edm::Event &event, const edm::EventSetup &es) |
virtual void | beginRun (const edm::Run &run, const edm::EventSetup &es) |
virtual void | endRun (const edm::Run &run, const edm::EventSetup &es) |
Private Attributes | |
HepMC::IO_GenEvent * | _output |
Definition at line 20 of file HepMCEventWriter.cc.
HepMCEventWriter::HepMCEventWriter | ( | const edm::ParameterSet & | params | ) | [explicit] |
Definition at line 35 of file HepMCEventWriter.cc.
{ }
HepMCEventWriter::~HepMCEventWriter | ( | ) | [virtual] |
Definition at line 39 of file HepMCEventWriter.cc.
{ }
void HepMCEventWriter::analyze | ( | const edm::Event & | event, |
const edm::EventSetup & | es | ||
) | [protected, virtual] |
Implements edm::EDAnalyzer.
Definition at line 56 of file HepMCEventWriter.cc.
References _output.
{ edm::Handle<edm::HepMCProduct> product; event.getByType( product ); const HepMC::GenEvent* evt = product->GetEvent(); _output->write_event(evt); }
void HepMCEventWriter::beginRun | ( | const edm::Run & | run, |
const edm::EventSetup & | es | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 43 of file HepMCEventWriter.cc.
References _output, and dbtoconf::out.
{ _output = new HepMC::IO_GenEvent("GenEvent_ASCII.dat",std::ios::out); }
void HepMCEventWriter::endRun | ( | const edm::Run & | run, |
const edm::EventSetup & | es | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 51 of file HepMCEventWriter.cc.
References _output.
HepMC::IO_GenEvent* HepMCEventWriter::_output [private] |
Definition at line 31 of file HepMCEventWriter.cc.
Referenced by analyze(), beginRun(), and endRun().