ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
xAODRootAccessInterfaces
xAODRootAccessInterfaces
TVirtualEvent.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
//
3
// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4
//
5
#ifndef XAODROOTACCESSINTERFACES_TVIRTUALEVENT_H
6
#define XAODROOTACCESSINTERFACES_TVIRTUALEVENT_H
7
8
// Project include(s).
9
#include "
SGCore/sgkey_t.h
"
10
11
// Forward declaration(s):
12
namespace
std
{
13
class
type_info;
14
}
15
16
namespace
xAOD
{
17
26
class
TVirtualEvent
{
27
28
public
:
29
using
sgkey_t
=
SG::sgkey_t
;
30
32
virtual
~TVirtualEvent
() =
default
;
33
35
static
constexpr
sgkey_t
DEFAULT_KEY
= ~static_cast<sgkey_t>(0);
37
static
constexpr
sgkey_t
KEY_MASK
=
DEFAULT_KEY
>> 2;
38
40
template
<
typename
T >
41
bool
retrieve
(
const
T*& obj,
sgkey_t
key =
DEFAULT_KEY
,
42
bool
silent =
false
);
44
template
<
typename
T >
45
bool
retrieve
(
const
T*& obj,
const
std::string& key,
46
bool
silent =
false
);
47
49
virtual
sgkey_t
getHash
(
const
std::string& key )
const
= 0;
51
virtual
sgkey_t
getKey
(
const
void
* obj )
const
= 0;
53
virtual
const
std::string&
getName
(
const
void
* obj )
const
= 0;
55
virtual
const
std::string&
getName
(
sgkey_t
hash )
const
= 0;
56
57
protected
:
59
virtual
void
*
getOutputObject
(
sgkey_t
key,
60
const
std::type_info& ti ) = 0;
62
virtual
const
void
*
getInputObject
(
sgkey_t
key,
63
const
std::type_info& ti,
64
bool
silent =
false
) = 0;
65
66
};
// class TVirtualEvent
67
68
}
// namespace xAOD
69
70
// Include the template implementation:
71
#include "
TVirtualEvent.icc
"
72
73
#endif
// XAODROOTACCESSINTERFACES_TVIRTUALEVENT_H
TVirtualEvent.icc
xAOD::TVirtualEvent
Base interface for getting objects out of the input file.
Definition
TVirtualEvent.h:26
xAOD::TVirtualEvent::getName
virtual const std::string & getName(sgkey_t hash) const =0
Function returning the key describing a known object.
xAOD::TVirtualEvent::getKey
virtual sgkey_t getKey(const void *obj) const =0
Function returning the hash describing a known object.
xAOD::TVirtualEvent::retrieve
bool retrieve(const T *&obj, sgkey_t key=DEFAULT_KEY, bool silent=false)
Function retrieving an object from the event (constant version).
xAOD::TVirtualEvent::retrieve
bool retrieve(const T *&obj, const std::string &key, bool silent=false)
Function retrieving an object from the event (constant version).
xAOD::TVirtualEvent::getInputObject
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.
xAOD::TVirtualEvent::getOutputObject
virtual void * getOutputObject(sgkey_t key, const std::type_info &ti)=0
Function for retrieving an output object in a non-template way.
xAOD::TVirtualEvent::getHash
virtual sgkey_t getHash(const std::string &key) const =0
Function returning the hash describing an object's name/key.
xAOD::TVirtualEvent::~TVirtualEvent
virtual ~TVirtualEvent()=default
Virtual destructor to make vtable happy.
xAOD::TVirtualEvent::sgkey_t
SG::sgkey_t sgkey_t
Definition
TVirtualEvent.h:29
xAOD::TVirtualEvent::DEFAULT_KEY
static constexpr sgkey_t DEFAULT_KEY
Key for retrieving the "default" object of a given type.
Definition
TVirtualEvent.h:35
xAOD::TVirtualEvent::getName
virtual const std::string & getName(const void *obj) const =0
Function returning the key describing a known object.
xAOD::TVirtualEvent::KEY_MASK
static constexpr sgkey_t KEY_MASK
Mask for the keys, used mostly internally.
Definition
TVirtualEvent.h:37
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition
sgkey_t.h:32
std
STL namespace.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
sgkey_t.h
Generated on
for ATLAS Offline Software by
1.17.0