ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigDecisionTool
TrigDecisionTool
ClassTraits.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
8
#ifndef TRIGGER_DECISION_TOOL_ClassTraits_H
9
#define TRIGGER_DECISION_TOOL_ClassTraits_H
10
11
namespace
TrigDec
{
12
13
// Here we define the trait classes. The basic problem is
14
// this:
15
//
16
// Some classes are attached to the navigation as basic objects
17
// for example - MuonFeature
18
// Other classes are attached to the navigation as containers of
19
// objects for example - egamma's are attached as egammaContainers
20
// Still other classes are not attached at all, but can be gotten
21
// from the ancestor method in the TDT, such as the L1 items
22
// We need to make this complexity invisible to the user, so they
23
// can just call whatever they want to match to and not worry
24
// about how it interacts with the navigation
25
// We solve this with traits classes (thanks to Scott Snyder for
26
// the suggestion) which tell us whether or not a class is a
27
// container and if it is, allows us to map from the class to
28
// the container class and similarly for ancest style objects
29
30
struct
DirectAttached
{};
// identifies objects as attached directly
31
struct
AncestorAttached
{};
// identifies objects as attached via ancest
32
33
// by default, we assume a class is attached directly
34
template
<
typename
T>
35
struct
ClassTraits
{
36
typedef
T
type
;
37
};
38
39
}
40
41
// now we specialize for the container classes
42
43
// This macro specializes the definition of the
44
// ContainerForClass trait class
45
#define SPECIALIZE_CONTAINER_FOR_CLASS(x,y) \
46
namespace TrigDec { \
47
template<> \
48
struct ClassTraits<x> { \
49
typedef y type; \
50
}; \
51
}
52
53
// This macro does the forward declaration
54
// for objects without a namespace
55
#define DECLARE_ATTACHED_CONTAINER(x,y) \
56
class x; \
57
class y; \
58
SPECIALIZE_CONTAINER_FOR_CLASS(x,y)
59
60
// This macro does the forward declaration
61
// for objects with the same namespace
62
// as the container
63
#define DECLARE_ATTACHED_CONTAINER_NAMESPACE(a,x,y) \
64
namespace a { \
65
class x; \
66
class y; \
67
} \
68
SPECIALIZE_CONTAINER_FOR_CLASS(a::x,a::y)
69
70
// This macro does the forward declaration
71
// for objects with a namespace, but not namespace
72
// on the container
73
#define DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE(a,x,y) \
74
namespace a { \
75
class x; \
76
} \
77
class y; \
78
SPECIALIZE_CONTAINER_FOR_CLASS(a::x,y)
79
80
// This macro does the forward declaration
81
// for objects with a namespace, and containers
82
// that are a typedef
83
#define DECLARE_ATTACHED_CONTAINER_TYPEDEF(a, x, y) \
84
namespace a { \
85
class x; \
86
} \
87
SPECIALZE_CONTAINER_FOR_CLASS(a::x, y)
88
89
DECLARE_ATTACHED_CONTAINER
(
CaloCell
,
CaloCellContainer
)
90
DECLARE_ATTACHED_CONTAINER
(
TrigPhoton
,
TrigPhotonContainer
)
91
DECLARE_ATTACHED_CONTAINER
(
TrigElectron
,
TrigElectronContainer
)
92
DECLARE_ATTACHED_CONTAINER
(
TrigL2Bjet
,
TrigL2BjetContainer
)
93
//DECLARE_ATTACHED_CONTAINER(CosmicMuon, CosmicMuonCollection)
94
//DECLARE_ATTACHED_CONTAINER(MdtTrackSegment, MdtTrackSegmentCollection)
95
DECLARE_ATTACHED_CONTAINER
(
TrigL2Bphys
,
TrigL2BphysContainer
)
96
DECLARE_ATTACHED_CONTAINER
(
TrigInDetTrack
,
TrigInDetTrackCollection
)
97
DECLARE_ATTACHED_CONTAINER
(
TrigVertex
,
TrigVertexCollection
)
98
DECLARE_ATTACHED_CONTAINER
(
CaloCluster
,
CaloClusterContainer
)
99
DECLARE_ATTACHED_CONTAINER
(
TrigMuonEF
,
TrigMuonEFContainer
)
100
DECLARE_ATTACHED_CONTAINER
(
TrigMuonEFInfo
,
TrigMuonEFInfoContainer
)
101
DECLARE_ATTACHED_CONTAINER
(
CaloShower
,
CaloShowerContainer
)
102
DECLARE_ATTACHED_CONTAINER
(
egamma
,
egammaContainer
)
103
DECLARE_ATTACHED_CONTAINER_NAMESPACE
(
Rec
, TrackParticle, TrackParticleContainer)
104
DECLARE_ATTACHED_CONTAINER_NAMESPACE
(
Analysis
, TauDetails, TauDetailsContainer)
105
DECLARE_ATTACHED_CONTAINER
(
TrigEFBjet
,
TrigEFBjetContainer
)
106
DECLARE_ATTACHED_CONTAINER
(
TrigEFBphys
,
TrigEFBphysContainer
)
107
DECLARE_ATTACHED_CONTAINER_NAMESPACE
(
Analysis
, TauJet, TauJetContainer)
108
DECLARE_ATTACHED_CONTAINER
(
Jet
,
JetCollection
)
109
DECLARE_ATTACHED_CONTAINER
(
CaloTower
,
CaloTowerContainer
)
110
DECLARE_ATTACHED_CONTAINER
(
egDetail
,
egDetailContainer
)
111
DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE
(
Trk
, VxCandidate,
VxContainer
)
112
113
#undef SPECIALIZE_CONTAINER_FOR_CLASS
114
#undef DECLARE_ATTACHED_CONTAINER
115
#undef DECLARE_ATTACHED_CONTAINER_NAMESPACE
116
#undef DECLARE_ATTACHED_CONTAINER_TYPEDEF
117
#undef DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE
118
119
// now we set up the traits for the L1 items
120
121
// this macro setups a template specialization
122
// for the L1 objects
123
/*
124
#define DECLARE_L1_TRIGGER_OBJECT(x) \
125
class x; \
126
namespace TrigDec { \
127
template<> \
128
struct ClassTraits<x> { \
129
typedef AncestorAttached type; \
130
}; \
131
}
132
133
DECLARE_L1_TRIGGER_OBJECT(Muon_ROI)
134
DECLARE_L1_TRIGGER_OBJECT(Jet_ROI)
135
DECLARE_L1_TRIGGER_OBJECT(EmTau_ROI)
136
*/
137
#undef DECLARE_L1_TRIGGER_OBJECT
138
139
#endif
DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE
#define DECLARE_ATTACHED_CONTAINER_OBJECT_NAMESPACE(a, x, y)
Definition
ClassTraits.h:73
DECLARE_ATTACHED_CONTAINER
#define DECLARE_ATTACHED_CONTAINER(x, y)
Definition
ClassTraits.h:55
DECLARE_ATTACHED_CONTAINER_NAMESPACE
#define DECLARE_ATTACHED_CONTAINER_NAMESPACE(a, x, y)
Definition
ClassTraits.h:63
CaloCellContainer
Container class for CaloCell.
Definition
CaloCellContainer.h:55
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
CaloClusterContainer
Storable container for CaloCluster.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloClusterContainer.h:37
CaloCluster
Principal data class for CaloCell clusters.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
CaloShowerContainer
Container class for CaloShower.
Definition
CaloShowerContainer.h:15
CaloShower
Data class for cluster variables associated with a CaloCluster.
Definition
CaloShower.h:12
CaloTowerContainer
Storable container class for CaloTower.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:77
CaloTower
Data class for calorimeter cell towers.
Definition
Calorimeter/CaloEvent/CaloEvent/CaloTower.h:55
JetCollection
Definition
JetCollection.h:30
Jet
Definition
Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
TrigEFBjetContainer
Container of TrigEFBjet objects to be stored in POOL.
Definition
TrigEFBjetContainer.h:31
TrigEFBjet
Class representing a b-jet candidate created at EF.
Definition
TrigEFBjet.h:38
TrigEFBphysContainer
Definition
TrigEFBphysContainer.h:34
TrigEFBphys
Definition
TrigEFBphys.h:42
TrigElectronContainer
File: TrigElectronContainer.h.
Definition
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectronContainer.h:32
TrigElectron
File: TrigElectron.h.
Definition
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:63
TrigInDetTrackCollection
Definition
TrigInDetTrackCollection.h:13
TrigInDetTrack
represents a LVL2 ID track
Definition
TrigInDetTrack.h:34
TrigL2BjetContainer
Container of TrigEFBjet objects to be stored in POOL.
Definition
TrigL2BjetContainer.h:32
TrigL2Bjet
Class representing a b-jet candidate created at L2.
Definition
TrigL2Bjet.h:38
TrigL2BphysContainer
Definition
TrigL2BphysContainer.h:33
TrigL2Bphys
Definition
TrigL2Bphys.h:43
TrigMuonEFContainer
Definition
TrigMuonEFContainer.h:27
TrigMuonEFInfoContainer
Definition
TrigMuonEFInfoContainer.h:27
TrigMuonEFInfo
Definition
TrigMuonEFInfo.h:24
TrigMuonEF
Definition
TrigMuonEF.h:26
TrigPhotonContainer
File: TrigPhotonContainer.h.
Definition
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhotonContainer.h:32
TrigPhoton
File: TrigPhoton.h.
Definition
Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:44
TrigVertexCollection
Definition
TrigVertexCollection.h:13
TrigVertex
encapsulates LVL2 vertex parameters (in the global reference frame), covariance matrix,...
Definition
TrigVertex.h:29
VxContainer
Definition
VxContainer.h:28
egDetailContainer
Container for detailed egamma information.
Definition
egDetailContainer.h:18
egDetail
Base class for detailed egamma information.
Definition
egDetail.h:29
egammaContainer
This is a data object, containing a collection of egamma Objects.
Definition
egammaContainer.h:41
egamma
elec/gamma data class.
Definition
egamma.h:58
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Rec
namespace for combined reconstruction tools and interfaces
Definition
FakeTrackBuilder.h:10
TrigDec
Definition
ITrigDecisionCnvTool.h:18
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
TrigDec::AncestorAttached
Definition
ClassTraits.h:31
TrigDec::ClassTraits
Definition
ClassTraits.h:35
TrigDec::ClassTraits::type
T type
Definition
ClassTraits.h:36
TrigDec::DirectAttached
Definition
ClassTraits.h:30
Generated on
for ATLAS Offline Software by
1.17.0