#include <DataSource.h>
Public Member Functions | |
DataSource () | |
Default constructor makes "null" data source. | |
DataSource (const boost::shared_ptr< InputModule > &inputModule, const std::vector< boost::shared_ptr< Module > > &modules, const boost::shared_ptr< PSEnv::Env > &env) | |
Make an instance of data source. | |
~DataSource () | |
bool | empty () const |
PSEnv::Env & | env () const |
Get environment object, cannot be called for "null" source. | |
EventIter | events () |
Returns iterator for events. | |
StepIter | steps () |
Returns iterator for steps. | |
RunIter | runs () |
Returns iterator for runs. | |
void | addmodule (boost::shared_ptr< Module > module) |
bool | liveAvail (int numEvents) |
Class encapsulates input data in the form of input module and provides different ways to iterator over those 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 65 of file DataSource.h.
psana::DataSource::DataSource | ( | ) |
psana::DataSource::DataSource | ( | const boost::shared_ptr< InputModule > & | inputModule, | |
const std::vector< boost::shared_ptr< Module > > & | modules, | |||
const boost::shared_ptr< PSEnv::Env > & | env | |||
) |
Make an instance of data source.
Constructor takes instance of input module, and a list of user modules.
Definition at line 46 of file DataSource.cpp.
psana::DataSource::~DataSource | ( | ) |
Definition at line 60 of file DataSource.cpp.
void psana::DataSource::addmodule | ( | boost::shared_ptr< Module > | module | ) | [inline] |
Definition at line 104 of file DataSource.h.
bool psana::DataSource::empty | ( | ) | const [inline] |
Returns true if data source has no data ("null" source)
Definition at line 89 of file DataSource.h.
Referenced by psana::PSAnaApp::runApp().
PSEnv::Env & psana::DataSource::env | ( | ) | const |
Get environment object, cannot be called for "null" source.
Definition at line 66 of file DataSource.cpp.
EventIter psana::DataSource::events | ( | ) | [inline] |
Returns iterator for events.
Definition at line 95 of file DataSource.h.
References psana::EventLoop::None.
Referenced by psana::PSAnaApp::runApp().
bool psana::DataSource::liveAvail | ( | int | numEvents | ) |
Definition at line 53 of file DataSource.cpp.
RunIter psana::DataSource::runs | ( | ) | [inline] |
StepIter psana::DataSource::steps | ( | ) | [inline] |
Returns iterator for steps.
Definition at line 98 of file DataSource.h.
References psana::EventLoop::None.