ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::METRemappingAlg Class Reference

#include <METRemappingAlg.h>

Inheritance diagram for DerivationFramework::METRemappingAlg:

Public Member Functions

 METRemappingAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~METRemappingAlg ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
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
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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 std::map< const xAOD::IParticle *, ElementLink< xAOD::IParticleContainer > > linkMap_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

template<typename handle_t>
StatusCode fillLinkMap (linkMap_t &map, handle_t &handle)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::JetContainerm_jetContKey {this, "JetCollectionKey", "AnalysisJets", "SG key for the analysis jets collection"}
SG::ReadHandleKey< xAOD::PhotonContainerm_photonContKey {this, "PhotonCollectionKey", "AnalysisPhotons", "SG key for the analysis photons collection"}
SG::ReadHandleKey< xAOD::ElectronContainerm_electronContKey {this, "ElectronCollectionKey", "AnalysisElectrons", "SG key for the analysis electrons collection"}
SG::ReadHandleKey< xAOD::MuonContainerm_muonContKey {this, "MuonCollectionKey", "AnalysisMuons", "SG key for the analysis muons collection"}
SG::ReadHandleKey< xAOD::TauJetContainerm_tauContKey {this, "TauCollectionKey", "AnalysisTauJets", "SG key for the analysis tau jets collection"}
SG::ReadHandleKey< xAOD::MissingETAssociationMapm_inputMapKey {this, "AssociationInputKey", "METAssoc_AntiKt4EMPFlow", "SG key for the input MissingETAssociationMap"}
SG::ReadHandleKey< xAOD::MissingETContainerm_inputCoreKey {this, "METCoreInputKey", "MET_Core_AntiKt4EMPFlow", "SG key for the input MET core container"}
SG::WriteHandleKey< xAOD::MissingETAssociationMapm_outputMapKey {this, "AssociationOutputKey", "METAssoc_AnalysisMET", "SG key for the output MissingETAssociationMap"}
SG::WriteHandleKey< xAOD::MissingETContainerm_outputCoreKey {this, "METCoreOutputKey", "MET_Core_AnalysisMET", "SG key for the output MET core container"}
const SG::AuxElement::ConstAccessor< ElementLink< xAOD::IParticleContainer > > m_accOriginalObject {"originalObjectLink"}
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

Definition at line 31 of file METRemappingAlg.h.

Member Typedef Documentation

◆ linkMap_t

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ METRemappingAlg()

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

Definition at line 13 of file METRemappingAlg.cxx.

13 :
14 AthAlgorithm(name, pSvcLocator)
15 {
16
17 }
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~METRemappingAlg()

virtual DerivationFramework::METRemappingAlg::~METRemappingAlg ( )
virtualdefault

Member Function Documentation

◆ 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 DerivationFramework::METRemappingAlg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 37 of file METRemappingAlg.cxx.

