ATLAS Offline Software
Loading...
Searching...
No Matches
met::METMakerAlg Class Reference

#include <METMakerAlg.h>

Inheritance diagram for met::METMakerAlg:

Public Member Functions

 METMakerAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual ~METMakerAlg ()
 Destructor:
virtual StatusCode initialize () override
 Athena algorithm's Hooks.
virtual StatusCode execute () override
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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

 METMakerAlg ()
 Default constructor:
virtual bool accept (const xAOD::Electron *el)
virtual bool accept (const xAOD::Photon *ph)
virtual bool accept (const xAOD::TauJet *tau)
virtual bool accept (const xAOD::Muon *muon)
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.

Protected Attributes

std::string m_softclname
std::string m_softtrkname
SG::ReadHandleKey< xAOD::ElectronContainerm_ElectronContainerKey
SG::ReadHandleKey< xAOD::PhotonContainerm_PhotonContainerKey
SG::ReadHandleKey< xAOD::TauJetContainerm_TauJetContainerKey
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey
SG::ReadHandleKey< xAOD::JetContainerm_JetContainerKey
SG::ReadHandleKey< xAOD::MissingETContainerm_CoreMetKey
SG::WriteHandleKey< xAOD::MissingETContainerm_metKey
SG::ReadHandleKey< xAOD::MissingETAssociationMapm_metMapKey
bool m_doTruthLep
ToolHandle< IMETMakerm_metmaker
 Athena configured tools.
ToolHandle< CP::IMuonSelectionToolm_muonSelTool
ToolHandle< IAsgElectronLikelihoodToolm_elecSelLHTool
ToolHandle< IAsgPhotonIsEMSelectorm_photonSelIsEMTool
ToolHandle< TauAnalysisTools::ITauSelectionToolm_tauSelTool

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>

Private Attributes

DataObjIDColl m_extendedExtraObjects
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

Definition at line 42 of file METMakerAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ METMakerAlg() [1/2]

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

Constructor with parameters:

Definition at line 30 of file METMakerAlg.cxx.

32 : ::AthAlgorithm( name, pSvcLocator ),
33 m_metKey(""),
34 m_metmaker(this),
35 m_muonSelTool(this,""),
36 m_elecSelLHTool(this,""),
37 m_photonSelIsEMTool(this,""),
38 m_tauSelTool(this,"")
39
40 {
41 declareProperty( "Maker", m_metmaker );
42 declareProperty( "METCoreName", m_CoreMetKey = "MET_Core" );
43 declareProperty("METName", m_metKey = std::string("MET_Reference"),"MET container");
44 declareProperty("METMapName", m_metMapKey = "METAssoc" );
45
46 declareProperty( "METSoftClName", m_softclname = "SoftClus" );
47 declareProperty( "METSoftTrkName", m_softtrkname = "PVSoftTrk" );
48
49 declareProperty( "InputJets", m_JetContainerKey = "AntiKt4LCTopoJets" );
50 declareProperty( "InputElectrons", m_ElectronContainerKey = "Electrons" );
51 declareProperty( "InputPhotons", m_PhotonContainerKey = "Photons" );
52 declareProperty( "InputTaus", m_TauJetContainerKey = "TauJets" );
53 declareProperty( "InputMuons", m_MuonContainerKey = "Muons" );
54
55 declareProperty( "MuonSelectionTool", m_muonSelTool );
56 declareProperty( "ElectronLHSelectionTool", m_elecSelLHTool );
57 declareProperty( "PhotonIsEMSelectionTool" , m_photonSelIsEMTool );
58 declareProperty( "TauSelectionTool", m_tauSelTool );
59
60 declareProperty( "DoTruthLeptons", m_doTruthLep = false );
61
62 }
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_softclname
Definition METMakerAlg.h:67
SG::ReadHandleKey< xAOD::TauJetContainer > m_TauJetContainerKey
Definition METMakerAlg.h:73
std::string m_softtrkname
Definition METMakerAlg.h:68
SG::WriteHandleKey< xAOD::MissingETContainer > m_metKey
Definition METMakerAlg.h:79
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition METMakerAlg.h:74
ToolHandle< IMETMaker > m_metmaker
Athena configured tools.
Definition METMakerAlg.h:86
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Definition METMakerAlg.h:88
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_metMapKey
Definition METMakerAlg.h:80
ToolHandle< IAsgPhotonIsEMSelector > m_photonSelIsEMTool
Definition METMakerAlg.h:90
SG::ReadHandleKey< xAOD::PhotonContainer > m_PhotonContainerKey
Definition METMakerAlg.h:72
SG::ReadHandleKey< xAOD::JetContainer > m_JetContainerKey
Definition METMakerAlg.h:75
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelLHTool
Definition METMakerAlg.h:89
ToolHandle< TauAnalysisTools::ITauSelectionTool > m_tauSelTool
Definition METMakerAlg.h:91
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition METMakerAlg.h:71
SG::ReadHandleKey< xAOD::MissingETContainer > m_CoreMetKey
Definition METMakerAlg.h:77

