ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
AssociationUtils
AssociationUtils
ToolBox.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASSOCIATIONUTILS_TOOLBOX_H
6
#define ASSOCIATIONUTILS_TOOLBOX_H
7
8
// Framework includes
9
#include "
AsgMessaging/AsgMessaging.h
"
10
#include "
AsgTools/AnaToolHandle.h
"
11
12
// Local includes
13
#include "
AssociationUtils/IOverlapTool.h
"
14
#include "
AssociationUtils/IOverlapRemovalTool.h
"
15
16
// STL includes
17
#include <string>
18
19
// Forward declarations
20
class
INamedInterface;
21
namespace
asg
{
22
class
AsgTool
;
23
}
24
25
namespace
ADD_CMODE(ORUtils)
26
{
27
38
class
ToolBox
:
public
asg::AsgMessaging
39
{
40
41
public
:
42
44
using
parentType_t = INamedInterface;
45
using
MasterHandle_t =
asg::AnaToolHandle<IOverlapRemovalTool>
;
46
using
OverlapHandle_t =
asg::AnaToolHandle<IOverlapTool>
;
47
48
50
ToolBox
(
const
std::string& name =
"ORToolBox"
,
51
parentType_t* theParent =
nullptr
);
52
54
StatusCode
initialize
();
55
57
std::vector<OverlapHandle_t*> getOverlapTools();
58
60
template
<
class
T> StatusCode
61
setGlobalProperty(
const
std::string& property,
const
T& value);
62
64
MasterHandle_t masterTool;
65
68
OverlapHandle_t muPFJetORT;
69
OverlapHandle_t eleEleORT;
70
OverlapHandle_t eleMuORT;
71
OverlapHandle_t eleJetORT;
72
OverlapHandle_t muJetORT;
73
OverlapHandle_t tauEleORT;
74
OverlapHandle_t tauMuORT;
75
OverlapHandle_t tauJetORT;
76
OverlapHandle_t phoEleORT;
77
OverlapHandle_t phoMuORT;
78
OverlapHandle_t phoJetORT;
79
OverlapHandle_t eleFatJetORT;
80
OverlapHandle_t jetFatJetORT;
82
84
parentType_t* parent() {
return
m_parent; }
85
86
private
:
87
89
StatusCode initTool(OverlapHandle_t& handle,
const
std::string& key);
90
92
StatusCode initMaster();
93
95
parentType_t* m_parent;
96
97
};
98
99
100
//---------------------------------------------------------------------------
101
// Implementation method to set a property on all tools.
102
//---------------------------------------------------------------------------
103
template
<
class
T> StatusCode
104
ToolBox::setGlobalProperty(
const
std::string& property,
const
T& value)
105
{
106
// Handle the overlap tools
107
for
(
auto
handlePtr : getOverlapTools()) {
108
ATH_CHECK
( handlePtr->setProperty(property, value) );
109
}
110
// Handle the master tool
111
if
(!masterTool.empty())
ATH_CHECK
( masterTool.setProperty(property, value) );
112
return
StatusCode::SUCCESS;
113
}
114
115
}
// namespace ADD_CMODE(ORUtils)
116
117
#endif
AnaToolHandle.h
AsgMessaging.h
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
IOverlapRemovalTool.h
IOverlapTool.h
ToolBox
Definition
ToolBox.h:25
asg::AnaToolHandle
a modified tool handle that allows its owner to configure new tools from the C++ side
Definition
AnaToolHandle.h:167
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition
AsgMessaging.h:40
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg
Definition
DataHandleTestTool.h:28
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0