#include <Env.h>
Public Member Functions | |
Env (const std::string &jobName, const boost::shared_ptr< IExpNameProvider > &expNameProvider, const std::string &calibDir, const boost::shared_ptr< PSEvt::AliasMap > &aliasMap, int subproc) | |
Constructor. | |
~Env () | |
const std::string & | fwkName () const |
Returns name of the framework. | |
const std::string & | jobName () const |
Returns job name. | |
const std::string & | jobNameSub () const |
const std::string & | instrument () const |
Returns instrument name. | |
const std::string & | experiment () const |
Returns experiment name. | |
unsigned | expNum () const |
Returns experiment number or 0. | |
int | subprocess () const |
const std::string & | calibDir () const |
EnvObjectStore & | configStore () |
Access to Configuration Store object. | |
EnvObjectStore & | calibStore () |
Access to Calibration Store object. | |
EpicsStore & | epicsStore () |
Access to EPICS Store object. | |
boost::shared_ptr< PSEvt::AliasMap > | aliasMap () |
Access to alias map. | |
boost::shared_ptr< PSHist::HManager > | hmgr () |
Access to histogram manager. |
Environment object stores non-event data such as configuration objects, EPICS data, histogram manager, plus some job-specific information which does not change from event to event.
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 69 of file Env.h.
PSEnv::Env::Env | ( | const std::string & | jobName, | |
const boost::shared_ptr< IExpNameProvider > & | expNameProvider, | |||
const std::string & | calibDir, | |||
const boost::shared_ptr< PSEvt::AliasMap > & | aliasMap, | |||
int | subproc | |||
) |
Constructor.
[in] | jobName | Name of the psana job. |
[in] | expNameProvider | Object which provides experiment/instrument names. |
[in] | calibDir | Name of the calibration directory, can include "{exp}" and "{instr}" strings which will be replaced with experiment and instrument names. |
[in] | aliasMap | Optional instance of the alias map. |
[in] | subproc | Subprocess number. |
boost::shared_ptr<PSEvt::AliasMap> PSEnv::Env::aliasMap | ( | ) | [inline] |
const std::string & PSEnv::Env::calibDir | ( | ) | const |
Returns that name of the calibration directory for current instrument/experiment.
Definition at line 100 of file Env.cpp.
References experiment(), gsub(), and instrument().
EnvObjectStore& PSEnv::Env::calibStore | ( | ) | [inline] |
EnvObjectStore& PSEnv::Env::configStore | ( | ) | [inline] |
EpicsStore& PSEnv::Env::epicsStore | ( | ) | [inline] |
const std::string& PSEnv::Env::experiment | ( | ) | const [inline] |
unsigned PSEnv::Env::expNum | ( | ) | const [inline] |
const std::string& PSEnv::Env::fwkName | ( | ) | const [inline] |
Returns name of the framework.
This method is supposed to be defined across different frameworks. It returns the name of the current framework, e.g. when client code runs inside pyana framework it will return string "pyana", inside psana framework it will return "psana". This method should be used as a primary mechanism for distinguishing between different frameworks in cases when client needs to execute framework-specific code. This method is not very useful in C++ as we have only one C++ framework, but is more useful in Python code which needs to run inside both pyana and psana.
boost::shared_ptr< PSHist::HManager > PSEnv::Env::hmgr | ( | ) |
const std::string& PSEnv::Env::instrument | ( | ) | const [inline] |
const std::string& PSEnv::Env::jobName | ( | ) | const [inline] |
const std::string& PSEnv::Env::jobNameSub | ( | ) | const [inline] |
int PSEnv::Env::subprocess | ( | ) | const [inline] |