#include <SgTEventMeta.h>
Public Types | |
enum | StoreType { InputStore = 0, OutputStore = 1 } |
Type of the store that this object implements. More... | |
Public Member Functions | |
SgTEventMeta (StoreType type, xAOD::TEvent *event=0) | |
Constructor with a type and an optional TEvent pointer. | |
Functions providing access to the metadata payload | |
template<typename T > | |
bool | contains (const std::string &name) |
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 > | |
StatusCode | retrieve (T *&obj, const std::string &name) |
Retrieve a non-constant pointer to an object in the store. | |
template<typename T > | |
StatusCode | retrieve (const T *&obj, const std::string &name) |
Retrieve a constant pointer to an object in the store. | |
template<typename T > | |
StatusCode | record (T *obj, const std::string &name) |
Record an object into the store. |
Wrapper class providing StoreGate-like access to metadata in ROOT
In Athena we access the input and output metadata stores with two separate StoreGateSvc instances. In ROOT the access to the metadata content of the input/output files is provided using the same xAOD::TEvent object that we use to access the event content of these files as well. To emulate the same pattern for the dual-use tools that Athena provides, this wrapper is used.
It behaves pretty much like SgTEvent, but I didn't want to make that class even more complicated. Instead decided to implement the metadata access using this independent class.