#include <EnvObjectStore.h>
Public Member Functions | |
EnvObjectStore (const boost::shared_ptr< PSEvt::ProxyDictI > &dict) | |
Standard constructor takes proxy dictionary object. | |
~EnvObjectStore () | |
template<typename T> | |
void | putProxy (const boost::shared_ptr< PSEvt::Proxy< T > > &proxy, const Pds::Src &source, const std::string &key=std::string()) |
Add one more proxy object to the store. | |
template<typename T> | |
void | put (const boost::shared_ptr< T > &data, const Pds::Src &source, const std::string &key=std::string()) |
Add one more object to the store. | |
GetResultProxy | get (const Pds::Src &source, const std::string &key=std::string()) |
Get an object from store. | |
GetResultProxy | get (const PSEvt::Source &source, Pds::Src *foundSrc=NULL, const std::string &key=std::string()) |
Get an object from store. | |
std::list< PSEvt::EventKey > | keys (const PSEvt::Source &source=PSEvt::Source()) const |
Get the list of keys for existing config objects. | |
const boost::shared_ptr< PSEvt::ProxyDictI > & | proxyDict () const |
Get access to proxy dictionary. | |
Classes | |
struct | GetResultProxy |
Special class used for type-less return from get(). More... |
This class is very similar to PSEvt::Event class (and is implemented on top of the same proxy dictionary classes) but it has more specialized interface. In particular it does not support additional string keys as it is expected that there will be only one version of the configuration or calibrations objects.
This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.
Definition at line 66 of file EnvObjectStore.h.
PSEnv::EnvObjectStore::EnvObjectStore | ( | const boost::shared_ptr< PSEvt::ProxyDictI > & | dict | ) | [inline, explicit] |
Standard constructor takes proxy dictionary object.
[in] | dict | Pointer to proxy dictionary |
Definition at line 90 of file EnvObjectStore.h.
PSEnv::EnvObjectStore::~EnvObjectStore | ( | ) | [inline] |
Definition at line 93 of file EnvObjectStore.h.
GetResultProxy PSEnv::EnvObjectStore::get | ( | const PSEvt::Source & | source, | |
Pds::Src * | foundSrc = NULL , |
|||
const std::string & | key = std::string() | |||
) | [inline] |
Get an object from store.
[in] | source | - Source detector address. |
[out] | foundSrc | - If pointer is non-zero then pointed object will be assigned with the exact source address of the returned object. |
[in] | key | - ... |
Definition at line 158 of file EnvObjectStore.h.
GetResultProxy PSEnv::EnvObjectStore::get | ( | const Pds::Src & | source, | |
const std::string & | key = std::string() | |||
) | [inline] |
Get an object from store.
[in] | source | - Source detector address. |
[in] | key | - ... |
Definition at line 143 of file EnvObjectStore.h.
std::list<PSEvt::EventKey> PSEnv::EnvObjectStore::keys | ( | const PSEvt::Source & | source = PSEvt::Source() |
) | const [inline] |
Get the list of keys for existing config objects.
Definition at line 169 of file EnvObjectStore.h.
const boost::shared_ptr<PSEvt::ProxyDictI>& PSEnv::EnvObjectStore::proxyDict | ( | ) | const [inline] |
Get access to proxy dictionary.
This method exposes underlying proxy dictionary object. It should not be used by ordinary clients but it could be useful for code which implements additional services based on event (such as Python wrappers).
Definition at line 184 of file EnvObjectStore.h.
void PSEnv::EnvObjectStore::put | ( | const boost::shared_ptr< T > & | data, | |
const Pds::Src & | source, | |||
const std::string & | key = std::string() | |||
) | [inline] |
Add one more object to the store.
If there is already an object with the same type and address it will be replaced.
[in] | data | - Object to store in the event. |
[in] | source | - Source detector address. |
[in] | key | - ... |
Definition at line 124 of file EnvObjectStore.h.
void PSEnv::EnvObjectStore::putProxy | ( | const boost::shared_ptr< PSEvt::Proxy< T > > & | proxy, | |
const Pds::Src & | source, | |||
const std::string & | key = std::string() | |||
) | [inline] |
Add one more proxy object to the store.
[in] | proxy | - Proxy object for type T. |
[in] | source | - Source detector address. |
[in] | key | - ... |
Definition at line 103 of file EnvObjectStore.h.