CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HepMCEventWriter Class Reference
Inheritance diagram for HepMCEventWriter:
edm::EDAnalyzer

Public Member Functions

 HepMCEventWriter (const edm::ParameterSet &params)
 
virtual ~HepMCEventWriter ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

HepMC::IO_GenEvent * _output
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 20 of file HepMCEventWriter.cc.

Constructor & Destructor Documentation

HepMCEventWriter::HepMCEventWriter ( const edm::ParameterSet params)
explicit

Definition at line 35 of file HepMCEventWriter.cc.

36 {
37 }
HepMCEventWriter::~HepMCEventWriter ( )
virtual

Definition at line 39 of file HepMCEventWriter.cc.

40 {
41 }

Member Function Documentation

void HepMCEventWriter::analyze ( const edm::Event event,
const edm::EventSetup es 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 56 of file HepMCEventWriter.cc.

References _output.

57 {
58 
60  event.getByType( product );
61 
62  const HepMC::GenEvent* evt = product->GetEvent();
63 
64  _output->write_event(evt);
65 
66 }
HepMC::IO_GenEvent * _output
void HepMCEventWriter::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 43 of file HepMCEventWriter.cc.

References _output, and dbtoconf::out.

44 {
45 
46  _output = new HepMC::IO_GenEvent("GenEvent_ASCII.dat",std::ios::out);
47 
48 }
HepMC::IO_GenEvent * _output
tuple out
Definition: dbtoconf.py:99
void HepMCEventWriter::endRun ( const edm::Run run,
const edm::EventSetup es 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 51 of file HepMCEventWriter.cc.

References _output.

52 {
53  if (_output) delete _output;
54 }
HepMC::IO_GenEvent * _output

Member Data Documentation

HepMC::IO_GenEvent* HepMCEventWriter::_output
private

Definition at line 31 of file HepMCEventWriter.cc.

Referenced by analyze(), beginRun(), and endRun().