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 | Static Public Member Functions | Protected Attributes | List of all members
Processor Class Referenceabstract

Base class for all event processing components. More...

#include <Processor.h>

Inheritance diagram for Processor:
Apv25RoXtalkAnaProcessor BhMassResSystematicsProcessor BhToysHistoProcessor ClusterOnTrackAnaProcessor ECalDataProcessor EventProcessor FinalStateParticleProcessor HPSEventProcessor HodoDataProcessor MCAnaProcessor MCEcalHitProcessor MCParticleProcessor MCTrackerHitProcessor NTupplizer NewVertexAnaProcessor RecoHitAnaProcessor RefittedTracksProcessor SimpZBiOptimizationProcessor StdhepMCParticleProcessor SvtBl2DAnaProcessor SvtBlFitHistoProcessor SvtDataProcessor SvtRawDataAnaProcessor SvtRawDataProcessor TrackEfficiencyProcessor TrackHitAnaProcessor Tracker2DHitProcessor Tracker3DHitProcessor TrackingAnaProcessor TrackingProcessor TridentAnaProcessor TridentWABAnaProcessor VertexAnaProcessor VertexProcessor VtxHistoProcessor

Public Member Functions

 Processor (const std::string &name, Process &process)
 Class constructor.
 
virtual ~Processor ()
 
virtual void configure (const ParameterSet &parameters)
 Callback for the Processor to configure itself from the given set of parameters.
 
virtual void initialize (TTree *tree)=0
 Callback for the Processor to take any necessary action when the processing of events starts, such as creating histograms.
 
virtual void initialize (std::string inFilename, std::string outFilename)
 Callback for the Processor to take any necessary action when the processing of events starts, such as initializing files.
 
virtual void setFile (TFile *outFile)
 Set output TFile for AnaProcessors.
 
virtual bool process ()
 Process the histograms and generate analysis output.
 
virtual bool process (IEvent *ievent)=0
 Process the event and put new data products into it.
 
virtual void finalize ()=0
 Callback for the Processor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
 

Static Public Member Functions

static void declare (const std::string &classname, ProcessorMaker *)
 Internal function which is part of the ProcessorFactory machinery.
 

Protected Attributes

Processprocess_
 
TFile * outF_ {nullptr}
 
std::string name_
 

Detailed Description

Base class for all event processing components.

Definition at line 34 of file Processor.h.

Constructor & Destructor Documentation

◆ Processor()

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

Class constructor.

Parameters
nameName for this instance of the class.
processThe Process class associated with Processor, provided by the framework.
Note
The name provided to this function should not be the class name, but rather a logical label for this instance of the class, as more than one copy of a given class can be loaded into a Process with different parameters. Names should not include whitespace or special characters.

Definition at line 10 of file Processor.cxx.

◆ ~Processor()

virtual ~Processor ( )
inlinevirtual

Class destructor.

Definition at line 54 of file Processor.h.

Member Function Documentation

◆ configure()

virtual void configure ( const ParameterSet parameters)
inlinevirtual

◆ declare()

void declare ( const std::string &  classname,
ProcessorMaker maker 
)
static

Internal function which is part of the ProcessorFactory machinery.

Parameters
classnameThe class name of the processor.
classtypeThe class type of the processor (1 for Producer, 2 for Analyzer).

Definition at line 14 of file Processor.cxx.

◆ finalize()

virtual void finalize ( )
pure virtual

◆ initialize() [1/2]

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

Callback for the Processor to take any necessary action when the processing of events starts, such as initializing files.

Parameters
inFilename
outFilename

Reimplemented in BhMassResSystematicsProcessor, BhToysHistoProcessor, SimpZBiOptimizationProcessor, StdhepMCParticleProcessor, SvtBlFitHistoProcessor, and VtxHistoProcessor.

Definition at line 81 of file Processor.h.

◆ initialize() [2/2]

virtual void initialize ( TTree *  tree)
pure virtual

◆ process() [1/2]

virtual bool process ( )
inlinevirtual

Process the histograms and generate analysis output.

Returns
status of the processing.

Reimplemented in BhMassResSystematicsProcessor, BhToysHistoProcessor, SimpZBiOptimizationProcessor, StdhepMCParticleProcessor, SvtBlFitHistoProcessor, and VtxHistoProcessor.

Definition at line 95 of file Processor.h.

◆ process() [2/2]

virtual bool process ( IEvent ievent)
pure virtual

◆ setFile()

virtual void setFile ( TFile *  outFile)
inlinevirtual

Set output TFile for AnaProcessors.

Parameters
pointerto output TFile

Definition at line 88 of file Processor.h.

Member Data Documentation

◆ name_

std::string name_
protected

The name of the Processor.

Definition at line 128 of file Processor.h.

◆ outF_

TFile* outF_ {nullptr}
protected

output file pointer

Definition at line 125 of file Processor.h.

◆ process_

Process& process_
protected

Handle to the Process.

Definition at line 122 of file Processor.h.


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