◆ ~METMakerAlg()

met::METMakerAlg::~METMakerAlg ( )
virtualdefault

Destructor:

◆ METMakerAlg() [2/2]

met::METMakerAlg::METMakerAlg ( )
protected

Default constructor:

Member Function Documentation

◆ accept() [1/4]

bool met::METMakerAlg::accept ( const xAOD::Electron * el)
protectedvirtual

Definition at line 286 of file METMakerAlg.cxx.

287 {
288 if( fabs(el->eta())>2.47 || el->pt()<10e3 ) return false;
289 return static_cast<bool> (m_elecSelLHTool->accept(el));
290 }

◆ accept() [2/4]

bool met::METMakerAlg::accept ( const xAOD::Muon * muon)
protectedvirtual

Definition at line 280 of file METMakerAlg.cxx.

281 {
282 if( mu->pt()<2.5e3 || mu->pt()/cosh(mu->eta())<4e3 ) return false;
283 return static_cast<bool>(m_muonSelTool->accept(*mu));
284 }

◆ accept() [3/4]

bool met::METMakerAlg::accept ( const xAOD::Photon * ph)
protectedvirtual

Definition at line 292 of file METMakerAlg.cxx.

293 {
294 if( !(ph->author()&20) || fabs(ph->eta())>2.47 || ph->pt()<10e3 ) return false;
295 return static_cast<bool> (m_photonSelIsEMTool->accept(ph));
296 }
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition Egamma_v1.cxx:66
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition Egamma_v1.cxx:71
uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const
Get author.

◆ accept() [4/4]

bool met::METMakerAlg::accept ( const xAOD::TauJet * tau)
protectedvirtual

Definition at line 298 of file METMakerAlg.cxx.

299 {
300 // std::cout<<"Just checking this works -> tau pt is "<<tau->pt()<<std::endl;
301
302 return static_cast<bool>(m_tauSelTool->accept( *tau ));
303 }

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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 met::METMakerAlg::execute ( )
overridevirtual

MET

Jets

Electrons

Photons

Taus

Muons

Definition at line 120 of file METMakerAlg.cxx.

