psana::InputModule Class Reference
[psana package]

Base class for psana input modules. More...

#include <InputModule.h>

Inheritance diagram for psana::InputModule:

psana::Configurable List of all members.

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 Indexindex ()
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.

Detailed Description

Base class for psana input modules.

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.

See also:
Module
Version:
$Id: InputModule.h 10732 2015-09-23 22:07:46Z davidsch@SLAC.STANFORD.EDU $
Author:
Andrei Salnikov

Definition at line 82 of file InputModule.h.


Member Enumeration Documentation

enum psana::InputModule::Status

Event processing status.

The value returned from event() signals to framework what it should do next.

Enumerator:
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.


Constructor & Destructor Documentation

psana::InputModule::~InputModule (  )  [virtual]

Definition at line 48 of file InputModule.cpp.

psana::InputModule::InputModule ( const std::string &  name  )  [protected]

Constructor may be called from subclass only.

Definition at line 40 of file InputModule.cpp.


Member Function Documentation

virtual void psana::InputModule::beginJob ( Event evt,
Env env 
) [pure virtual]

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.

Parameters:
[out] evt Event object
[out] env Environment object

virtual void psana::InputModule::endJob ( Event evt,
Env env 
) [pure virtual]

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.

Parameters:
[out] evt Event object
[out] env Environment object

virtual Status psana::InputModule::event ( Event evt,
Env env 
) [pure virtual]

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.

Parameters:
[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.


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7