Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CountHepMC.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 XAOD_ANALYSIS
6 
7 #ifndef EVGENPRODTOOLS_COUNTHEPMC_H
8 #define EVGENPRODTOOLS_COUNTHEPMC_H
9 
13 #include "GaudiKernel/IIncidentListener.h"
14 
15 #include <cstdint>
16 
25 class CountHepMC : public GenBase,
26  public virtual IIncidentListener {
27 public:
28 
29  CountHepMC(const std::string& name, ISvcLocator* pSvcLocator);
30 
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute() override;
33  virtual StatusCode finalize() override;
34 
35  virtual void handle(const Incident& inc) override;
36 
37 private:
38 
40  "StoreGateSvc/MetaDataStore", name()};
43 
46 
47  bool m_corHepMC;
48  bool m_corEvtID;
51  std::string m_inputKeyName;
52 
53  SG::ReadHandleKey<xAOD::EventInfo> m_inputEvtInfoKey { this, "InputEventInfo", "TMPEvtInfo", "ReadHandleKey for Input xAOD::EventInfo" };
54  SG::WriteHandleKey<xAOD::EventInfo> m_outputEvtInfoKey{ this, "OutputEventInfo", "EventInfo", "WriteHandleKey for Output xAOD::EventInfo" };
55 
56  SG::ReadDecorHandleKey<xAOD::EventInfo> m_mcWeightsKey {this, "mcEventWeightsKey", "TMPEvtInfo.mcEventWeights", "Decoration for MC Event Weights"};
57 
58 };
59 
60 
61 #endif
62 
63 #endif
CountHepMC::m_nCount
uint64_t m_nCount
Definition: CountHepMC.h:42
CountHepMC::m_outputEvtInfoKey
SG::WriteHandleKey< xAOD::EventInfo > m_outputEvtInfoKey
Definition: CountHepMC.h:54
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CountHepMC::m_inputKeyName
std::string m_inputKeyName
Definition: CountHepMC.h:51
CountHepMC::handle
virtual void handle(const Incident &inc) override
Definition: CountHepMC.cxx:303
CountHepMC::CountHepMC
CountHepMC(const std::string &name, ISvcLocator *pSvcLocator)
Definition: CountHepMC.cxx:30
SG::ReadHandleKey< xAOD::EventInfo >
CountHepMC::m_corRunNumber
bool m_corRunNumber
Definition: CountHepMC.h:49
CountHepMC::execute
virtual StatusCode execute() override
Definition: CountHepMC.cxx:64
CountHepMC::initialize
virtual StatusCode initialize() override
Definition: CountHepMC.cxx:43
GenBase
Base class for common behaviour of MC truth algorithms.
Definition: GenBase.h:47
SG::WriteHandleKey< xAOD::EventInfo >
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CountHepMC::m_nPass
uint64_t m_nPass
Definition: CountHepMC.h:41
CountHepMC::m_newRunNumber
uint32_t m_newRunNumber
Definition: CountHepMC.h:45
GenBase.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo.h
CountHepMC::m_mcWeightsKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_mcWeightsKey
Definition: CountHepMC.h:56
CountHepMC
Count the number of events to pass all algorithms/filters.
Definition: CountHepMC.h:26
CountHepMC::m_inputEvtInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_inputEvtInfoKey
Definition: CountHepMC.h:53
CountHepMC::m_metaDataStore
ServiceHandle< StoreGateSvc > m_metaDataStore
Definition: CountHepMC.h:39
CountHepMC::finalize
virtual StatusCode finalize() override
Definition: CountHepMC.cxx:298
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
CountHepMC::m_copyRunNumber
bool m_copyRunNumber
Definition: CountHepMC.h:50
CountHepMC::m_corEvtID
bool m_corEvtID
Definition: CountHepMC.h:48
CountHepMC::m_corHepMC
bool m_corHepMC
Definition: CountHepMC.h:47
CountHepMC::m_firstEv
uint64_t m_firstEv
Definition: CountHepMC.h:44
ServiceHandle< StoreGateSvc >