PSEnv::EpicsStoreImpl Class Reference
[PSEnv package]

Class that provides implementation for the EPICS PV store. More...

#include <EpicsStoreImpl.h>

List of all members.

Public Member Functions

 EpicsStoreImpl ()
 ~EpicsStoreImpl ()
void store (const boost::shared_ptr< Psana::Epics::EpicsPvHeader > &pv, const Pds::Src &src, const std::string *pvName=NULL, long eventTag=-1)
 Store EPICS PV.
void storeAlias (const Pds::Src &src, int pvId, const std::string &alias)
 Store alias name for EPICS PV.
void names (std::vector< std::string > &names) const
 Get the full list of PV names and aliases.
void pvNames (std::vector< std::string > &names) const
 Get the list of PV names.
void aliases (std::vector< std::string > &names) const
 Get the list of PV aliases.
std::string alias (const std::string &pv) const
 Get alias name for specified PV name.
std::string pvName (const std::string &alias) const
 Get PV name for specified alias name.
template<typename T>
boost::shared_ptr< T > getCtrl (const std::string &name) const
 Get CTRL object for given EPICS PV name.
template<typename T>
boost::shared_ptr< T > getTime (const std::string &name) const
 Get TIME object for given EPICS PV name.
TimeHeaderAndEventTag getTimeAndEventTag (const std::string &name) const
boost::shared_ptr< Psana::Epics::EpicsPvHeadergetAny (const std::string &name) const
 Get base class object for given EPICS PV name.
void getStatus (const std::string &name, int &status, int &severity, PSTime::Time &time) const
 Get status info for the EPICS PV.
template<typename T>
getValue (const std::string &name, unsigned idx=0) const
 Get the value of the EPICS PV, convert to requested type.

Protected Member Functions

boost::shared_ptr< Psana::Epics::EpicsPvCtrlHeadergetCtrlImpl (const std::string &name) const
 Implementation of the getCtrl which returns generic pointer.
boost::shared_ptr< Psana::Epics::EpicsPvTimeHeadergetTimeImpl (const std::string &name) const
 Implementation of the getTime which returns generic pointer.

Classes

struct  TimeHeaderAndEventTag
 Type for storing TIME EPICs pv and eventTag used when storing. More...


Detailed Description

Class that provides implementation for the EPICS PV store.

This is a part of the EpicsStore implementation detail, should not be of much interest to end users. Hides all complexities from EpicsStore class declaration.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Version:
$Id: EpicsStoreImpl.h 8426 2014-06-17 01:39:57Z davidsch@SLAC.STANFORD.EDU $
Author:
Andrei Salnikov

Definition at line 63 of file EpicsStoreImpl.h.


Constructor & Destructor Documentation

PSEnv::EpicsStoreImpl::EpicsStoreImpl (  ) 

Definition at line 60 of file EpicsStoreImpl.cpp.

PSEnv::EpicsStoreImpl::~EpicsStoreImpl (  ) 

Definition at line 73 of file EpicsStoreImpl.cpp.


Member Function Documentation

std::string PSEnv::EpicsStoreImpl::alias ( const std::string &  pv  )  const

Get alias name for specified PV name.

Definition at line 247 of file EpicsStoreImpl.cpp.

void PSEnv::EpicsStoreImpl::aliases ( std::vector< std::string > &  names  )  const

Get the list of PV aliases.

Definition at line 236 of file EpicsStoreImpl.cpp.

boost::shared_ptr< Psana::Epics::EpicsPvHeader > PSEnv::EpicsStoreImpl::getAny ( const std::string &  name  )  const

Get base class object for given EPICS PV name.

Definition at line 278 of file EpicsStoreImpl.cpp.

References pvName().

Referenced by getValue(), and PSEnv::EpicsStore::EpicsPV::operator boost::shared_ptr().

template<typename T>
boost::shared_ptr<T> PSEnv::EpicsStoreImpl::getCtrl ( const std::string &  name  )  const [inline]

Get CTRL object for given EPICS PV name.

Definition at line 95 of file EpicsStoreImpl.h.

References getCtrlImpl().

Referenced by PSEnv::EpicsStore::EpicsPV::operator boost::shared_ptr().

