PSXtcInput::XtcInputModuleBase Class Reference
[PSXtcInput package]

Psana input module for reading XTC files. More...

#include <XtcInputModuleBase.h>

Inheritance diagram for PSXtcInput::XtcInputModuleBase:

PSShmemInput::ShmemInputModule PSXtcInput::XtcIndexInputModule PSXtcInput::XtcInputModule List of all members.

Public Member Functions

 XtcInputModuleBase (const std::string &name, const boost::shared_ptr< IDatagramSource > &dgsource, bool noSkip=false)
 Constructor takes the name of the module and instance of datagram source.
virtual ~XtcInputModuleBase ()
virtual void beginJob (Event &evt, Env &env)
 Method which is called once at the beginning of the job.
virtual Status event (Event &evt, Env &env)
 Method which is called with event data.
virtual void endJob (Event &evt, Env &env)
 Method which is called once at the end of the job.
virtual bool liveAvail (int numEvents)
 Returns True if live mode and the available events > numEvents arg.

Protected Member Functions

void fillEvent (const std::vector< XtcInput::Dgram > &dgList, Event &evt, Env &env)
 Fill event from list of datagrams.
void fillEvent (const XtcInput::Dgram &dg, Event &evt, Env &env)
 Fill event with datagram contents.
void fillEventId (const XtcInput::Dgram &dg, Event &evt)
 Fill event with EventId information.
void fillEventDgList (const std::vector< XtcInput::Dgram > &dgList, Event &evt)
 Fill event with Datagram list.
void fillEnv (const std::vector< XtcInput::Dgram > &dgList, Env &env)
 Fill env from list of datagrams.
void fillEnv (const XtcInput::Dgram &dg, Env &env)
 Fill environment with datagram contents.
void skipEvents (unsigned long nskip)
void maxEvents (unsigned long nmax)
void skipEpics (bool skip)
void l3tAcceptOnly (bool l3tAccept)
unsigned long skipEvents () const
unsigned long maxEvents () const
bool skipEpics () const
bool l3tAcceptOnly () const

Protected Attributes

boost::shared_ptr< IDatagramSourcem_dgsource
 Protected since the Indexing input module needs access to it. Datagram source instance.

Detailed Description

Psana input module for reading XTC files.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Version:
Id
XtcInputModuleBase.h 10730 2015-09-23 22:06:21Z davidsch@SLAC.STANFORD.EDU
Author:
Andrei Salnikov

Definition at line 56 of file XtcInputModuleBase.h.


Constructor & Destructor Documentation

PSXtcInput::XtcInputModuleBase::XtcInputModuleBase ( const std::string &  name,
const boost::shared_ptr< IDatagramSource > &  dgsource,
bool  noSkip = false 
)

Constructor takes the name of the module and instance of datagram source.

If noSkip parameter is set to true then psana parameters "skip-events", "events", "skip-epics" and "l3t-accept-only" are ignored. This is intended for use with slave worker process in multi-process mode where all skipping is done on master side.

Definition at line 122 of file XtcInputModuleBase.cpp.

References src::mpi_datasource::ds, and MsgLog.

PSXtcInput::XtcInputModuleBase::~XtcInputModuleBase (  )  [virtual]

Definition at line 173 of file XtcInputModuleBase.cpp.


Member Function Documentation

void PSXtcInput::XtcInputModuleBase::beginJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the beginning of the job.

Reimplemented in PSXtcInput::XtcIndexInputModule.

Definition at line 179 of file XtcInputModuleBase.cpp.

References fillEnv(), fillEvent(), fillEventDgList(), fillEventId(), m_dgsource, MsgLog, and nextNonNegativeValue().

Referenced by PSXtcInput::XtcIndexInputModule::beginJob().

void PSXtcInput::XtcInputModuleBase::endJob ( Event &  evt,
Env &  env 
) [virtual]

Method which is called once at the end of the job.

Definition at line 483 of file XtcInputModuleBase.cpp.

InputModule::Status PSXtcInput::XtcInputModuleBase::event ( Event &  evt,
Env &  env 
) [virtual]

Method which is called with event data.

Definition at line 269 of file XtcInputModuleBase.cpp.

References epicsOnly(), fillEnv(), fillEvent(), fillEventDgList(), fillEventId(), m_dgsource, MsgLog, nextNonNegativeValue(), and Unknown.

void PSXtcInput::XtcInputModuleBase::fillEnv ( const XtcInput::Dgram &  dg,
Env &  env 
) [protected]

Fill environment with datagram contents.

Definition at line 672 of file XtcInputModuleBase.cpp.

References amap, isConfigOrBeginCalib(), iter, and MsgLog.