120 {
121 ATH_MSG_VERBOSE("Executing " << name() << "...");
122
123 // Create a MissingETContainer with its aux store
124 auto ctx = getContext();
125 auto metHandle= SG::makeHandle (m_metKey,ctx);
126 ATH_CHECK( metHandle.record (std::make_unique<xAOD::MissingETContainer>(), std::make_unique<xAOD::MissingETAuxContainer>()) );
127 xAOD::MissingETContainer* newMet=metHandle.ptr();
128
129 SG::ReadHandle<xAOD::MissingETAssociationMap> metMap(m_metMapKey);
130 if (!metMap.isValid()) {
131 ATH_MSG_WARNING("Unable to retrieve MissingETAssociationMap: " << m_metMapKey.key());
132 return StatusCode::FAILURE;
133 }
134
135 MissingETAssociationHelper metHelper(&(*metMap));
136 // Retrieve containers ***********************************************
137
139 SG::ReadHandle<xAOD::MissingETContainer> coreMet(m_CoreMetKey);
140 if (!coreMet.isValid()) {
141 ATH_MSG_WARNING("Unable to retrieve MissingETContainer: " << m_CoreMetKey.key());
142 return StatusCode::FAILURE;
143 }
144
145
147 SG::ReadHandle<xAOD::JetContainer> Jets(m_JetContainerKey);
148 if (!Jets.isValid()) {
149 ATH_MSG_WARNING("Unable to retrieve JetContainer: " << Jets.key());
150 return StatusCode::FAILURE;
151 }
152
154 SG::ReadHandle<xAOD::ElectronContainer> Electrons(m_ElectronContainerKey);
155 if (!Electrons.isValid()) {
156 ATH_MSG_WARNING("Unable to retrieve ElectronContainer: " << Electrons.key());
157 return StatusCode::FAILURE;
158 }
159
161 SG::ReadHandle<xAOD::PhotonContainer> Gamma(m_PhotonContainerKey);
162 if (!Gamma.isValid()) {
163 ATH_MSG_WARNING("Unable to retrieve GammaContainer: " << Gamma.key());
164 return StatusCode::FAILURE;
165 }
166
168 SG::ReadHandle<xAOD::TauJetContainer> TauJets(m_TauJetContainerKey);
169 if (!TauJets.isValid()) {
170 ATH_MSG_WARNING("Unable to retrieve TauJetContainer: " << TauJets.key());
171 return StatusCode::FAILURE;
172 }
173
175 SG::ReadHandle<xAOD::MuonContainer> Muons(m_MuonContainerKey);
176 if (!Muons.isValid()) {
177 ATH_MSG_WARNING("Unable to retrieve MuonContainer: " << Muons.key());
178 return StatusCode::FAILURE;
179 }
180
181 // Select and flag objects for final MET building ***************************
182
185 // Electrons
186 if(!m_ElectronContainerKey.empty()) {
187 ConstDataVector<ElectronContainer> metElectrons(SG::VIEW_ELEMENTS);
188 for(const auto *const el : *Electrons) {
189 if(accept(el)) {
190 metElectrons.push_back(el);
191
192 }
193 }
194 if( m_metmaker->rebuildMET("RefEle", xAOD::Type::Electron, newMet,
195 metElectrons.asDataVector(),
196 metHelper, objScale).isFailure() ) {
197 ATH_MSG_WARNING("Failed to build electron term.");
198 }
199 ATH_MSG_DEBUG("Selected " << metElectrons.size() << " MET electrons. "
200 << acc_constitObjLinks(*(*newMet)["RefEle"]).size() << " are non-overlapping.");
201 }
202
203 // Photons
204 if(!m_PhotonContainerKey.empty()) {
205 ConstDataVector<PhotonContainer> metPhotons(SG::VIEW_ELEMENTS);
206 for(const auto *const ph : *Gamma) {
207 if(accept(ph)) {
208 metPhotons.push_back(ph);
209 }
210 }
211 if( m_metmaker->rebuildMET("RefGamma", xAOD::Type::Photon, newMet,
212 metPhotons.asDataVector(),
213 metHelper, objScale).isFailure() ) {
214 ATH_MSG_WARNING("Failed to build photon term.");
215 }
216 ATH_MSG_DEBUG("Selected " << metPhotons.size() << " MET photons. "
217 << acc_constitObjLinks(*(*newMet)["RefGamma"]).size() << " are non-overlapping.");
218 }
219
220 // Taus
221 if(!m_TauJetContainerKey.empty()) {
222 ConstDataVector<TauJetContainer> metTaus(SG::VIEW_ELEMENTS);
223 for(const auto *const tau : *TauJets) {
224 if(accept(tau)) {
225 metTaus.push_back(tau);
226 }
227 }
228 if( m_metmaker->rebuildMET("RefTau", xAOD::Type::Tau, newMet,
229 metTaus.asDataVector(),
230 metHelper, objScale).isFailure() ){
231 ATH_MSG_WARNING("Failed to build tau term.");
232 }
233 ATH_MSG_DEBUG("Selected " << metTaus.size() << " MET taus. "
234 << acc_constitObjLinks(*(*newMet)["RefTau"]).size() << " are non-overlapping.");
235 }
236
237 // Muons
238 if(!m_MuonContainerKey.empty()) {
239 ConstDataVector<MuonContainer> metMuons(SG::VIEW_ELEMENTS);
240 for(const auto *const mu : *Muons) {
241 if(accept(mu)) {
242 metMuons.push_back(mu);
243 }
244 }
245
247 if( m_metmaker->rebuildMET("Muons", xAOD::Type::Muon, newMet,
248 metMuons.asDataVector(),
249 metHelper, objScale).isFailure() ) {
250 ATH_MSG_WARNING("Failed to build muon term.");
251 }
252 ATH_MSG_DEBUG("Selected " << metMuons.size() << " MET muons. "
253 << acc_constitObjLinks(*(*newMet)["Muons"]).size() << " are non-overlapping.");
254 }
255
256 if( m_metmaker->rebuildJetMET("RefJet", m_softclname, m_softtrkname, newMet,
257 Jets.cptr(), coreMet.cptr(), metHelper, false ).isFailure() ) {
258 ATH_MSG_WARNING("Failed to build jet and soft terms.");
259 }
260 ATH_MSG_DEBUG("Of " << Jets.cptr()->size() << " jets, "
261 << acc_constitObjLinks(*(*newMet)["RefJet"]).size() << " are non-overlapping, "
262 << acc_constitObjLinks(*(*newMet)[m_softtrkname]).size() << " are soft");
263
265 if((*newMet)[m_softtrkname]) trksource = (*newMet)[m_softtrkname]->source();
266 if( buildMETSum("FinalTrk", newMet, trksource).isFailure() ){
267 ATH_MSG_WARNING("Building MET FinalTrk sum failed.");
268 }
270 if((*newMet)[m_softclname]) clsource = (*newMet)[m_softclname]->source();
271 if( buildMETSum("FinalClus", newMet, clsource).isFailure() ) {
272 ATH_MSG_WARNING("Building MET FinalClus sum failed.");
273 }
274
275 return StatusCode::SUCCESS;
276 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
virtual bool accept(const xAOD::Electron *el)
uint64_t bitmask_t
Type for status word bit mask.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
static const SG::AuxElement::ConstAccessor< std::vector< iplink_t > > acc_constitObjLinks("ConstitObjectLinks")
@ Photon
The object is a photon.
Definition ObjectType.h:47
@ Muon
The object is a muon.
Definition ObjectType.h:48
@ Electron
The object is an electron.
Definition ObjectType.h:46
@ Tau
The object is a tau (jet)
Definition ObjectType.h:49
@ LCTopo
Indicator for MET contribution from TopoClusters with LCW calibration applied.
@ Track
Indicator for MET contribution from reconstructed charged particle tracks.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode met::METMakerAlg::finalize ( )
overridevirtual

Definition at line 113 of file METMakerAlg.cxx.

113 {
114 ATH_MSG_INFO ("Finalizing " << name() << "...");
115 return StatusCode::SUCCESS;
116 }
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode met::METMakerAlg::initialize ( )
overridevirtual

Athena algorithm's Hooks.

Definition at line 70 of file METMakerAlg.cxx.

70 {
71 ATH_MSG_INFO("Initializing " << name() << "...");
72 ATH_MSG_INFO("Retrieving tools...");
73
74 // retrieve tools
75 if( m_metmaker.retrieve().isFailure() ) {
76 ATH_MSG_ERROR("Failed to retrieve tool: " << m_metmaker->name());
77 return StatusCode::FAILURE;
78 };
79
80 if( m_muonSelTool.retrieve().isFailure() ) {
81 ATH_MSG_ERROR("Failed to retrieve tool: " << m_muonSelTool->name());
82 return StatusCode::FAILURE;
83 };
84
85 if( m_elecSelLHTool.retrieve().isFailure() ) {
86 ATH_MSG_ERROR("Failed to retrieve tool: " << m_elecSelLHTool->name());
87 return StatusCode::FAILURE;
88 };
89
90 if( m_photonSelIsEMTool.retrieve().isFailure() ) {
91 ATH_MSG_ERROR("Failed to retrieve tool: " << m_photonSelIsEMTool->name());
92 return StatusCode::FAILURE;
93 };
94
95 if( m_tauSelTool.retrieve().isFailure() ) {
96 ATH_MSG_ERROR("Failed to retrieve tool: " << m_tauSelTool->name());
97 return StatusCode::FAILURE;
98 };
99 ATH_CHECK( m_ElectronContainerKey.initialize() );
100 ATH_CHECK( m_PhotonContainerKey.initialize() );
101 ATH_CHECK( m_TauJetContainerKey.initialize() );
102 ATH_CHECK( m_MuonContainerKey.initialize() );
103 ATH_CHECK( m_JetContainerKey.initialize() );
104 ATH_CHECK( m_CoreMetKey.initialize() );
105 ATH_CHECK( m_metKey.initialize() );
106 ATH_CHECK( m_metMapKey.initialize() );
107
108 return StatusCode::SUCCESS;
109 }
#define ATH_MSG_ERROR(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_CoreMetKey

SG::ReadHandleKey<xAOD::MissingETContainer> met::METMakerAlg::m_CoreMetKey
protected

Definition at line 77 of file METMakerAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doTruthLep

bool met::METMakerAlg::m_doTruthLep
protected

Definition at line 83 of file METMakerAlg.h.

◆ m_elecSelLHTool

ToolHandle<IAsgElectronLikelihoodTool> met::METMakerAlg::m_elecSelLHTool
protected

Definition at line 89 of file METMakerAlg.h.

◆ m_ElectronContainerKey

SG::ReadHandleKey<xAOD::ElectronContainer> met::METMakerAlg::m_ElectronContainerKey
protected

Definition at line 71 of file METMakerAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_JetContainerKey

SG::ReadHandleKey<xAOD::JetContainer> met::METMakerAlg::m_JetContainerKey
protected

Definition at line 75 of file METMakerAlg.h.

◆ m_metKey

SG::WriteHandleKey<xAOD::MissingETContainer> met::METMakerAlg::m_metKey
protected

Definition at line 79 of file METMakerAlg.h.

◆ m_metmaker

ToolHandle<IMETMaker> met::METMakerAlg::m_metmaker
protected

Athena configured tools.

Definition at line 86 of file METMakerAlg.h.

◆ m_metMapKey

SG::ReadHandleKey<xAOD::MissingETAssociationMap> met::METMakerAlg::m_metMapKey
protected

Definition at line 80 of file METMakerAlg.h.

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> met::METMakerAlg::m_MuonContainerKey
protected

Definition at line 74 of file METMakerAlg.h.

◆ m_muonSelTool

ToolHandle<CP::IMuonSelectionTool> met::METMakerAlg::m_muonSelTool
protected

Definition at line 88 of file METMakerAlg.h.

◆ m_PhotonContainerKey

SG::ReadHandleKey<xAOD::PhotonContainer> met::METMakerAlg::m_PhotonContainerKey
protected

Definition at line 72 of file METMakerAlg.h.

◆ m_photonSelIsEMTool

ToolHandle<IAsgPhotonIsEMSelector> met::METMakerAlg::m_photonSelIsEMTool
protected

Definition at line 90 of file METMakerAlg.h.

◆ m_softclname

std::string met::METMakerAlg::m_softclname
protected

Definition at line 67 of file METMakerAlg.h.

◆ m_softtrkname

std::string met::METMakerAlg::m_softtrkname
protected

Definition at line 68 of file METMakerAlg.h.

◆ m_TauJetContainerKey

SG::ReadHandleKey<xAOD::TauJetContainer> met::METMakerAlg::m_TauJetContainerKey
protected

Definition at line 73 of file METMakerAlg.h.

◆ m_tauSelTool

ToolHandle<TauAnalysisTools::ITauSelectionTool> met::METMakerAlg::m_tauSelTool
protected

Definition at line 91 of file METMakerAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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