ATLAS Offline Software
|
Base interface for getting objects out of the input file. More...
#include <TVirtualEvent.h>
Public Types | |
using | sgkey_t = SG::sgkey_t |
Public Member Functions | |
virtual | ~TVirtualEvent ()=default |
Virtual destructor to make vtable happy. More... | |
template<typename T > | |
bool | retrieve (const T *&obj, sgkey_t key=DEFAULT_KEY, bool silent=false) |
Function retrieving an object from the event (constant version) More... | |
template<typename T > | |
bool | retrieve (const T *&obj, const std::string &key, bool silent=false) |
Function retrieving an object from the event (constant version) More... | |
template<typename T > | |
void | keys (std::vector< std::string > &vkeys, bool metadata=false) const |
provide list of all keys associated with provided type. More... | |
virtual sgkey_t | getHash (const std::string &key) const =0 |
Function returning the hash describing an object's name/key. More... | |
virtual sgkey_t | getKey (const void *obj) const =0 |
Function returning the hash describing a known object. More... | |
virtual const std::string & | getName (const void *obj) const =0 |
Function returning the key describing a known object. More... | |
virtual const std::string & | getName (sgkey_t hash) const =0 |
Function returning the key describing a known object. More... | |
Static Public Attributes | |
static constexpr sgkey_t | DEFAULT_KEY = ~static_cast<sgkey_t>(0) |
Key for retrieving the "default" object of a given type. More... | |
static constexpr sgkey_t | KEY_MASK = DEFAULT_KEY >> 2 |
Mask for the keys, used mostly internally. More... | |
Protected Member Functions | |
virtual void * | getOutputObject (sgkey_t key, const std::type_info &ti)=0 |
Function for retrieving an output object in a non-template way. More... | |
virtual const void * | getInputObject (sgkey_t key, const std::type_info &ti, bool silent=false)=0 |
Function for retrieving an input object in a non-template way. More... | |
virtual void | getNames (const std::string &targetClassName, std::vector< std::string > &vkeys, bool metadata) const =0 |
Function to retrieve list of keys describing a type name. More... | |
Base interface for getting objects out of the input file.
In order for the smart pointers not to depend on the full xAOD::TEvent class, this interface collects all the functionality that is needed by the smart pointers to access the input objects.
Definition at line 32 of file TVirtualEvent.h.
Definition at line 35 of file TVirtualEvent.h.
|
virtualdefault |
Virtual destructor to make vtable happy.
Function returning the hash describing an object's name/key.
Implemented in xAOD::TEvent.
|
protectedpure virtual |
Function for retrieving an input object in a non-template way.
Implemented in xAOD::TEvent.
Function returning the hash describing a known object.
Implemented in xAOD::TEvent.
Function returning the key describing a known object.
Implemented in xAOD::TEvent.
Function returning the key describing a known object.
Implemented in xAOD::TEvent.
|
protectedpure virtual |
Function to retrieve list of keys describing a type name.
Implemented in xAOD::TEvent.
|
protectedpure virtual |
Function for retrieving an output object in a non-template way.
Implemented in xAOD::TEvent.
void xAOD::TVirtualEvent::keys | ( | std::vector< std::string > & | vkeys, |
bool | metadata = false |
||
) | const |
provide list of all keys associated with provided type.
usage: event->keys( vec_to_fill, metadata )
vkeys | will be filled with the list of keys (may be empty) |
metadata | (default false) look in metadata content if true |
bool xAOD::TVirtualEvent::retrieve | ( | const T *& | obj, |
const std::string & | key, | ||
bool | silent = false |
||
) |
Function retrieving an object from the event (constant version)
bool xAOD::TVirtualEvent::retrieve | ( | const T *& | obj, |
sgkey_t | key = DEFAULT_KEY , |
||
bool | silent = false |
||
) |
Function retrieving an object from the event (constant version)
Key for retrieving the "default" object of a given type.
Definition at line 41 of file TVirtualEvent.h.
|
staticconstexpr |
Mask for the keys, used mostly internally.
Definition at line 43 of file TVirtualEvent.h.