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
Process Class Reference

#include <Process.h>

Public Member Functions

 Process ()
 Class constructor.
 
void addToSequence (Processor *event_proc)
 Add an event processor to the linear sequence of processors to run in this job.
 
void addFileToProcess (const std::string &filename)
 Add an input file name to the list.
 
void addOutputFileName (const std::string &output_filename)
 Add an output file name to the list.
 
void setRunMode (int run_mode=-1)
 Set the run mode of the process.
 
void setSkipEvents (int skip_events=-1)
 
void setEventLimit (int event_limit=-1)
 Set the maximum number of events to process.
 
int getRunMode ()
 Get the run mode of the process.
 
int getSkipEvents ()
 
void run ()
 
void runOnRoot ()
 
void runOnHisto ()
 
void requestFinish ()
 

Private Attributes

int run_mode_ {-1}
 
int skip_events_ {-1}
 
int event_limit_ {-1}
 
std::vector< Processor * > sequence_
 
std::vector< std::string > input_files_
 
std::vector< std::string > output_files_
 

Detailed Description

Definition at line 29 of file Process.h.

Constructor & Destructor Documentation

◆ Process()

Process ( )

Class constructor.

Definition at line 14 of file Process.cxx.

Member Function Documentation

◆ addFileToProcess()

void addFileToProcess ( const std::string &  filename)

Add an input file name to the list.

Parameters
filenameInput ROOT event file name

Definition at line 175 of file Process.cxx.

◆ addOutputFileName()

void addOutputFileName ( const std::string &  output_filename)

Add an output file name to the list.

There should either be the same number of output file names as input file names or just one output file name.

Parameters
output_filenameOutput ROOT event file name

Definition at line 179 of file Process.cxx.

◆ addToSequence()

void addToSequence ( Processor event_proc)

Add an event processor to the linear sequence of processors to run in this job.

Parameters
event_procProcessor to add to the sequence

Definition at line 183 of file Process.cxx.

◆ getRunMode()

int getRunMode ( )
inline

Get the run mode of the process.

Returns
int

Definition at line 103 of file Process.h.

◆ getSkipEvents()

int getSkipEvents ( )
inline

Get the number of events to skip.

Definition at line 110 of file Process.h.

◆ requestFinish()

void requestFinish ( )
inline

Request that the processing finish with this event.

Definition at line 124 of file Process.h.

◆ run()

void run ( )

Run the LCIO to ROOT process.

Definition at line 92 of file Process.cxx.

◆ runOnHisto()

void runOnHisto ( )

Run the Histo Analysis process.

Definition at line 18 of file Process.cxx.

◆ runOnRoot()

void runOnRoot ( )

Run the ROOT to Histo process.

Definition at line 38 of file Process.cxx.

◆ setEventLimit()

void setEventLimit ( int  event_limit = -1)
inline

Set the maximum number of events to process.

Set the maximum number of events to process. Processing will stop when either there are no more input events or when this number of events have been processed.

Parameters
event_limitMaximum number of events to process. -1 indicates no limit.

Processing will stop when either there are no more input events or when this number of events have been processed.

Parameters
event_limitMaximum number of events to process. -1 indicates no limit.

Definition at line 94 of file Process.h.

◆ setRunMode()

void setRunMode ( int  run_mode = -1)
inline

Set the run mode of the process.

Parameters
run_modeMaximum number of events to process.
0 indicates LCIO to ROOT. 1 indicates ROOT to Histo. 2 indicates Histo Analysis.

Definition at line 69 of file Process.h.

◆ setSkipEvents()

void setSkipEvents ( int  skip_events = -1)
inline

Set the number of events to skip. Processing will stop when either there are no more input events or when this number of events have been processed.

Parameters
skip_eventsNumber of events to skip.

Definition at line 78 of file Process.h.

Member Data Documentation

◆ event_limit_

int event_limit_ {-1}
private

Limit on events to process.

Definition at line 138 of file Process.h.

◆ input_files_

std::vector<std::string> input_files_
private

List of input files to process. May be empty if this Process will generate new events.

Definition at line 144 of file Process.h.

◆ output_files_

std::vector<std::string> output_files_
private

List of output file names. If empty, no output file will be created.

Definition at line 147 of file Process.h.

◆ run_mode_

int run_mode_ {-1}
private

Run mode of the process.

Definition at line 132 of file Process.h.

◆ sequence_

std::vector<Processor*> sequence_
private

Ordered list of Processors to execute.

Definition at line 141 of file Process.h.

◆ skip_events_

int skip_events_ {-1}
private

Number of events to skip.

Definition at line 135 of file Process.h.


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