xAOD::TVirtualEvent Class Reference

Base interface for getting objects out of the input file. More...

#include <TVirtualEvent.h>

Inheritance diagram for xAOD::TVirtualEvent:
xAOD::TEvent TEventClass xAOD::TPyEvent

List of all members.

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.

Detailed Description

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.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Revision
682043
Date
2015-07-10 11:21:12 +0200 (Fri, 10 Jul 2015)

Member Function Documentation

template<typename T >
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.

Parameters:
obj The pointer that should be set [output]
key The key of the object to retrieve
Returns:
true if the operation was successful, false otherwise
template<typename T >
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.

Parameters:
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
Returns:
true if the operation was successful, false otherwise

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1