ATLAS Offline Software
Loading...
Searching...
No Matches
TauAODRunnerAlg Class Reference

The implementation of the TauAODRunnerAlg, which is meant to run at AOD level. More...

#include <TauAODRunnerAlg.h>

Inheritance diagram for TauAODRunnerAlg:
Collaboration diagram for TauAODRunnerAlg:

Public Member Functions

 TauAODRunnerAlg (const std::string &name, ISvcLocator *)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static bool isTauModified (const xAOD::TauJet *newtau)

Private Attributes

ToolHandleArray< ITauToolBasem_modificationTools {this, "modificationTools", {}, "Tools for modifying the taus"}
ToolHandleArray< ITauToolBasem_officialTools {this, "officialTools", {}, "Official Reconstruction tools for taus after the modifications"}
SG::ReadHandleKey< xAOD::TauJetContainerm_tauContainer {this, "Key_tauContainer", "TauJets", "input tau key"}
SG::ReadHandleKey< xAOD::CaloClusterContainerm_pi0ClusterInputContainer {this, "Key_pi0ClusterInputContainer", "TauPi0Clusters", "input pi0 cluster"}
SG::WriteHandleKey< xAOD::TauJetContainerm_tauOutContainer {this, "Key_tauOutputContainer", "TauJets_AODReco", "output tau key"}
SG::WriteHandleKey< xAOD::ParticleContainerm_pi0Container {this, "Key_pi0OutputContainer", "TauFinalPi0s_AODReco", "output tau final pi0 key"}
SG::WriteHandleKey< xAOD::PFOContainerm_neutralPFOOutputContainer {this, "Key_neutralPFOOutputContainer", "TauNeutralPFOs_AODReco", "output tau neutral pfo key"}
SG::WriteHandleKey< xAOD::PFOContainerm_chargedPFOOutputContainer {this, "Key_chargedPFOOutputContainer", "TauChargedPFOs_AODReco", "output tau charged pfo key"}
SG::WriteHandleKey< xAOD::PFOContainerm_hadronicPFOOutputContainer {this, "Key_hadronicPFOOutputContainer", "TauHadronicPFOs_AODReco", "output tau hadronic pfo key"}
SG::WriteHandleKey< xAOD::TauTrackContainerm_tauTrackOutputContainer {this, "Key_tauTrackOutputContainer", "TauTracks_AODReco", "output tau track key"}
SG::WriteHandleKey< xAOD::VertexContainerm_vertexOutputContainer {this, "Key_vertexOutputContainer", "TauSecondaryVertices_AODReco", "output vertex container key"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The implementation of the TauAODRunnerAlg, which is meant to run at AOD level.

This algorithm reads in the AOD TauJets and TauTracks containers, as well as other tau related containers, and make deep copies. The tools scheduled for this algorithm were divided into two categories, modification tools and standard tools after the modification. The algorithm does not proceed to the standard tools if the tau object was not modified by the modification tools, unless no modification tool has been provided. The example python scheduling scripts can be found in the DerivationFramework package.

Caution! The tool can be configured to only deep-copy the TauJet container (by setting the other input/output keys to "", but this will restrict the tools you can run, to only those that decorate/modify the TauJets, and none of the linked objects (e.g. vertices, tracks, PFOs, etc). Otherwise, errors and/or crashes will happen.

Definition at line 44 of file TauAODRunnerAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TauAODRunnerAlg()

TauAODRunnerAlg::TauAODRunnerAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 7 of file TauAODRunnerAlg.cxx.

7 :
8 AthReentrantAlgorithm(name, pSvcLocator) {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TauAODRunnerAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 67 of file TauAODRunnerAlg.cxx.

67 {
68 // Input TauJets
69 SG::ReadHandle<xAOD::TauJetContainer> tauInputHandle(m_tauContainer, ctx);
70 if (!tauInputHandle.isValid()) {
71 ATH_MSG_ERROR("Could not retrieve TauJetContainer with key " << tauInputHandle.key());
72 return StatusCode::FAILURE;
73 }
74 const xAOD::TauJetContainer *pTauContainer = tauInputHandle.cptr();
75
76
77 // Output TauTracks
78 xAOD::TauTrackContainer* newTauTrkCon = nullptr;
79 SG::WriteHandle<xAOD::TauTrackContainer> outputTauTrackHandle;
80 if(!m_tauTrackOutputContainer.empty()) {
81 outputTauTrackHandle = SG::makeHandle(m_tauTrackOutputContainer, ctx);
82 ATH_CHECK(outputTauTrackHandle.record(std::make_unique<xAOD::TauTrackContainer>(), std::make_unique<xAOD::TauTrackAuxContainer>()));
83 newTauTrkCon = outputTauTrackHandle.ptr();
84 }
85
86 // Output TauJets
87 SG::WriteHandle<xAOD::TauJetContainer> outputTauHandle(m_tauOutContainer, ctx);
88 ATH_CHECK(outputTauHandle.record(std::make_unique<xAOD::TauJetContainer>(), std::make_unique<xAOD::TauJetAuxContainer>()));
89 xAOD::TauJetContainer *newTauCon = outputTauHandle.ptr();
90
91 static const SG::Accessor<ElementLink<xAOD::TauJetContainer>> acc_ori_tau_link("originalTauJet");
92 static const SG::Accessor<char> acc_modified("ModifiedInAOD");
93
94 for (const xAOD::TauJet *tau : *pTauContainer) {
95 // Deep copy the tau container
96 xAOD::TauJet* newTau = newTauCon->push_back(std::make_unique<xAOD::TauJet>());
97 *newTau = *tau;
98
99 // Link the original tau to the deepcopy
100 ElementLink<xAOD::TauJetContainer> link_to_ori_tau;
101 link_to_ori_tau.toContainedElement(*pTauContainer, tau);
102 acc_ori_tau_link(*newTau) = link_to_ori_tau;
103
104 // If the output TauTrackContainer is declared, create a new copy of all existing TauTracks
105 // otherwise, reuse the same TauTracks (e.g. if only new TauID is being ran on a deep copy
106 // of the input TauJet container).
107 if(newTauTrkCon) {
108 // Clear the tautrack links to allow relinking.
109 newTau->clearTauTrackLinks();
110 for(const xAOD::TauTrack *tauTrk : tau->allTracks()) {
111 // Deep copy the tau track
112 xAOD::TauTrack* newTauTrk = newTauTrkCon->push_back(std::make_unique<xAOD::TauTrack>());
113 *newTauTrk = *tauTrk;
114
115 // Relink the tautrack
116 ElementLink<xAOD::TauTrackContainer> linkToTauTrack;
117 linkToTauTrack.toContainedElement(*newTauTrkCon, newTauTrk);
118 newTau->addTauTrackLink(linkToTauTrack);
119 }
120 }
121
122 // 'ModifiedInAOD' will be overriden by modification tools for relevant candidates
123 acc_modified(*newTau) = static_cast<char>(false);
124
125 // Execute all the modification tools (if provided)
126 for(const ToolHandle<ITauToolBase> &tool : m_modificationTools) {
127 ATH_MSG_DEBUG("RunnerAlg Invoking tool " << tool->name());
128 if(tool->execute(*newTau).isFailure()) break;
129 }
130
131 // If tau candidate was not modified and we ran modification tools, remove it from container
132 // The track cleanup is performed by the thinning algorithm downstream
133 if(!m_modificationTools.empty() && !acc_modified(*newTau)) {
134 newTauCon->pop_back();
135 }
136 }
137
138
139 // Read the CaloClusterContainer
140 const xAOD::CaloClusterContainer* pi0ClusterContainer = nullptr;
141 SG::ReadHandle<xAOD::CaloClusterContainer> pi0ClusterInHandle;
142 if(!m_pi0ClusterInputContainer.empty()) {
143 pi0ClusterInHandle = SG::makeHandle(m_pi0ClusterInputContainer, ctx);
144 if(!pi0ClusterInHandle.isValid()) {
145 ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << pi0ClusterInHandle.key());
146 return StatusCode::FAILURE;
147 }
148 pi0ClusterContainer = pi0ClusterInHandle.cptr();
149 }
150
151 // Write charged PFO container
152 xAOD::PFOContainer* chargedPFOContainer = nullptr;
153 SG::WriteHandle<xAOD::PFOContainer> chargedPFOHandle;
154 if(!m_chargedPFOOutputContainer.empty()) {
155 chargedPFOHandle = SG::makeHandle(m_chargedPFOOutputContainer, ctx);
156 ATH_CHECK(chargedPFOHandle.record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
157 chargedPFOContainer = chargedPFOHandle.ptr();
158 }
159
160 // Write neutral PFO container
161 xAOD::PFOContainer* neutralPFOContainer = nullptr;
162 SG::WriteHandle<xAOD::PFOContainer> neutralPFOHandle;
163 if(!m_neutralPFOOutputContainer.empty()) {
164 neutralPFOHandle = SG::makeHandle(m_neutralPFOOutputContainer, ctx);
165 ATH_CHECK(neutralPFOHandle.record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
166 neutralPFOContainer = neutralPFOHandle.ptr();
167 }
168
169 // Write pi0 container
170 xAOD::ParticleContainer* pi0Container = nullptr;
171 SG::WriteHandle<xAOD::ParticleContainer> pi0Handle;
172 if(!m_pi0Container.empty()) {
173 pi0Handle = SG::makeHandle(m_pi0Container, ctx);
174 ATH_CHECK(pi0Handle.record(std::make_unique<xAOD::ParticleContainer>(), std::make_unique<xAOD::ParticleAuxContainer>()));
175 pi0Container = pi0Handle.ptr();
176 }
177
178 // Write hadronic cluster PFO container
179 xAOD::PFOContainer* hadronicClusterPFOContainer = nullptr;
180 SG::WriteHandle<xAOD::PFOContainer> hadronicPFOHandle;
181 if(!m_hadronicPFOOutputContainer.empty()) {
182 hadronicPFOHandle = SG::makeHandle(m_hadronicPFOOutputContainer, ctx);
183 ATH_CHECK(hadronicPFOHandle.record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
184 hadronicClusterPFOContainer = hadronicPFOHandle.ptr();
185 }
186
187 // Write secondary vertices
188 xAOD::VertexContainer* pSecVtxContainer = nullptr;
189 SG::WriteHandle<xAOD::VertexContainer> vertOutHandle;
190 if(!m_vertexOutputContainer.empty()) {
191 vertOutHandle = SG::makeHandle(m_vertexOutputContainer, ctx);
192 ATH_CHECK(vertOutHandle.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
193 pSecVtxContainer = vertOutHandle.ptr();
194 }
195
196
197 // Execute all post-modification (_official_) tools
198 for (xAOD::TauJet *pTau : *newTauCon) {
199 StatusCode sc = StatusCode::SUCCESS;
200 for (const ToolHandle<ITauToolBase> &tool : m_officialTools) {
201 ATH_MSG_DEBUG("RunnerAlg Invoking tool " << tool->name());
202 if (tool->type() == "TauPi0ClusterCreator")
203 sc = tool->executePi0ClusterCreator(*pTau, *neutralPFOContainer, *hadronicClusterPFOContainer, *pi0ClusterContainer);
204 else if (tool->type() == "TauVertexVariables")
205 sc = tool->executeVertexVariables(*pTau, *pSecVtxContainer);
206 else if (tool->type() == "TauPi0ClusterScaler")
207 sc = tool->executePi0ClusterScaler(*pTau, *neutralPFOContainer, *chargedPFOContainer);
208 else if (tool->type() == "TauPi0ScoreCalculator")
209 sc = tool->executePi0nPFO(*pTau, *neutralPFOContainer);
210 else if (tool->type() == "TauPi0Selector")
211 sc = tool->executePi0nPFO(*pTau, *neutralPFOContainer);
212 else if (tool->type() == "PanTau::PanTauProcessor")
213 sc = tool->executePanTau(*pTau, *pi0Container, *neutralPFOContainer);
214 else if (tool->type() == "tauRecTools::TauTrackRNNClassifier")
215 sc = tool->executeTrackClassifier(*pTau, *newTauTrkCon);
216 else
217 sc = tool->execute(*pTau);
218
219 if (sc.isFailure()) break;
220 }
221 if (sc.isSuccess()) ATH_MSG_VERBOSE("The tau candidate has been modified successfully by the invoked official tools.");
222 }
223
224 ATH_MSG_VERBOSE("The tau candidate container has been modified by the rest of the tools");
225 ATH_MSG_DEBUG(newTauCon->size() << " / " << pTauContainer->size() <<" taus were modified");
226
227 return StatusCode::SUCCESS;
228}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
void pop_back()
Remove the last element from the collection.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
ToolHandleArray< ITauToolBase > m_modificationTools
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauContainer
SG::WriteHandleKey< xAOD::TauJetContainer > m_tauOutContainer
SG::WriteHandleKey< xAOD::PFOContainer > m_neutralPFOOutputContainer
SG::WriteHandleKey< xAOD::ParticleContainer > m_pi0Container
ToolHandleArray< ITauToolBase > m_officialTools
SG::WriteHandleKey< xAOD::PFOContainer > m_chargedPFOOutputContainer
SG::WriteHandleKey< xAOD::PFOContainer > m_hadronicPFOOutputContainer
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_pi0ClusterInputContainer
SG::WriteHandleKey< xAOD::VertexContainer > m_vertexOutputContainer
SG::WriteHandleKey< xAOD::TauTrackContainer > m_tauTrackOutputContainer
void clearTauTrackLinks()
Remove all tracks from the tau.
void addTauTrackLink(const ElementLink< TauTrackContainer > &tr)
add a TauTrack to the tau
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
PFOContainer_v1 PFOContainer
Definition of the current "pfo container version".
ParticleContainer_v1 ParticleContainer
Define the latest version of the particle class.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
TauTrack_v1 TauTrack
Definition of the current version.
Definition TauTrack.h:16
TauJet_v3 TauJet
Definition of the current "tau version".
TauTrackContainer_v1 TauTrackContainer
Definition of the current TauTrack container version.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode TauAODRunnerAlg::initialize ( )
overridevirtual

Definition at line 11 of file TauAODRunnerAlg.cxx.

11 {
12 ATH_CHECK(m_tauContainer.initialize());
14 ATH_CHECK(m_tauOutContainer.initialize());
21
23 ATH_CHECK(m_officialTools.retrieve());
24
25 if(!m_modificationTools.empty()) {
26 ATH_MSG_INFO("List of modification tools in execution sequence:");
27 ATH_MSG_INFO("------------------------------------");
28 for (const auto &tool : m_modificationTools) {
29 ATH_MSG_INFO(tool->type() << " - " << tool->name());
30 }
31 ATH_MSG_INFO("------------------------------------");
32 } else {
33 ATH_MSG_INFO("Running without modification tools");
34 }
35
36 if(!m_officialTools.empty()) {
37 ATH_MSG_INFO("List of official tools in execution sequence:");
38 ATH_MSG_INFO("------------------------------------");
39 for (const auto &tool : m_officialTools) {
40 ATH_MSG_INFO(tool->type() << " - " << tool->name());
41
42 if((tool->type() == "TauPi0ClusterCreator" && (m_neutralPFOOutputContainer.empty() || m_hadronicPFOOutputContainer.empty() || m_pi0ClusterInputContainer.empty()))
43 || (tool->type() == "TauVertexVariables" && m_vertexOutputContainer.empty())
44 || (tool->type() == "TauPi0ClusterScaler" && (m_neutralPFOOutputContainer.empty() || m_chargedPFOOutputContainer.empty()))
45 || (tool->type() == "TauPi0ScoreCalculator" && m_neutralPFOOutputContainer.empty())
46 || (tool->type() == "TauPi0Selector" && m_neutralPFOOutputContainer.empty())
47 || (tool->type() == "PanTau::PanTauProcessor" && (m_neutralPFOOutputContainer.empty() || m_pi0Container.empty()))
48 || (tool->type() == "tauRecTools::TauTrackRNNClassifier" && m_tauTrackOutputContainer.empty())) {
49 ATH_MSG_ERROR("Missing input/output containers required for tool " << tool->name() << " (" << tool->type() << ")");
50 return StatusCode::FAILURE;
51 }
52 }
53 ATH_MSG_INFO("------------------------------------");
54 } else {
55 ATH_MSG_INFO("Running without official tools");
56 }
57
58 if(m_modificationTools.empty() && m_officialTools.empty()) {
59 ATH_MSG_ERROR("Could not allocate any tool!");
60 return StatusCode::FAILURE;
61 }
62
63 return StatusCode::SUCCESS;
64}
#define ATH_MSG_INFO(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ isTauModified()

bool TauAODRunnerAlg::isTauModified ( const xAOD::TauJet * newtau)
staticprivate

Definition at line 232 of file TauAODRunnerAlg.cxx.

232 {
233 static const SG::ConstAccessor<char> acc_modified("ModifiedInAOD");
234 return acc_modified(*newtau);
235}

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_chargedPFOOutputContainer

SG::WriteHandleKey<xAOD::PFOContainer> TauAODRunnerAlg::m_chargedPFOOutputContainer {this, "Key_chargedPFOOutputContainer", "TauChargedPFOs_AODReco", "output tau charged pfo key"}
private

Definition at line 61 of file TauAODRunnerAlg.h.

61{this, "Key_chargedPFOOutputContainer", "TauChargedPFOs_AODReco", "output tau charged pfo key"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_hadronicPFOOutputContainer

SG::WriteHandleKey<xAOD::PFOContainer> TauAODRunnerAlg::m_hadronicPFOOutputContainer {this, "Key_hadronicPFOOutputContainer", "TauHadronicPFOs_AODReco", "output tau hadronic pfo key"}
private

Definition at line 62 of file TauAODRunnerAlg.h.

62{this, "Key_hadronicPFOOutputContainer", "TauHadronicPFOs_AODReco", "output tau hadronic pfo key"};

◆ m_modificationTools

ToolHandleArray<ITauToolBase> TauAODRunnerAlg::m_modificationTools {this, "modificationTools", {}, "Tools for modifying the taus"}
private

Definition at line 52 of file TauAODRunnerAlg.h.

52{this, "modificationTools", {}, "Tools for modifying the taus"};

◆ m_neutralPFOOutputContainer

SG::WriteHandleKey<xAOD::PFOContainer> TauAODRunnerAlg::m_neutralPFOOutputContainer {this, "Key_neutralPFOOutputContainer", "TauNeutralPFOs_AODReco", "output tau neutral pfo key"}
private

Definition at line 60 of file TauAODRunnerAlg.h.

60{this, "Key_neutralPFOOutputContainer", "TauNeutralPFOs_AODReco", "output tau neutral pfo key"};

◆ m_officialTools

ToolHandleArray<ITauToolBase> TauAODRunnerAlg::m_officialTools {this, "officialTools", {}, "Official Reconstruction tools for taus after the modifications"}
private

Definition at line 53 of file TauAODRunnerAlg.h.

53{this, "officialTools", {}, "Official Reconstruction tools for taus after the modifications"};

◆ m_pi0ClusterInputContainer

SG::ReadHandleKey<xAOD::CaloClusterContainer> TauAODRunnerAlg::m_pi0ClusterInputContainer {this, "Key_pi0ClusterInputContainer", "TauPi0Clusters", "input pi0 cluster"}
private

Definition at line 57 of file TauAODRunnerAlg.h.

57{this, "Key_pi0ClusterInputContainer", "TauPi0Clusters", "input pi0 cluster"};

◆ m_pi0Container

SG::WriteHandleKey<xAOD::ParticleContainer> TauAODRunnerAlg::m_pi0Container {this, "Key_pi0OutputContainer", "TauFinalPi0s_AODReco", "output tau final pi0 key"}
private

Definition at line 59 of file TauAODRunnerAlg.h.

59{this, "Key_pi0OutputContainer", "TauFinalPi0s_AODReco", "output tau final pi0 key"};

◆ m_tauContainer

SG::ReadHandleKey<xAOD::TauJetContainer> TauAODRunnerAlg::m_tauContainer {this, "Key_tauContainer", "TauJets", "input tau key"}
private

Definition at line 56 of file TauAODRunnerAlg.h.

56{this, "Key_tauContainer", "TauJets", "input tau key"};

◆ m_tauOutContainer

SG::WriteHandleKey<xAOD::TauJetContainer> TauAODRunnerAlg::m_tauOutContainer {this, "Key_tauOutputContainer", "TauJets_AODReco", "output tau key"}
private

Definition at line 58 of file TauAODRunnerAlg.h.

58{this, "Key_tauOutputContainer", "TauJets_AODReco", "output tau key"};

◆ m_tauTrackOutputContainer

SG::WriteHandleKey<xAOD::TauTrackContainer> TauAODRunnerAlg::m_tauTrackOutputContainer {this, "Key_tauTrackOutputContainer", "TauTracks_AODReco", "output tau track key"}
private

Definition at line 63 of file TauAODRunnerAlg.h.

63{this, "Key_tauTrackOutputContainer", "TauTracks_AODReco", "output tau track key"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexOutputContainer

SG::WriteHandleKey<xAOD::VertexContainer> TauAODRunnerAlg::m_vertexOutputContainer {this, "Key_vertexOutputContainer", "TauSecondaryVertices_AODReco", "output vertex container key"}
private

Definition at line 64 of file TauAODRunnerAlg.h.

64{this, "Key_vertexOutputContainer", "TauSecondaryVertices_AODReco", "output vertex container key"};

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: