PSXtcInput::IDatagramSource Class Reference
[PSXtcInput package]

Declaration of interface for datagram source classes. More...

#include <IDatagramSource.h>

Inheritance diagram for PSXtcInput::IDatagramSource:

PSShmemInput::DgramSourceShmem PSXtcInput::DgramSourceFile PSXtcInput::DgramSourceIndex List of all members.

Public Member Functions

virtual ~IDatagramSource ()
virtual void init ()=0
virtual bool next (std::vector< XtcInput::Dgram > &eventDg, std::vector< XtcInput::Dgram > &nonEventDg)=0
 Return next datagram(s) from the source.
virtual bool liveAvail (int numEvents)

Protected Member Functions

 IDatagramSource ()

Detailed Description

Declaration of interface for datagram source classes.

Datagram source is an abstraction of a sequence of datagrams that can be iterated over. Instance method next() is called repeatedly to obtain next available datagram until this method returns empty instance.

In the future this interface could be extended to support direct access based on some index (e.g. time-based).

Note:
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Version:
Id
IDatagramSource.h 10730 2015-09-23 22:06:21Z davidsch@SLAC.STANFORD.EDU
Author:
Andy Salnikov

Definition at line 59 of file IDatagramSource.h.


Constructor & Destructor Documentation

virtual PSXtcInput::IDatagramSource::~IDatagramSource (  )  [inline, virtual]

Definition at line 63 of file IDatagramSource.h.

PSXtcInput::IDatagramSource::IDatagramSource (  )  [inline, protected]

Definition at line 103 of file IDatagramSource.h.


Member Function Documentation

virtual void PSXtcInput::IDatagramSource::init (  )  [pure virtual]

Initialization method for datagram source, this is typically called in beginJob() method and it may contain initialization code which cannot be executed during construction of an instance.

Implemented in PSShmemInput::DgramSourceShmem, PSXtcInput::DgramSourceFile, and PSXtcInput::DgramSourceIndex.

virtual bool PSXtcInput::IDatagramSource::liveAvail ( int  numEvents  )  [inline, virtual]

Returns true if live mode and the available events on disk is > the argument numEvents

Reimplemented in PSXtcInput::DgramSourceFile.

Definition at line 98 of file IDatagramSource.h.

virtual bool PSXtcInput::IDatagramSource::next ( std::vector< XtcInput::Dgram > &  eventDg,
std::vector< XtcInput::Dgram > &  nonEventDg 
) [pure virtual]

Return next datagram(s) from the source.

This method returns two sets of datagrams - eventDg is the set of histograms belonging to the next event, nonEventDg is the set of datagrams which has some other data (like EPICS) which is needed for correct interpretation of current event. Currently eventDg should contain one datagram but potentially in the future we may start event building in offline and that list can grow longer. It nonEventDg is non-empty then it has to be processed first as those datagram should come from earlier time than eventDg and eventDg may contain data that overrides data in nonEventDg (e.g. some EPICS PV data may be contained in both nonEventDg and eventDg).

This method will called repeatedly until it returns false.

Parameters:
[out] eventDg returned set of datagrams for current event
[out] nonEventDg returned set of datagrams containing other information.
Returns:
false if there are no more events, both eventDg and nonEventDg will be empty in this case.

Implemented in PSShmemInput::DgramSourceShmem, PSXtcInput::DgramSourceFile, and PSXtcInput::DgramSourceIndex.


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