void PSXtcInput::XtcInputModuleBase::fillEnv ( const std::vector< XtcInput::Dgram > &  dgList,
Env &  env 
) [protected]

Fill env from list of datagrams.

Datagrams should be sorted with DAQ streams first, Control streams last. If transition is Configure or BeginCalibCycle, uses first DAQ stream (skips others) and all control streams. For all other transitions all Dgrams are processed.

Definition at line 630 of file XtcInputModuleBase.cpp.

References isConfigOrBeginCalib(), and MsgLog.

Referenced by beginJob(), and event().

void PSXtcInput::XtcInputModuleBase::fillEvent ( const XtcInput::Dgram &  dg,
Event &  evt,
Env &  env 
) [protected]

Fill event with datagram contents.

Definition at line 527 of file XtcInputModuleBase.cpp.

References checkForAndRecordSrcDamage(), PSXtcInput::DamagePolicy::eventDamagePolicy(), iter, and MsgLog.

void PSXtcInput::XtcInputModuleBase::fillEvent ( const std::vector< XtcInput::Dgram > &  dgList,
Event &  evt,
Env &  env 
) [protected]

Fill event from list of datagrams.

Datagrams should be sorted with DAQ streams first, Control streams last. If transition is Configure or BeginCalibCycle, uses first DAQ stream (skips others) and all control streams. For all other transitions all Dgrams are processed.

Definition at line 492 of file XtcInputModuleBase.cpp.

References isConfigOrBeginCalib(), and MsgLog.

Referenced by beginJob(), and event().

void PSXtcInput::XtcInputModuleBase::fillEventDgList ( const std::vector< XtcInput::Dgram > &  dgList,
Event &  evt 
) [protected]

Fill event with Datagram list.

Definition at line 610 of file XtcInputModuleBase.cpp.

References MsgLog.

Referenced by beginJob(), and event().

void PSXtcInput::XtcInputModuleBase::fillEventId ( const XtcInput::Dgram &  dg,
Event &  evt 
) [protected]

Fill event with EventId information.

Definition at line 589 of file XtcInputModuleBase.cpp.

References MsgLog.

Referenced by beginJob(), and event().

bool PSXtcInput::XtcInputModuleBase::l3tAcceptOnly (  )  const [inline, protected]

Definition at line 131 of file XtcInputModuleBase.h.

Referenced by PSXtcInput::XtcIndexInputModule::XtcIndexInputModule().

void PSXtcInput::XtcInputModuleBase::l3tAcceptOnly ( bool  l3tAccept  )  [inline, protected]

Definition at line 127 of file XtcInputModuleBase.h.

bool PSXtcInput::XtcInputModuleBase::liveAvail ( int  numEvents  )  [virtual]

Returns True if live mode and the available events > numEvents arg.

Definition at line 770 of file XtcInputModuleBase.cpp.

References m_dgsource.

unsigned long PSXtcInput::XtcInputModuleBase::maxEvents (  )  const [inline, protected]

Definition at line 129 of file XtcInputModuleBase.h.

Referenced by PSXtcInput::XtcIndexInputModule::XtcIndexInputModule().

void PSXtcInput::XtcInputModuleBase::maxEvents ( unsigned long  nmax  )  [inline, protected]

Definition at line 125 of file XtcInputModuleBase.h.

bool PSXtcInput::XtcInputModuleBase::skipEpics (  )  const [inline, protected]

Definition at line 130 of file XtcInputModuleBase.h.

Referenced by PSXtcInput::XtcIndexInputModule::XtcIndexInputModule().

void PSXtcInput::XtcInputModuleBase::skipEpics ( bool  skip  )  [inline, protected]

Definition at line 126 of file XtcInputModuleBase.h.

unsigned long PSXtcInput::XtcInputModuleBase::skipEvents (  )  const [inline, protected]

Definition at line 128 of file XtcInputModuleBase.h.

Referenced by PSXtcInput::XtcIndexInputModule::XtcIndexInputModule().

void PSXtcInput::XtcInputModuleBase::skipEvents ( unsigned long  nskip  )  [inline, protected]

Protected to allow specific input modules to ignore settings they don't support

Definition at line 124 of file XtcInputModuleBase.h.


Member Data Documentation

boost::shared_ptr<IDatagramSource> PSXtcInput::XtcInputModuleBase::m_dgsource [protected]

Protected since the Indexing input module needs access to it. Datagram source instance.

Definition at line 120 of file XtcInputModuleBase.h.

Referenced by beginJob(), event(), liveAvail(), and PSXtcInput::XtcIndexInputModule::XtcIndexInputModule().


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