Base interface for getting objects out of the input file. More...
#include <TVirtualEvent.h>
Public Member Functions | |
| virtual | ~TVirtualEvent () |
| Virtual destructor to make vtable happy. | |
| template<typename T > | |
| bool | retrieve (const T *&obj, uint32_t key=DEFAULT_KEY, bool silent=false) |
| Function retrieving an object from the event (constant version). | |
| template<typename T > | |
| bool | retrieve (const T *&obj, const std::string &key, bool silent=false) |
| Function retrieving an object from the event (constant version). | |
| virtual uint32_t | getHash (const std::string &key) const =0 |
| Function returning the hash describing an object's name/key. | |
| virtual uint32_t | getKey (const void *obj) const =0 |
| Function returning the hash describing a known object. | |
| virtual const std::string & | getName (const void *obj) const =0 |
| Function returning the key describing a known object. | |
| virtual const std::string & | getName (uint32_t hash) const =0 |
| Function returning the key describing a known object. | |
Static Public Attributes | |
| static const uint32_t | DEFAULT_KEY = 0xffffffff |
| Key for retrieving the "default" object of a given type. | |
| static const uint32_t | KEY_MASK = 0x3fffffff |
| Mask for the keys, used mostly internally. | |
Protected Member Functions | |
| virtual void * | getOutputObject (uint32_t key, const std::type_info &ti)=0 |
| Function for retrieving an output object in a non-template way. | |
| virtual const void * | getInputObject (uint32_t key, const std::type_info &ti, bool silent=false)=0 |
| Function for retrieving an input object in a non-template way. | |
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.
| bool xAOD::TVirtualEvent::retrieve | ( | const T *& | obj, | |
| const std::string & | key, | |||
| bool | silent = false | |||
| ) | [inline] |
Function retrieving an object from the event (constant version).
This is a convenience function for human users for getting access to an existing object, using a string key instead of a hashed identifier.
Internally it just creates a hash from the key, and perform the retrieve with that.
| obj | The pointer that should be set [output] | |
| key | The key of the object to retrieve |
true if the operation was successful, false otherwise | bool xAOD::TVirtualEvent::retrieve | ( | const T *& | obj, | |
| uint32_t | key = DEFAULT_KEY, |
|||
| bool | silent = false | |||
| ) | [inline] |
Function retrieving an object from the event (constant version).
This is the function used by all the smart pointers to get access to objects in the event.
| obj | The pointer that should be set [output] | |
| key | The hashed key of the object to retrieve | |
| silent | When set to true, failure is handled silently |
true if the operation was successful, false otherwise
1.6.1