PSShmemInput::DgramSourceShmem Class Reference
[PSShmemInput]

Implementation of IDatagramSource interface which receives data from shared memory. More...

#include <DgramSourceShmem.h>

Inheritance diagram for PSShmemInput::DgramSourceShmem:

PSXtcInput::IDatagramSource psana::Configurable List of all members.

Public Member Functions

 DgramSourceShmem (const std::string &name)
virtual ~DgramSourceShmem ()
virtual void init ()
virtual bool next (std::vector< XtcInput::Dgram > &eventDg, std::vector< XtcInput::Dgram > &nonEventDg)
 Return next datagram(s) from the source.

Detailed Description

Implementation of IDatagramSource interface which receives data from shared memory.

Note:
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Version:
Id
DgramSourceShmem.h 7698 2014-02-27 00:47:58Z salnikov@SLAC.STANFORD.EDU
Author:
Andy Salnikov

Definition at line 58 of file DgramSourceShmem.h.


Constructor & Destructor Documentation

PSShmemInput::DgramSourceShmem::DgramSourceShmem ( const std::string &  name  ) 

Definition at line 46 of file DgramSourceShmem.cpp.

PSShmemInput::DgramSourceShmem::~DgramSourceShmem (  )  [virtual]

Definition at line 57 of file DgramSourceShmem.cpp.

References MsgLog, and psana::Configurable::name().


Member Function Documentation

void PSShmemInput::DgramSourceShmem::init (  )  [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.

Implements PSXtcInput::IDatagramSource.

Definition at line 71 of file DgramSourceShmem.cpp.

References psana::Configurable::configList(), psana::Configurable::configStr(), and src::mpi_datasource::ds.

bool PSShmemInput::DgramSourceShmem::next ( std::vector< XtcInput::Dgram > &  eventDg,
std::vector< XtcInput::Dgram > &  nonEventDg 
) [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.

Implements PSXtcInput::IDatagramSource.

Definition at line 123 of file DgramSourceShmem.cpp.


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