ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::TVirtualEvent Class Referenceabstract

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

#include <TVirtualEvent.h>

Inheritance diagram for xAOD::TVirtualEvent:
Collaboration diagram for xAOD::TVirtualEvent:

Public Types

using sgkey_t = SG::sgkey_t

Public Member Functions

virtual ~TVirtualEvent ()=default
 Virtual destructor to make vtable happy.
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)
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 sgkey_t getHash (const std::string &key) const =0
 Function returning the hash describing an object's name/key.
virtual sgkey_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 (sgkey_t hash) const =0
 Function returning the key describing a known object.

Static Public Attributes

static constexpr sgkey_t DEFAULT_KEY = ~static_cast<sgkey_t>(0)
 Key for retrieving the "default" object of a given type.
static constexpr sgkey_t KEY_MASK = DEFAULT_KEY >> 2
 Mask for the keys, used mostly internally.

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.
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.

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 Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h

Definition at line 26 of file TVirtualEvent.h.

Member Typedef Documentation

◆ sgkey_t

Definition at line 29 of file TVirtualEvent.h.

Constructor & Destructor Documentation

◆ ~TVirtualEvent()

virtual xAOD::TVirtualEvent::~TVirtualEvent ( )
virtualdefault

Virtual destructor to make vtable happy.

Member Function Documentation

◆ getHash()

virtual sgkey_t xAOD::TVirtualEvent::getHash ( const std::string & key) const
pure virtual

Function returning the hash describing an object's name/key.

Implemented in xAOD::Event.

◆ getInputObject()

virtual const void * xAOD::TVirtualEvent::getInputObject ( sgkey_t key,
const std::type_info & ti,
bool silent = false )
protectedpure virtual

Function for retrieving an input object in a non-template way.

Implemented in xAOD::Event.

◆ getKey()

virtual sgkey_t xAOD::TVirtualEvent::getKey ( const void * obj) const
pure virtual

Function returning the hash describing a known object.

Implemented in xAOD::Event.

◆ getName() [1/2]

virtual const std::string & xAOD::TVirtualEvent::getName ( const void * obj) const
pure virtual

Function returning the key describing a known object.

Implemented in xAOD::Event.

◆ getName() [2/2]

virtual const std::string & xAOD::TVirtualEvent::getName ( sgkey_t hash) const
pure virtual

Function returning the key describing a known object.

Implemented in xAOD::Event.

◆ getOutputObject()

virtual void * xAOD::TVirtualEvent::getOutputObject ( sgkey_t key,
const std::type_info & ti )
protectedpure virtual

Function for retrieving an output object in a non-template way.

Implemented in xAOD::Event.

◆ retrieve() [1/2]

template<typename T>
bool xAOD::TVirtualEvent::retrieve ( const T *& obj,
const std::string & key,
bool silent = false )

Function retrieving an object from the event (constant version)

◆ retrieve() [2/2]

template<typename T>
bool xAOD::TVirtualEvent::retrieve ( const T *& obj,
sgkey_t key = DEFAULT_KEY,
bool silent = false )

Function retrieving an object from the event (constant version)

Member Data Documentation

◆ DEFAULT_KEY

sgkey_t xAOD::TVirtualEvent::DEFAULT_KEY = ~static_cast<sgkey_t>(0)
staticconstexpr

Key for retrieving the "default" object of a given type.

Definition at line 35 of file TVirtualEvent.h.

◆ KEY_MASK

sgkey_t xAOD::TVirtualEvent::KEY_MASK = DEFAULT_KEY >> 2
staticconstexpr

Mask for the keys, used mostly internally.

Definition at line 37 of file TVirtualEvent.h.


The documentation for this class was generated from the following file: