|
| | Processor (const config::Parameters &ps) |
| | Configure the processor upon construction. More...
|
| |
|
virtual | ~Processor ()=default |
| | virtual default destructor so derived classes can be destructed
|
| |
| virtual void | beforeNewRun (RunHeader &header) |
| | Handle allowing processors to modify run headers before the run begins. More...
|
| |
| virtual void | onNewRun (const RunHeader &runHeader) |
| | Callback for the Processor to take any necessary action when the run being processed changes. More...
|
| |
| virtual void | onFileOpen (const std::string &file_name) |
| | Callback for the Processor to take any necessary action when a new input event file is opened. More...
|
| |
| virtual void | onFileClose (const std::string &file_name) |
| | Callback for the Processor to take any necessary action when a event input file is closed. More...
|
| |
|
virtual void | onProcessStart () |
| | Callback for the Processor to take any necessary action when the processing of events starts.
|
| |
|
virtual void | onProcessEnd () |
| | Callback for the Processor to take any necessary action when the processing of events finishes, such as calculating job-summary quantities.
|
| |
|
const std::string & | getName () const |
| | Get the processor name.
|
| |
| virtual void | process (Event &event)=0 |
| | have the derived processors do what they need to do More...
|
| |
| virtual void | attach (Process *p) final |
| | Attach the current process to this processor. More...
|
| |
| template<class T > |
| const T & | getCondition (const std::string &condition_name) |
| | Access a conditions object for the current event. More...
|
| |
Base class for all event processing components.
This is the main interface that users of fire will interact with. In order to perform a new task, a user would define a new Processor which can take data from the event bus, process it in some way, and then add new data onto the event bus. This format is applicable all along the data processing chain from generation (simulation or raw decoding) to reconstruction to analysis.
Callback Ordering
The ordering of the callback functions is decided by the Process::run and is helpful to document here for users creating new Processors.
- Constructor - before any processing begins, all of the processors are constructed and passed their configuration parameters.
- onProcessStart - before any processing begins but after the conditions providers are told the process is starting
- onFileOpen - only if there are input files, this is called before any events in the input file are processed
- beforeNewRun - called before conditions providers are given the run header when a new run is encountered (i.e. before processing begins when there are not input files or when the event header has a new run number when there are run numbers)
- onNewRun - called after conditions providers are given the run header
- process - called on each event
- onFileClose - only if there are input files, this is called after all events in the input file are processed
- onProcessEnd - all processing is done and the Processors are about to be destructed.
- Destructor - the processors are destructed automatically in the destruction of the core Process object