ATLAS Offline Software
Loading...
Searching...
No Matches
MetadataAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef JETTAGDERIVATIONUTILS_METADATAALG_H
6#define JETTAGDERIVATIONUTILS_METADATAALG_H
7
9#include "GaudiKernel/ServiceHandle.h"
10#include "GaudiKernel/IIncidentListener.h"
15
17
18#include <set>
19#include <string>
20
21namespace ftag {
22
23 class MetadataAlg final :
24 public AthAlgorithm,
25 public IIncidentListener
26 {
27 public:
28 MetadataAlg(const std::string& name, ISvcLocator* pSvcLocator);
29
30 StatusCode initialize() override;
31 StatusCode execute() override;
32 StatusCode finalize() override;
33
34 // hook to call this alg on each new input file
35 void handle(const Incident&) override;
36
37 private:
39
40 ToolHandle<PMGTools::IPMGTruthWeightTool> m_truthWeightTool {
41 this, "truthWeightTool", "PMGTools::PMGTruthWeightTool",
42 "the truth weight tool"};
44 this, "h5Output", "", "output file service"};
45 Gaudi::Property<std::string> m_json_output {
46 this, "jsonOutput", "", "json output file"
47 };
49 this, "h5OutputHists", "",
50 "output service for histogram output"};
51 Gaudi::Property<bool> m_enable_systematics {
52 this, "enableSystematics", true,
53 "include systematic variations (false = nominal only)"};
54 Gaudi::Property<std::set<std::string>> m_allowed_streams {
55 this, "allowedStreams",
56 {"StreamAOD", "StreamEVGEN", "StreamEVNT",
57 "StreamDAOD_PHYS", "StreamDAOD_PHYSLITE"},
58 "CutBookkeeper inputStream values accepted as AllExecutedEvents"
59 };
60 std::unordered_map<size_t, OriginalAodCounts> m_weights;
61
62 bool isGoodBook(const xAOD::CutBookkeeper& cbk) const;
63
64 };
65
66} // end namespace ftag
67
68#endif
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
ToolHandle< PMGTools::IPMGTruthWeightTool > m_truthWeightTool
Definition MetadataAlg.h:40
Gaudi::Property< bool > m_enable_systematics
Definition MetadataAlg.h:51
std::unordered_map< size_t, OriginalAodCounts > m_weights
Definition MetadataAlg.h:60
Gaudi::Property< std::set< std::string > > m_allowed_streams
Definition MetadataAlg.h:54
bool isGoodBook(const xAOD::CutBookkeeper &cbk) const
ServiceHandle< IH5GroupSvc > m_output_svc
Definition MetadataAlg.h:43
Gaudi::Property< std::string > m_json_output
Definition MetadataAlg.h:45
void handle(const Incident &) override
ServiceHandle< IH5GroupSvc > m_hist_output_svc
Definition MetadataAlg.h:48
StatusCode initialize() override
MetadataAlg(const std::string &name, ISvcLocator *pSvcLocator)
ServiceHandle< StoreGateSvc > m_inputMetaStore
Definition MetadataAlg.h:38
StatusCode execute() override
StatusCode finalize() override
CutBookkeeper_v1 CutBookkeeper
Define the latest version of the CutBookkeeper class.