#include <InputModule.h>
Inheritance diagram for psana::InputModule:
Public Types | |
BeginRun | |
beginRun() should be called for all modules | |
BeginCalibCycle | |
beginCalibCycle() should be called for all modules | |
DoEvent | |
event() should be called for all modules | |
EndCalibCycle | |
endCalibCycle() should be called for all modules | |
EndRun | |
endRun() should be called for all modules | |
Skip | |
skip all remaining modules for this event | |
Stop | |
gracefully finish with the event loop | |
Abort | |
abort immediately, no finalization | |
enum | Status { BeginRun, BeginCalibCycle, DoEvent, EndCalibCycle, EndRun, Skip, Stop, Abort } |
Event processing status. More... | |
Public Member Functions | |
virtual | ~InputModule () |
virtual void | beginJob (Event &evt, Env &env)=0 |
Method which is called once at the beginning of the job. | |
virtual Status | event (Event &evt, Env &env)=0 |
Method which is called for the next event in the event loop. | |
virtual Index & | index () |
virtual void | endJob (Event &evt, Env &env)=0 |
Method which is called once at the end of the job. | |
virtual bool | liveAvail (int numEvents) |
Protected Member Functions | |
InputModule (const std::string &name) | |
Constructor may be called from subclass only. |
Psana input module is responsible for reading input files or other event sources and decide what framework should do with the next read event. In a sense input module drives the framework event loop based on the input event data.
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 82 of file InputModule.h.
Event processing status.
The value returned from event() signals to framework what it should do next.
BeginRun | beginRun() should be called for all modules |
BeginCalibCycle | beginCalibCycle() should be called for all modules |
DoEvent | event() should be called for all modules |
EndCalibCycle | endCalibCycle() should be called for all modules |
EndRun | endRun() should be called for all modules |
Skip | skip all remaining modules for this event |
Stop | gracefully finish with the event loop |
Abort | abort immediately, no finalization |
Definition at line 90 of file InputModule.h.
psana::InputModule::~InputModule | ( | ) | [virtual] |
Definition at line 48 of file InputModule.cpp.
psana::InputModule::InputModule | ( | const std::string & | name | ) | [protected] |
Method which is called once at the beginning of the job.
Input module is supposed to populate environment with the configuration objects and EPICS data from Configure transition.
[out] | evt | Event object |
[out] | env | Environment object |
Method which is called once at the end of the job.
Input module can stop reading data and close/reset its sources. It does not need to update environment but can use some data from it.
[out] | evt | Event object |
[out] | env | Environment object |
Method which is called for the next event in the event loop.
Input module should try to read next event from input source and fill event object and environment object if possible. Depending on what has been read it also signals framework what to do next by returning one of the Status enum values.
[out] | evt | Event object |
[out] | env | Environment object |
Index & psana::InputModule::index | ( | ) | [virtual] |
Definition at line 52 of file InputModule.cpp.
virtual bool psana::InputModule::liveAvail | ( | int | numEvents | ) | [inline, virtual] |
Definition at line 146 of file InputModule.h.