38 {
39 ATH_MSG_VERBOSE("METRemappingAlg::execute()");
40
41
42 SG::ReadHandle<xAOD::JetContainer> jetContHandle(m_jetContKey, ctx);
43 if( !jetContHandle.isValid() ) {
44 ATH_MSG_ERROR("Unable to retrieve input jet container " << m_jetContKey.key());
45 return StatusCode::FAILURE;
46 }
47
48 // first iterate through the AnalysisJets container and populate a map
49 // that links original Jet objects to their calibrated counterparts
50 std::map<const xAOD::Jet*, ElementLink<xAOD::JetContainer> > jetLinkMap;
51 for( const xAOD::IParticle *j : *jetContHandle ) {
52 if( !m_accOriginalObject.isAvailable(*j) ) {
53 ATH_MSG_ERROR("originalObjectLink not available!");
54 return StatusCode::FAILURE;
55 }
56 const xAOD::IParticle *orig = *m_accOriginalObject(*j);
57 ElementLink<xAOD::JetContainer> link(*jetContHandle, j->index());
58 jetLinkMap.try_emplace(
59 static_cast<const xAOD::Jet*>(orig),
60 link
61 );
62 }
63
64 // repeat for Photon/Electron/Muon/Tau containers
65 linkMap_t objectLinkMap;
66 SG::ReadHandle<xAOD::PhotonContainer> photonContHandle(m_photonContKey, ctx);
67 ATH_CHECK( fillLinkMap(objectLinkMap, photonContHandle) );
68
69 SG::ReadHandle<xAOD::ElectronContainer> electronContHandle(m_electronContKey, ctx);
70 ATH_CHECK( fillLinkMap(objectLinkMap, electronContHandle) );
71
72 SG::ReadHandle<xAOD::MuonContainer> muonContHandle(m_muonContKey, ctx);
73 ATH_CHECK( fillLinkMap(objectLinkMap, muonContHandle) );
74
75 SG::ReadHandle<xAOD::TauJetContainer> tauContHandle(m_tauContKey, ctx);
76 ATH_CHECK( fillLinkMap(objectLinkMap, tauContHandle) );
77
78 // now retrieve and iterate through the METmap from PHYS and
79 // use its contents as a baseline to populate our own
80 SG::ReadHandle<xAOD::MissingETAssociationMap> inputMapHandle(m_inputMapKey, ctx);
81 if( !inputMapHandle.isValid() ) {
82 ATH_MSG_ERROR("Unable to retrieve input MissingETAssociationMap " << m_inputMapKey.key());
83 return StatusCode::FAILURE;
84 }
85
86 SG::WriteHandle<xAOD::MissingETAssociationMap> outputMapHandle = SG::makeHandle(m_outputMapKey, ctx);
87 ATH_CHECK( outputMapHandle.record(
88 std::make_unique<xAOD::MissingETAssociationMap>(),
89 std::make_unique<xAOD::MissingETAuxAssociationMap>()
90 ));
91 ATH_CHECK( outputMapHandle.isValid() );
92
93 const ElementLink<xAOD::IParticleContainer> invalidLink;
94 for( const xAOD::MissingETAssociation *el : *inputMapHandle ) {
95 // copy constructor creates a deep copy
96 auto assoc = outputMapHandle->push_back(new xAOD::MissingETAssociation(*el));
97
98 if( !assoc->isMisc() ) {
99 // check if the reference jet has a calibrated equivalent that should be linked to instead
100 std::map<const xAOD::Jet*, ElementLink<xAOD::JetContainer> >::const_iterator jet_it = jetLinkMap.find(assoc->refJet());
101 if( jet_it != jetLinkMap.end() ) {
102 // relink to calibrated jet
103 assoc->setJetLink(jet_it->second);
104
105 // update objectLinks for this association
107 for( const ElementLink<xAOD::IParticleContainer> &link : assoc->objectLinks() ) {
108 if( !link.isValid() ) {
109 objectLinks.push_back(invalidLink);
110 continue;
111 }
112
113 linkMap_t::const_iterator obj_it = objectLinkMap.find(*link);
114 if( obj_it != objectLinkMap.end() ) {
115 objectLinks.emplace_back(obj_it->second);
116 } else {
117 // objects that aren't found in the map were selected away,
118 // but we should leave an invalid link to maintain index order
119 objectLinks.push_back(invalidLink);
120 }
121 }
122 assoc->setObjectLinks(objectLinks);
123
124 } else { // jet_it == jetLinkMap.end()
125 // jet was selected away - this case should not happen, just give an error for now
126 ATH_MSG_ERROR("Jet not found!");
127 return StatusCode::FAILURE;
128 }
129 } else { // assoc->isMisc() == true
130 // update links in the misc association
132 for( const ElementLink<xAOD::IParticleContainer> &link : assoc->objectLinks() ) {
133 if( !link.isValid() ) {
134 miscObjectLinks.push_back(invalidLink);
135 continue;
136 }
137
138 linkMap_t::const_iterator obj_it = objectLinkMap.find(*link);
139 if( obj_it != objectLinkMap.end() ) {
140 miscObjectLinks.emplace_back(obj_it->second);
141 } else {
142 miscObjectLinks.push_back(invalidLink);
143 }
144 }
145 assoc->setObjectLinks(miscObjectLinks);
146 }
147 } //> end loop over METmap
148
149 // copy over the MET core container
150 SG::ReadHandle<xAOD::MissingETContainer> inputCoreHandle(m_inputCoreKey, ctx);
151 if( !inputCoreHandle.isValid() ) {
152 ATH_MSG_ERROR("Unable to retrieve input MET core container " << m_inputCoreKey.key());
153 return StatusCode::FAILURE;
154 }
155
156 SG::WriteHandle<xAOD::MissingETContainer> outputCoreHandle = SG::makeHandle(m_outputCoreKey, ctx);
157 ATH_CHECK( outputCoreHandle.record(
158 std::make_unique<xAOD::MissingETContainer>(),
159 std::make_unique<xAOD::MissingETAuxContainer>()
160 ));
161 ATH_CHECK( outputCoreHandle.isValid() );
162
163 for( const xAOD::MissingET *el : *inputCoreHandle ) {
164 outputCoreHandle->push_back(new xAOD::MissingET(*el));
165 }
166
167 return StatusCode::SUCCESS;
168 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
const SG::AuxElement::ConstAccessor< ElementLink< xAOD::IParticleContainer > > m_accOriginalObject
SG::WriteHandleKey< xAOD::MissingETAssociationMap > m_outputMapKey
SG::ReadHandleKey< xAOD::MissingETContainer > m_inputCoreKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetContKey
SG::WriteHandleKey< xAOD::MissingETContainer > m_outputCoreKey
StatusCode fillLinkMap(linkMap_t &map, handle_t &handle)
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauContKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContKey
std::map< const xAOD::IParticle *, ElementLink< xAOD::IParticleContainer > > linkMap_t
SG::ReadHandleKey< xAOD::MissingETAssociationMap > m_inputMapKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonContKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< objlink_t > objlink_vector_t
Vector of object links type.
pointer & link(pointer p) const
Return a reference to the link for an element.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
Jet_v1 Jet
Definition of the current "jet version".
MissingETAssociation_v1 MissingETAssociation
Version control by type definition.
MissingET_v1 MissingET
Version control by type defintion.

◆ 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 & AthCommonAlgorithm< 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 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ fillLinkMap()

template<typename handle_t>
StatusCode DerivationFramework::METRemappingAlg::fillLinkMap ( linkMap_t & map,
handle_t & handle )
private

Definition at line 171 of file METRemappingAlg.cxx.

172 {
173 if( !handle.isValid() ) {
174 ATH_MSG_ERROR("Unable to retrieve " << handle.key());
175 return StatusCode::FAILURE;
176 }
177
178 for( const xAOD::IParticle *obj : *handle ) {
179 if( !m_accOriginalObject.isAvailable(*obj) ) {
180 ATH_MSG_ERROR("originalObjectLink not available!");
181 return StatusCode::FAILURE;
182 }
183 const xAOD::IParticle *orig = *m_accOriginalObject(*obj);
184 ElementLink<xAOD::IParticleContainer> link(*handle,obj->index());
185 map.try_emplace(orig, link);
186 }
187 return StatusCode::SUCCESS;
188 }
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode DerivationFramework::METRemappingAlg::initialize ( )
overridevirtual

Definition at line 19 of file METRemappingAlg.cxx.

20 {
21 ATH_MSG_VERBOSE("METRemappingAlg::initialize()");
22
23 ATH_CHECK( m_jetContKey.initialize() );
24 ATH_CHECK( m_photonContKey.initialize() );
25 ATH_CHECK( m_electronContKey.initialize() );
26 ATH_CHECK( m_muonContKey.initialize() );
27 ATH_CHECK( m_tauContKey.initialize() );
28
29 ATH_CHECK( m_inputMapKey.initialize() );
30 ATH_CHECK( m_inputCoreKey.initialize() );
31 ATH_CHECK( m_outputMapKey.initialize() );
32 ATH_CHECK( m_outputCoreKey.initialize() );
33
34 return StatusCode::SUCCESS;
35 }

◆ 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()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
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_accOriginalObject

const SG::AuxElement::ConstAccessor< ElementLink<xAOD::IParticleContainer> > DerivationFramework::METRemappingAlg::m_accOriginalObject {"originalObjectLink"}
private

Definition at line 53 of file METRemappingAlg.h.

53{"originalObjectLink"};

◆ 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_electronContKey

SG::ReadHandleKey<xAOD::ElectronContainer> DerivationFramework::METRemappingAlg::m_electronContKey {this, "ElectronCollectionKey", "AnalysisElectrons", "SG key for the analysis electrons collection"}
private

Definition at line 45 of file METRemappingAlg.h.

45{this, "ElectronCollectionKey", "AnalysisElectrons", "SG key for the analysis electrons collection"};

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_inputCoreKey

SG::ReadHandleKey<xAOD::MissingETContainer> DerivationFramework::METRemappingAlg::m_inputCoreKey {this, "METCoreInputKey", "MET_Core_AntiKt4EMPFlow", "SG key for the input MET core container"}
private

Definition at line 49 of file METRemappingAlg.h.

49{this, "METCoreInputKey", "MET_Core_AntiKt4EMPFlow", "SG key for the input MET core container"};

◆ m_inputMapKey

SG::ReadHandleKey<xAOD::MissingETAssociationMap> DerivationFramework::METRemappingAlg::m_inputMapKey {this, "AssociationInputKey", "METAssoc_AntiKt4EMPFlow", "SG key for the input MissingETAssociationMap"}
private

Definition at line 48 of file METRemappingAlg.h.

48{this, "AssociationInputKey", "METAssoc_AntiKt4EMPFlow", "SG key for the input MissingETAssociationMap"};

◆ m_jetContKey

SG::ReadHandleKey<xAOD::JetContainer> DerivationFramework::METRemappingAlg::m_jetContKey {this, "JetCollectionKey", "AnalysisJets", "SG key for the analysis jets collection"}
private

Definition at line 43 of file METRemappingAlg.h.

43{this, "JetCollectionKey", "AnalysisJets", "SG key for the analysis jets collection"};

◆ m_muonContKey

SG::ReadHandleKey<xAOD::MuonContainer> DerivationFramework::METRemappingAlg::m_muonContKey {this, "MuonCollectionKey", "AnalysisMuons", "SG key for the analysis muons collection"}
private

Definition at line 46 of file METRemappingAlg.h.

46{this, "MuonCollectionKey", "AnalysisMuons", "SG key for the analysis muons collection"};

◆ m_outputCoreKey

SG::WriteHandleKey<xAOD::MissingETContainer> DerivationFramework::METRemappingAlg::m_outputCoreKey {this, "METCoreOutputKey", "MET_Core_AnalysisMET", "SG key for the output MET core container"}
private

Definition at line 51 of file METRemappingAlg.h.

51{this, "METCoreOutputKey", "MET_Core_AnalysisMET", "SG key for the output MET core container"};

◆ m_outputMapKey

SG::WriteHandleKey<xAOD::MissingETAssociationMap> DerivationFramework::METRemappingAlg::m_outputMapKey {this, "AssociationOutputKey", "METAssoc_AnalysisMET", "SG key for the output MissingETAssociationMap"}
private

Definition at line 50 of file METRemappingAlg.h.

50{this, "AssociationOutputKey", "METAssoc_AnalysisMET", "SG key for the output MissingETAssociationMap"};

◆ m_photonContKey

SG::ReadHandleKey<xAOD::PhotonContainer> DerivationFramework::METRemappingAlg::m_photonContKey {this, "PhotonCollectionKey", "AnalysisPhotons", "SG key for the analysis photons collection"}
private

Definition at line 44 of file METRemappingAlg.h.

44{this, "PhotonCollectionKey", "AnalysisPhotons", "SG key for the analysis photons collection"};

◆ m_tauContKey

SG::ReadHandleKey<xAOD::TauJetContainer> DerivationFramework::METRemappingAlg::m_tauContKey {this, "TauCollectionKey", "AnalysisTauJets", "SG key for the analysis tau jets collection"}
private

Definition at line 47 of file METRemappingAlg.h.

47{this, "TauCollectionKey", "AnalysisTauJets", "SG key for the analysis tau jets collection"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ 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: