ATLAS Offline Software
|
Wrapper for TEvent to make it look like StoreGate. More...
#include <SgTEvent.h>
Public Member Functions | |
SgTEvent (xAOD::TEvent *pevm=0, xAOD::TStore *ptds=0) | |
Constructor specifying concrete TEvent and TStore objects. More... | |
xAOD::TEvent * | event () const |
Return the underlying event manager. More... | |
xAOD::TStore * | tds () const |
Return the underlying transient data store. More... | |
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. More... | |
template<typename T > | |
bool | transientContains (const std::string &name) const |
Check if an object is available for non-constant access. More... | |
template<typename T > | |
T * | retrieve (const std::string &name) const |
Function retrieving a constant or non-constant object. More... | |
template<typename T > | |
StatusCode | retrieve (T *&pobj, const std::string &name) |
Retrieve a container from memory. More... | |
template<typename T > | |
StatusCode | retrieve (const T *&pobj, const std::string &name) const |
Retrieve a container from the input file or the memory. More... | |
template<typename T > | |
StatusCode | record (std::unique_ptr< T > pobj, const std::string &cname) |
Record an object/container using a smart pointer for ownership. More... | |
template<typename T > | |
StatusCode | record (T *pobj, const std::string &cname) |
Record an object/container. More... | |
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. More... | |
template<typename T > | |
void | keys (std::vector< std::string > &vkeys) const |
provide list of all keys associated with an object. More... | |
Private Member Functions | |
StatusCode | initialize () const |
Function initialising the object. More... | |
Private Attributes | |
xAOD::TEvent * | m_pevm |
Pointer to the TEvent that this object interacts with. More... | |
xAOD::TStore * | m_ptds |
Pointer to the TStore that this object interacts with. More... | |
Wrapper for TEvent to make it look like StoreGate.
In order to be able to interact with xAOD::TEvent 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.
Definition at line 44 of file SgTEvent.h.
asg::SgTEvent::SgTEvent | ( | xAOD::TEvent * | pevm = 0 , |
xAOD::TStore * | ptds = 0 |
||
) |
Constructor specifying concrete TEvent and TStore objects.
Definition at line 19 of file SgTEvent.cxx.
bool asg::SgTEvent::contains | ( | const std::string & | name | ) | const |
Check if an object is available for constant access.
xAOD::TEvent * asg::SgTEvent::event | ( | ) | const |
Return the underlying event manager.
Definition at line 24 of file SgTEvent.cxx.
|
private |
void asg::SgTEvent::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::SgTEvent::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::SgTEvent::record | ( | std::unique_ptr< T > | pobj, |
const std::string & | cname | ||
) |
Record an object/container using a smart pointer for ownership.
StatusCode asg::SgTEvent::record | ( | T * | pobj, |
const std::string & | cname | ||
) |
Record an object/container.
T* asg::SgTEvent::retrieve | ( | const std::string & | name | ) | const |
Function retrieving a constant or non-constant object.
StatusCode asg::SgTEvent::retrieve | ( | const T *& | pobj, |
const std::string & | name | ||
) | const |
Retrieve a container from the input file or the memory.
StatusCode asg::SgTEvent::retrieve | ( | T *& | pobj, |
const std::string & | name | ||
) |
Retrieve a container from memory.
xAOD::TStore * asg::SgTEvent::tds | ( | ) | const |
bool asg::SgTEvent::transientContains | ( | const std::string & | name | ) | const |
Check if an object is available for non-constant access.
|
mutableprivate |
Pointer to the TEvent that this object interacts with.
Definition at line 105 of file SgTEvent.h.
|
mutableprivate |
Pointer to the TStore that this object interacts with.
Definition at line 107 of file SgTEvent.h.