22 _description =
"Reads StdHep files as input and creates LCIO events with MCParticle collections."
23 " Make sure to not specify any LCIOInputFiles in the steering in order to read StdHep files." ;
51 while( ( col = rdr->readEvent() ) != 0 ) {
53 if ( numEvents > 0 && evtNum+1 > numEvents )
61 LCRunHeaderImpl* rHdr =
new LCRunHeaderImpl ;
63 rHdr->setDescription(
" Events read from stdhep input file: " +
_fileName ) ;
64 rHdr->setRunNumber( runNum ) ;
70 evt =
new LCEventImpl ;
71 evt->setRunNumber( runNum ) ;
72 evt->setEventNumber( evtNum++ ) ;
75 evt->addCollection( col,
"MCParticle" ) ;
void registerProcessorParameter(const std::string ¶meterName, const std::string ¶meterDescription, T ¶meter, const T &defaultVal, int setSize=0)
Register a steering variable for this processor - call in constructor of processor.
static ProcessorMgr * instance()
Return the instance of this manager.
Base class for data source handlers that can read arbitrary non-LCIO input files and create LCIO even...
virtual void end()
Called after data processing for clean up in the inverse order of the init() method so that resources...
virtual void processEvent(LCEvent *)
virtual StdHepReader * newProcessor()
Return a new instance of the processor.
void printParameters()
Print the parameters and their values depending on the given verbosity level.
bool isFirstEvent()
True if first event in processEvent(evt) - use this e.g.
virtual void processRunHeader(LCRunHeader *)
StdHepReader aStdHepReader
virtual void readDataSource(int numEvents)
Creates events with MCParticle collections from the StdHep input file and calls all active processors...
std::string _description
Describes what the processor does.
virtual void init()
Called at the begin of the job before anything is read.
Reads binary StdHep files.