ATLAS Offline Software
Loading...
Searching...
No Matches
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// Service for the weights
21
22// EDM classes - typedefs, so have to #include them
25
26// Standard library includes
27#include <string>
28#include <unordered_set>
29
30// Forward declarations
31class IHepMCWeightSvc;
32
33namespace DerivationFramework {
34
35 class ATLAS_NOT_THREAD_SAFE TruthMetaDataWriter : public extends<AthAlgTool, IAugmentationTool> {
36 // ^ meta-data handling in addBranches
37 public:
38
39 using base_class::base_class;
40
41 virtual StatusCode initialize() override final;
42 virtual StatusCode addBranches(const EventContext& ctx) const override final;
43
44 private:
46 ServiceHandle< StoreGateSvc > m_metaStore{this, "MetaDataStore", "MetaDataStore"};
48 ServiceHandle< IHepMCWeightSvc > m_weightSvc{this, "HepMCWeightSvc", "HepMCWeightSvc/HepMCWeightSvc"};
52 Gaudi::Property<std::string> m_metaName{this, "MetaObjectName", "TruthMetaData"}; // FIXME WriteHandle???
54 mutable std::unordered_set<uint32_t> m_existingMetaDataChan;
57 "TagInfoMgr", name()};
58 // ReadHandle key for EventInfo
59 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey {this, "EventInfoKey", "EventInfo", "EventInfo key"};
60
61 };
62}
63
64#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
xAOD::TruthMetaDataContainer * m_tmd
The meta data container to be written out.
std::unordered_set< uint32_t > m_existingMetaDataChan
Set for tracking the mc channels for which we already added meta data.
ServiceHandle< IHepMCWeightSvc > m_weightSvc
Service for retrieving the weight names.
ServiceHandle< ITagInfoMgr > m_tagInfoMgr
TagInfoMgr to get information out of /TagInfo.
Gaudi::Property< std::string > m_metaName
SG key and name for meta data.
virtual StatusCode addBranches(const EventContext &ctx) const override final
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
Property holding a SG store/key/clid from which a ReadHandle is made.
THE reconstruction tool.
TruthMetaDataContainer_v1 TruthMetaDataContainer
Declare the latest version of the truth vertex container.
void initialize()