boost::shared_ptr< Psana::Epics::EpicsPvCtrlHeader > PSEnv::EpicsStoreImpl::getCtrlImpl ( const std::string &  name  )  const [protected]

Implementation of the getCtrl which returns generic pointer.

Definition at line 331 of file EpicsStoreImpl.cpp.

References pvName().

Referenced by getCtrl().

void PSEnv::EpicsStoreImpl::getStatus ( const std::string &  name,
int &  status,
int &  severity,
PSTime::Time time 
) const

Get status info for the EPICS PV.

Parameters:
[in] name PV name
[out] status EPICS status value
[out] severity EPICS severity value
[out] time Time of the last change, can be (0) if time is unknown
Exceptions:
ExceptionEpicsName if the name of the PV is not known

Definition at line 298 of file EpicsStoreImpl.cpp.

References Psana::Epics::epicsTimeStamp::nsec(), pvName(), Psana::Epics::epicsTimeStamp::sec(), and sec_1970_to_1990.

template<typename T>
boost::shared_ptr<T> PSEnv::EpicsStoreImpl::getTime ( const std::string &  name  )  const [inline]

Get TIME object for given EPICS PV name.

Definition at line 102 of file EpicsStoreImpl.h.

References getTimeImpl().

Referenced by PSEnv::EpicsStore::EpicsPV::operator boost::shared_ptr().

EpicsStoreImpl::TimeHeaderAndEventTag PSEnv::EpicsStoreImpl::getTimeAndEventTag ( const std::string &  name  )  const

Get TimeHeader and EventTag for a given EPICS PV name. If name not found, return default TimeHeaderAndEventTag wher pv is NULL.

Definition at line 357 of file EpicsStoreImpl.cpp.

References pvName().

boost::shared_ptr< Psana::Epics::EpicsPvTimeHeader > PSEnv::EpicsStoreImpl::getTimeImpl ( const std::string &  name  )  const [protected]

Implementation of the getTime which returns generic pointer.

Definition at line 344 of file EpicsStoreImpl.cpp.

References pvName().

Referenced by getTime().

template<typename T>
T PSEnv::EpicsStoreImpl::getValue ( const std::string &  name,
unsigned  idx = 0 
) const [inline]

Get the value of the EPICS PV, convert to requested type.

Parameters:
[in] name PV name
[in] idx value index (for array PVs use non-zero index)
Returns:
the value of the PV
Exceptions:
ExceptionEpicsName if the name of the PV is not known
ExceptionEpicsConversion if the PV value cannot be converted to requested type

Definition at line 146 of file EpicsStoreImpl.h.

References getAny().

Referenced by PSEnv::EpicsStore::EpicsValue::operator std::string().

void PSEnv::EpicsStoreImpl::names ( std::vector< std::string > &  names  )  const

Get the full list of PV names and aliases.

Definition at line 197 of file EpicsStoreImpl.cpp.

std::string PSEnv::EpicsStoreImpl::pvName ( const std::string &  alias  )  const

Get PV name for specified alias name.

Definition at line 262 of file EpicsStoreImpl.cpp.

Referenced by getAny(), getCtrlImpl(), getStatus(), getTimeAndEventTag(), and getTimeImpl().

void PSEnv::EpicsStoreImpl::pvNames ( std::vector< std::string > &  names  )  const

Get the list of PV names.

Definition at line 218 of file EpicsStoreImpl.cpp.

void PSEnv::EpicsStoreImpl::store ( const boost::shared_ptr< Psana::Epics::EpicsPvHeader > &  pv,
const Pds::Src &  src,
const std::string *  pvName = NULL,
long  eventTag = -1 
)

Store EPICS PV.

Definition at line 79 of file EpicsStoreImpl.cpp.

References logger, MsgLog, Psana::Epics::epicsTimeStamp::nsec(), pvId2str(), and Psana::Epics::epicsTimeStamp::sec().

void PSEnv::EpicsStoreImpl::storeAlias ( const Pds::Src &  src,
int  pvId,
const std::string &  alias 
)

Store alias name for EPICS PV.

Definition at line 169 of file EpicsStoreImpl.cpp.

References logger, MsgLog, and pvId2str().


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