![]() |
ATLAS Offline Software
|
Wrapper for Event to make it look like StoreGate. More...
#include <SgEvent.h>
Public Member Functions | |
| SgEvent (xAOD::Event *pevm=0, xAOD::TStore *ptds=0) | |
| Constructor specifying concrete Event and TStore objects. | |
| xAOD::Event * | event () const |
| Return the underlying event manager. | |
| xAOD::TStore * | tds () const |
| Return the underlying transient data store. | |
Functions providing access to the persistent and transient data | |
| template<typename T> | |
| bool | contains (const std::string &name) const |
| Check if an object is available for constant access. | |
| template<typename T> | |
| bool | transientContains (const std::string &name) const |
| Check if an object is available for non-constant access. | |
| template<typename T> | |
| T * | retrieve (const std::string &name) const |
| Function retrieving a constant or non-constant object. | |
| template<typename T> | |
| StatusCode | retrieve (T *&pobj, const std::string &name) |
| Retrieve a container from memory. | |
| template<typename T> | |
| StatusCode | retrieve (const T *&pobj, const std::string &name) const |
| Retrieve a container from the input file or the memory. | |
| template<typename T> | |
| StatusCode | record (std::unique_ptr< T > pobj, const std::string &cname) |
| Record an object/container using a smart pointer for ownership. | |
| template<typename T> | |
| StatusCode | record (T *pobj, const std::string &cname) |
| Record an object/container. | |
| template<typename T> | |
| StatusCode | overwrite (T *pobj, const std::string &name, bool allowMods, bool resetOnly=true, bool noHist=false) |
| Overwrite an object/container in the transient store. | |
| template<typename T> | |
| void | keys (std::vector< std::string > &vkeys) const |
| provide list of all keys associated with an object. | |
Private Member Functions | |
| StatusCode | initialize () const |
| Function initialising the object. | |
Private Attributes | |
| xAOD::Event * | m_pevm |
| Pointer to the Event that this object interacts with. | |
| xAOD::TStore * | m_ptds |
| Pointer to the TStore that this object interacts with. | |
Wrapper for Event to make it look like StoreGate.
In order to be able to interact with xAOD::Event using the same sort of code that we use to interact with StoreGateSvc in Athena, we wrap it into such an object.
This class also takes care of placing transient objects into xAOD::TStore.
| asg::SgEvent::SgEvent | ( | xAOD::Event * | pevm = 0, |
| xAOD::TStore * | ptds = 0 ) |
Constructor specifying concrete Event and TStore objects.
Definition at line 19 of file SgEvent.cxx.
| bool asg::SgEvent::contains | ( | const std::string & | name | ) | const |
Check if an object is available for constant access.
| xAOD::Event * asg::SgEvent::event | ( | ) | const |
Return the underlying event manager.
Definition at line 24 of file SgEvent.cxx.
|
private |
Function initialising the object.
Definition at line 44 of file SgEvent.cxx.
| void asg::SgEvent::keys | ( | std::vector< std::string > & | vkeys | ) | const |
provide list of all keys associated with an object.
usage: store->keys(key_vector)
| a | vector of strings that will be filled with the list of keys |
| StatusCode asg::SgEvent::overwrite | ( | T * | pobj, |
| const std::string & | name, | ||
| bool | allowMods, | ||
| bool | resetOnly = true, | ||
| bool | noHist = false ) |
Overwrite an object/container in the transient store.
| StatusCode asg::SgEvent::record | ( | std::unique_ptr< T > | pobj, |
| const std::string & | cname ) |
Record an object/container using a smart pointer for ownership.
| StatusCode asg::SgEvent::record | ( | T * | pobj, |
| const std::string & | cname ) |
Record an object/container.
| T * asg::SgEvent::retrieve | ( | const std::string & | name | ) | const |
Function retrieving a constant or non-constant object.
| StatusCode asg::SgEvent::retrieve | ( | const T *& | pobj, |
| const std::string & | name ) const |
Retrieve a container from the input file or the memory.
| StatusCode asg::SgEvent::retrieve | ( | T *& | pobj, |
| const std::string & | name ) |
Retrieve a container from memory.
| xAOD::TStore * asg::SgEvent::tds | ( | ) | const |
Return the underlying transient data store.
Definition at line 33 of file SgEvent.cxx.
| bool asg::SgEvent::transientContains | ( | const std::string & | name | ) | const |
Check if an object is available for non-constant access.
|
mutableprivate |
|
mutableprivate |