ATLAS Offline Software
TopToolStore.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 // $Id: TopToolStore.cxx 808118 2017-07-11 17:41:22Z tpelzer $
7 
8 #include <vector>
9 #include <string>
10 #include <limits>
11 #include <set>
12 #include <map>
13 #include <cstdlib>
14 
15 // Top includes
17 #include "TopEvent/EventTools.h"
18 
19 namespace top {
20  TopToolStore::TopToolStore(const std::string& name) :
21  asg::AsgTool(name),
22  m_config(nullptr) {
23  declareProperty("config", m_config);
24  }
25 
27  ATH_MSG_INFO("top::TopToolStore initialize...");
28 
29  m_trigger_CP_tools = std::make_unique<top::TriggerCPTools>("top::TriggerCPTools");
30  top::check(m_trigger_CP_tools->setProperty("config", m_config),
31  "Failed to share config with trigger CP tools");
32  top::check(m_trigger_CP_tools->initialize(),
33  "Failed to initialize trigger tools");
34 
35  m_other_CP_tools = std::make_unique<top::OtherCPTools>("top::OtherCPTools");
36  top::check(m_other_CP_tools->setProperty("config", m_config),
37  "Failed to share config with other CP tools");
38  top::check(m_other_CP_tools->initialize(),
39  "Failed to initialize other tools");
40 
41  m_egamma_CP_tools = std::make_unique<top::EgammaCPTools>("top::EgammaCPTools");
42  top::check(m_egamma_CP_tools->setProperty("config", m_config),
43  "Failed to share config with egamma CP tools");
44  top::check(m_egamma_CP_tools->initialize(),
45  "Failed to initialize egamma tools");
46 
47  m_muon_CP_tools = std::make_unique<top::MuonCPTools>("top::MuonCPTools");
48  top::check(m_muon_CP_tools->setProperty("config", m_config),
49  "Failed to share config with muon CP tools");
50  top::check(m_muon_CP_tools->initialize(),
51  "Failed to initialize muon tools");
52 
53  m_tau_CP_tools = std::make_unique<top::TauCPTools>("top::TauCPTools");
54  top::check(m_tau_CP_tools->setProperty("config", m_config),
55  "Failed to share config with tau CP tools");
56  top::check(m_tau_CP_tools->initialize(),
57  "Failed to initialize tau tools");
58 
59  m_flavor_tagging_CP_tools = std::make_unique<top::FlavorTaggingCPTools>("top::FlavorTaggingCPTools");
60  top::check(m_flavor_tagging_CP_tools->setProperty("config", m_config),
61  "Failed to share config with flavour tagging CP tools");
63  "Failed to initialize flavor tagging tools");
64 
65  m_boosted_tagging_CP_tools = std::make_unique<top::BoostedTaggingCPTools>("top::BoostedTaggingCPTools");
66  top::check(m_boosted_tagging_CP_tools->setProperty("config", m_config),
67  "Failed to share config with flavour tagging CP tools");
69  "Failed to initialize boosted tagging tools");
70 
71  m_jetMET_CP_tools = std::make_unique<top::JetMETCPTools>("top::JetMETCPTools");
72  top::check(m_jetMET_CP_tools->setProperty("config", m_config),
73  "Failed to share config with Jet/MET CP tools");
74  top::check(m_jetMET_CP_tools->initialize(),
75  "Failed to initialize Jet/MET tools");
76 
77  m_isolation_CP_tools = std::make_unique<top::IsolationCPTools>("top::IsolationCPTools");
78  top::check(m_isolation_CP_tools->setProperty("config", m_config),
79  "Failed to share config with isolation CP tools");
80  top::check(m_isolation_CP_tools->initialize(),
81  "Failed to initialize isolation tools");
82 
83  m_OR_CP_tools = std::make_unique<top::OverlapRemovalCPTools>("top::OverlapRemovalCPTools");
84  top::check(m_OR_CP_tools->setProperty("config", m_config),
85  "Failed to share config with overlap removal CP tools");
86  top::check(m_OR_CP_tools->initialize(),
87  "Failed to initialize overlap removal tools");
88 
89  m_ghost_track_CP_tools = std::make_unique<top::GhostTrackCPTools>("top::GhostTrackCPTools");
90  top::check(m_ghost_track_CP_tools->setProperty("config", m_config),
91  "Failed to share config with ghost track CP tools");
92  top::check(m_ghost_track_CP_tools->initialize(),
93  "Failed to initialize ghost track tools");
94 
95  m_track_CP_tools = std::make_unique<top::TrackCPTools>("top::TrackCPTools");
96  top::check(m_track_CP_tools->setProperty("config", m_config),
97  "Failed to share config with track CP tools");
98  top::check(m_track_CP_tools->initialize(),
99  "Failed to initialize track tools");
100 
101 
102  return StatusCode::SUCCESS;
103  }
104 
106  ATH_MSG_INFO("top::TopToolStore finalize");
107  return StatusCode::SUCCESS;
108  }
109 } // namespace top
top::TopToolStore::m_boosted_tagging_CP_tools
std::unique_ptr< BoostedTaggingCPTools > m_boosted_tagging_CP_tools
Definition: TopToolStore.h:66
top::TopToolStore::m_flavor_tagging_CP_tools
std::unique_ptr< FlavorTaggingCPTools > m_flavor_tagging_CP_tools
Definition: TopToolStore.h:65
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
top::TopToolStore::m_other_CP_tools
std::unique_ptr< OtherCPTools > m_other_CP_tools
Definition: TopToolStore.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
asg
Definition: DataHandleTestTool.h:28
top::TopToolStore::m_muon_CP_tools
std::unique_ptr< MuonCPTools > m_muon_CP_tools
Definition: TopToolStore.h:69
top::TopToolStore::m_OR_CP_tools
std::unique_ptr< OverlapRemovalCPTools > m_OR_CP_tools
Definition: TopToolStore.h:63
top::TopToolStore::m_track_CP_tools
std::unique_ptr< TrackCPTools > m_track_CP_tools
Definition: TopToolStore.h:74
top::TopToolStore::m_tau_CP_tools
std::unique_ptr< TauCPTools > m_tau_CP_tools
Definition: TopToolStore.h:71
EventTools.h
A few functions for doing operations on particles / events. Currently holds code for dR,...
TopToolStore.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
top::TopToolStore::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TopToolStore.cxx:26
top::TopToolStore::m_ghost_track_CP_tools
std::unique_ptr< GhostTrackCPTools > m_ghost_track_CP_tools
Definition: TopToolStore.h:73
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
top::TopToolStore::m_config
std::shared_ptr< top::TopConfig > m_config
Definition: TopToolStore.h:61
TopConfig.h
top::TopToolStore::m_trigger_CP_tools
std::unique_ptr< TriggerCPTools > m_trigger_CP_tools
Definition: TopToolStore.h:67
top::TopToolStore::finalize
StatusCode finalize()
Definition: TopToolStore.cxx:105
top::TopToolStore::m_isolation_CP_tools
std::unique_ptr< IsolationCPTools > m_isolation_CP_tools
Definition: TopToolStore.h:70
top::TopToolStore::m_egamma_CP_tools
std::unique_ptr< EgammaCPTools > m_egamma_CP_tools
Definition: TopToolStore.h:68
top::TopToolStore::TopToolStore
TopToolStore(const std::string &name)
Definition: TopToolStore.cxx:20
top::TopToolStore::m_jetMET_CP_tools
std::unique_ptr< JetMETCPTools > m_jetMET_CP_tools
Definition: TopToolStore.h:72