PSEnv::Env Class Reference
[PSEnv package]

Class representing an environment object for psana jobs. More...

#include <Env.h>

List of all members.

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
EnvObjectStoreconfigStore ()
 Access to Configuration Store object.
EnvObjectStorecalibStore ()
 Access to Calibration Store object.
EpicsStoreepicsStore ()
 Access to EPICS Store object.
boost::shared_ptr< PSEvt::AliasMapaliasMap ()
 Access to alias map.
boost::shared_ptr< PSHist::HManagerhmgr ()
 Access to histogram manager.


Detailed Description

Class representing an environment object for psana jobs.

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.

Version:
$Id: Env.h 9877 2015-04-08 21:15:19Z davidsch@SLAC.STANFORD.EDU $
Author:
Andrei Salnikov

Definition at line 69 of file Env.h.


Constructor & Destructor Documentation

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.

Parameters:
[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.

Definition at line 56 of file Env.cpp.

PSEnv::Env::~Env (  ) 

Definition at line 91 of file Env.cpp.


Member Function Documentation

boost::shared_ptr<PSEvt::AliasMap> PSEnv::Env::aliasMap (  )  [inline]

Access to alias map.

Definition at line 140 of file Env.h.

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]

Access to Calibration Store object.

Definition at line 134 of file Env.h.

EnvObjectStore& PSEnv::Env::configStore (  )  [inline]

Access to Configuration Store object.

Definition at line 131 of file Env.h.

EpicsStore& PSEnv::Env::epicsStore (  )  [inline]

Access to EPICS Store object.

Definition at line 137 of file Env.h.

const std::string& PSEnv::Env::experiment (  )  const [inline]

Returns experiment name.

Definition at line 117 of file Env.h.

Referenced by calibDir().

unsigned PSEnv::Env::expNum (  )  const [inline]

Returns experiment number or 0.

Definition at line 120 of file Env.h.

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.

Definition at line 104 of file Env.h.

boost::shared_ptr< PSHist::HManager > PSEnv::Env::hmgr (  ) 

Access to histogram manager.

Definition at line 114 of file Env.cpp.

References MsgLogRoot.

const std::string& PSEnv::Env::instrument (  )  const [inline]

Returns instrument name.

Definition at line 114 of file Env.h.

Referenced by calibDir().

const std::string& PSEnv::Env::jobName (  )  const [inline]

Returns job name.

Definition at line 107 of file Env.h.

const std::string& PSEnv::Env::jobNameSub (  )  const [inline]

Returns combination of job name and subprocess index as a string which is unique for all subprocesses in a job..

Definition at line 111 of file Env.h.

int PSEnv::Env::subprocess (  )  const [inline]

Returns sub-process number. In case of multi-processing job it will be a non-negative number ranging from 0 to a total number of sub-processes. In case of single-process job it will return -1.

Definition at line 124 of file Env.h.


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