Public Member Functions | |
LHEWriter (const edm::ParameterSet ¶ms) | |
virtual | ~LHEWriter () |
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 | |
std::ofstream | file |
Definition at line 20 of file LHEWriter.cc.
LHEWriter::LHEWriter | ( | const edm::ParameterSet & | params | ) | [explicit] |
LHEWriter::~LHEWriter | ( | ) | [virtual] |
void LHEWriter::analyze | ( | const edm::Event & | event, | |
const edm::EventSetup & | es | |||
) | [protected, virtual] |
Implements edm::EDAnalyzer.
Definition at line 58 of file LHEWriter.cc.
References edmNew::copy(), and file.
00059 { 00060 edm::Handle<LHEEventProduct> product; 00061 event.getByLabel("source", product); 00062 00063 std::copy(product->begin(), product->end(), 00064 std::ostream_iterator<std::string>(file)); 00065 }
void LHEWriter::beginRun | ( | const edm::Run & | run, | |
const edm::EventSetup & | es | |||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 42 of file LHEWriter.cc.
References edmNew::copy(), file, edm::DataViewImpl::getByLabel(), and out.
00043 { 00044 edm::Handle<LHERunInfoProduct> product; 00045 run.getByLabel("source", product); 00046 00047 file.open("writer.lhe", std::fstream::out | std::fstream::trunc); 00048 std::copy(product->begin(), product->end(), 00049 std::ostream_iterator<std::string>(file)); 00050 }
void LHEWriter::endRun | ( | const edm::Run & | run, | |
const edm::EventSetup & | es | |||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 52 of file LHEWriter.cc.
References LHERunInfoProduct::endOfFile(), and file.
00053 { 00054 file << LHERunInfoProduct::endOfFile(); 00055 file.close(); 00056 }
std::ofstream LHEWriter::file [private] |