ATLAS Offline Software
TruthMetaDataWriter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DERIVATIONFRAMEWORK_TRUTHMETADATAWRITER_H
6 #define DERIVATIONFRAMEWORK_TRUTHMETADATAWRITER_H
7 
11 
12 // Handles to services
13 #include "GaudiKernel/ServiceHandle.h"
15 
16 // Service for the metadata (tag info)
18 
19 // EDM classes - typedefs, so have to #include them
22 
23 // Standard library includes
24 #include <string>
25 #include <unordered_set>
26 
27 // Forward declarations
28 class IHepMCWeightSvc;
29 
30 namespace DerivationFramework {
31 
32  class ATLAS_NOT_THREAD_SAFE TruthMetaDataWriter : public extends<AthAlgTool, IAugmentationTool> {
33  // ^ meta-data handling in addBranches
34  public:
35  TruthMetaDataWriter(const std::string& t, const std::string& n, const IInterface* p);
37  virtual StatusCode initialize() override;
38  virtual StatusCode addBranches() const override;
39 
40  private:
46  xAOD::TruthMetaDataContainer* m_tmd = nullptr;
48  std::string m_metaName;
50  mutable std::unordered_set<uint32_t> m_existingMetaDataChan;
53  "TagInfoMgr", name()};
54  // ReadHandle key for EventInfo
55  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey {this, "EventInfoKey", "EventInfo", "EventInfo key"};
56 
57  };
58 }
59 
60 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
DerivationFramework::TruthMetaDataWriter::m_metaName
std::string m_metaName
SG key and name for meta data.
Definition: TruthMetaDataWriter.h:48
IHepMCWeightSvc
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
Definition: IHepMCWeightSvc.h:18
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
IAugmentationTool.h
initialize
void initialize()
Definition: run_EoverP.cxx:894
ITagInfoMgr.h
DerivationFramework::TruthMetaDataWriter::m_weightSvc
ServiceHandle< IHepMCWeightSvc > m_weightSvc
Service for retrieving the weight names.
Definition: TruthMetaDataWriter.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::EventInfo >
DerivationFramework::TruthMetaDataWriter::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
Definition: TruthMetaDataWriter.h:42
DerivationFramework::TruthMetaDataWriter
Definition: TruthMetaDataWriter.h:32
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
EventInfo.h
checker_macros.h
Define macros for attributes used to control the static checker.
TruthMetaDataContainer.h
DerivationFramework::TruthMetaDataWriter::m_existingMetaDataChan
std::unordered_set< uint32_t > m_existingMetaDataChan
Set for tracking the mc channels for which we already added meta data.
Definition: TruthMetaDataWriter.h:50
ServiceHandle< StoreGateSvc >