hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Attributes | List of all members
StdhepMCParticleProcessor Class Reference

Processor used to translate StdHep MCParticles to ROOT MCParticle objects. more details. More...

#include <StdhepMCParticleProcessor.h>

Inheritance diagram for StdhepMCParticleProcessor:
Processor

Public Member Functions

 StdhepMCParticleProcessor (const std::string &name, Process &process)
 Class constructor.
 
 ~StdhepMCParticleProcessor ()
 
virtual bool process ()
 Process the event and put new data products into it.
 
virtual bool process (IEvent *event)
 Process the event and put new data products into it.
 
virtual void configure (const ParameterSet &parameters)
 Configure the Processor.
 
virtual void initialize (std::string inFilename, std::string outFilename)
 Callback for the Processor to take any necessary action when the processing of events starts.
 
virtual void initialize (TTree *tree)
 Callback for the Processor to take any necessary action when the processing of events starts.
 
virtual void finalize ()
 Callback for the Processor to take any necessary action when the processing of events finishes.
 
- Public Member Functions inherited from Processor
 Processor (const std::string &name, Process &process)
 Class constructor.
 
virtual ~Processor ()
 
virtual void setFile (TFile *outFile)
 Set output TFile for AnaProcessors.
 

Private Attributes

std::string inFilename_
 stdhep input file
 
std::string mcPartCollStdhep_ {"MCParticle"}
 name temporary lcio collection
 
int maxEvent_ {-1}
 max stdhep event number to convert
 
int skipEvent_ {0}
 skipped event numbers to convet
 
TFile * outF_ {nullptr}
 root tuple outfile
 
std::string mcPartCollRoot_ {"MCParticle"}
 name root collection
 
std::vector< MCParticle * > mc_particles_ {}
 list of converted MCParticles
 
TTree * tree_ {nullptr}
 TTree holds converted MCParticles for each event.
 

Additional Inherited Members

- Static Public Member Functions inherited from Processor
static void declare (const std::string &classname, ProcessorMaker *)
 Internal function which is part of the ProcessorFactory machinery.
 
- Protected Attributes inherited from Processor
Processprocess_
 
TFile * outF_ {nullptr}
 
std::string name_
 

Detailed Description

Processor used to translate StdHep MCParticles to ROOT MCParticle objects. more details.

Definition at line 47 of file StdhepMCParticleProcessor.h.

Constructor & Destructor Documentation

◆ StdhepMCParticleProcessor()

StdhepMCParticleProcessor ( const std::string &  name,
Process process 
)

Class constructor.

Parameters
nameName for this instance of the class.
processThe Process class associated with the Processor, provided by the processing framework.

Definition at line 10 of file StdhepMCParticleProcessor.cxx.

◆ ~StdhepMCParticleProcessor()

Destructor

Definition at line 14 of file StdhepMCParticleProcessor.cxx.

Member Function Documentation

◆ configure()

void configure ( const ParameterSet parameters)
virtual

Configure the Processor.

Parameters
parametersThe configuration parameters

Reimplemented from Processor.

Definition at line 17 of file StdhepMCParticleProcessor.cxx.

◆ finalize()

void finalize ( )
virtual

Callback for the Processor to take any necessary action when the processing of events finishes.

Implements Processor.

Definition at line 154 of file StdhepMCParticleProcessor.cxx.

◆ initialize() [1/2]

void initialize ( std::string  inFilename,
std::string  outFilename 
)
virtual

Callback for the Processor to take any necessary action when the processing of events starts.

Parameters
inFilename
outFilename

Reimplemented from Processor.

Definition at line 32 of file StdhepMCParticleProcessor.cxx.

◆ initialize() [2/2]

virtual void initialize ( TTree *  tree)
inlinevirtual

Callback for the Processor to take any necessary action when the processing of events starts.

Parameters
tree

Implements Processor.

Definition at line 93 of file StdhepMCParticleProcessor.h.

◆ process() [1/2]

bool process ( )
virtual

Process the event and put new data products into it.

Parameters
eventThe Event to process.

Reimplemented from Processor.

Definition at line 45 of file StdhepMCParticleProcessor.cxx.

◆ process() [2/2]

virtual bool process ( IEvent ievent)
inlinevirtual

Process the event and put new data products into it.

Parameters
eventThe Event to process.
Returns
status of the processing, false will move to next event and skip other processes.

Implements Processor.

Definition at line 69 of file StdhepMCParticleProcessor.h.

Member Data Documentation

◆ inFilename_

std::string inFilename_
private

stdhep input file

Definition at line 103 of file StdhepMCParticleProcessor.h.

◆ maxEvent_

int maxEvent_ {-1}
private

max stdhep event number to convert

Definition at line 105 of file StdhepMCParticleProcessor.h.

◆ mc_particles_

std::vector<MCParticle*> mc_particles_ {}
private

list of converted MCParticles

Definition at line 109 of file StdhepMCParticleProcessor.h.

◆ mcPartCollRoot_

std::string mcPartCollRoot_ {"MCParticle"}
private

name root collection

Definition at line 108 of file StdhepMCParticleProcessor.h.

◆ mcPartCollStdhep_

std::string mcPartCollStdhep_ {"MCParticle"}
private

name temporary lcio collection

Definition at line 104 of file StdhepMCParticleProcessor.h.

◆ outF_

TFile* outF_ {nullptr}
private

root tuple outfile

Definition at line 107 of file StdhepMCParticleProcessor.h.

◆ skipEvent_

int skipEvent_ {0}
private

skipped event numbers to convet

Definition at line 106 of file StdhepMCParticleProcessor.h.

◆ tree_

TTree* tree_ {nullptr}
private

TTree holds converted MCParticles for each event.

Definition at line 110 of file StdhepMCParticleProcessor.h.


The documentation for this class was generated from the following files: