ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaRoot
AthenaRootComps
src
xAODEvent.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// xAODEvent.h
8
// Header file for classes xAODTEvent and xAODREvent
9
// Author: Johannes Elmsheuser, Will Buttinger
11
#ifndef ATHENAROOTCOMPS_XAODEVENT_H
12
#define ATHENAROOTCOMPS_XAODEVENT_H
13
14
// These classes exist purely to gain public access to the getInputObject method of
15
// xAOD::Event. We need this because we cannot use the templated retrieve method.
16
// xAODTEvent reads TTree and xAODREvent reads RNTuple input files.
17
18
19
#include "
xAODRootAccess/TEvent.h
"
20
#include "
xAODRootAccess/REvent.h
"
21
22
#include <string>
23
#include <typeinfo>
24
25
namespace
xAOD
{
26
27
class
xAODTEvent
:
public
xAOD::TEvent
28
{
29
public
:
30
xAODTEvent
(
EAuxMode
mode =
kClassAccess
)
31
:
xAOD
::
TEvent
(mode)
32
{
33
m_ctx
= Gaudi::Hive::currentContext();
34
}
35
using
TEvent::getInputObject
;
36
};
37
38
class
xAODREvent
:
public
xAOD::Experimental::REvent
39
{
40
public
:
41
xAODREvent
()
42
{
43
m_ctx
= Gaudi::Hive::currentContext();
44
}
45
using
REvent::getInputObject;
46
};
47
49
inline
const
void
*
getInputObject
(
xAOD::Event
& event,
const
std::string& key,
50
const
std::type_info& ti,
bool
silent,
bool
metadata)
51
{
52
if
(
auto
* tevent =
dynamic_cast<
xAODTEvent
*
>
(&event)) {
53
return
tevent->getInputObject(key, ti, silent, metadata);
54
}
55
if
(
auto
* revent =
dynamic_cast<
xAODREvent
*
>
(&event)) {
56
return
revent->getInputObject(key, ti, silent, metadata);
57
}
58
return
nullptr
;
59
}
60
61
}
//> end namespace xAOD
62
63
#endif
//> !ATHENAROOTCOMPS_XAODEVENT_H
TEvent.h
REvent.h
xAOD::Event
Base class for the event (xAOD::TEvent and xAOD::REvent) classes.
Definition
Event.h:61
xAOD::Event::m_ctx
EventContext m_ctx
The event context associated with this event.
Definition
Event.h:408
xAOD::Event::getInputObject
const void * getInputObject(SG::sgkey_t key, const std::type_info &ti, bool silent) override
Function for retrieving an input object in a non-template way.
Definition
EventTVirtualEvent.cxx:165
xAOD::Experimental::REvent
Tool for accessing xAOD files outside of Athena, version RNTuple.
Definition
REvent.h:33
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:59
xAOD::TEvent::EAuxMode
EAuxMode
Auxiliary store "mode".
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:71
xAOD::TEvent::kClassAccess
@ kClassAccess
Access auxiliary data using the aux containers.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:73
xAOD::TEvent::TEvent
TEvent(EAuxMode mode=kClassAccess)
Default constructor.
Definition
Control/xAODRootAccess/Root/TEvent.cxx:72
xAOD::xAODREvent
Definition
xAODEvent.h:39
xAOD::xAODREvent::xAODREvent
xAODREvent()
Definition
xAODEvent.h:41
xAOD::xAODTEvent
Definition
xAODEvent.h:28
xAOD::xAODTEvent::xAODTEvent
xAODTEvent(EAuxMode mode=kClassAccess)
Definition
xAODEvent.h:30
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::getInputObject
const void * getInputObject(xAOD::Event &event, const std::string &key, const std::type_info &ti, bool silent, bool metadata)
Retrieve an input object from an xAODTEvent or xAODREvent in a non-template way.
Definition
xAODEvent.h:49
Generated on
for ATLAS Offline Software by
1.17.0