ATLAS Offline Software
MergeCalibHitsTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MCTRUTHSIMALGS_MERGECALIBHITSTOOL_H
6 #define MCTRUTHSIMALGS_MERGECALIBHITSTOOL_H
7 
9 
10 #include "GaudiKernel/ServiceHandle.h"
12 
13 #include <vector>
14 #include <string>
15 
17 
26 public:
27  MergeCalibHitsTool(const std::string& type,
28  const std::string& name,
29  const IInterface* parent);
31  virtual StatusCode initialize() override final;
34  virtual StatusCode prepareEvent(const EventContext& ctx, unsigned int nInputEvents) override final;
37  virtual StatusCode mergeEvent(const EventContext& ctx) override final;
40  virtual StatusCode processBunchXing(int bunchXing,
41  SubEventIterator bSubEvents,
42  SubEventIterator eSubEvents) override final;
45  // virtual bool toProcess(int bunchXing) const;
46 
50  virtual StatusCode processAllSubEvents(const EventContext& ctx) override final;
51 
52 private:
53  Gaudi::Property<bool> m_oldFormat{this, "OldFormat", false, ""};
54  ServiceHandle<PileUpMergeSvc> m_pMergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc", ""};
55  bool m_firstSubEvent{true};
56  std::vector<CaloCalibrationHitContainer*> m_outputContainers;//FIXME hardcoded size
57  std::vector<std::string> m_CalibrationHitContainer;
58 };
59 #endif //MCTRUTHSIMALGS_MERGECALIBHITSTOOL_H
MergeCalibHitsTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the subevts loop.
Definition: MergeCalibHitsTool.cxx:113
CaloCalibrationHitContainer
Definition: CaloCalibrationHitContainer.h:25
MergeCalibHitsTool::m_pMergeSvc
ServiceHandle< PileUpMergeSvc > m_pMergeSvc
Definition: MergeCalibHitsTool.h:54
MergeCalibHitsTool::m_outputContainers
std::vector< CaloCalibrationHitContainer * > m_outputContainers
Definition: MergeCalibHitsTool.h:56
MergeCalibHitsTool::initialize
virtual StatusCode initialize() override final
called before the event loop
Definition: MergeCalibHitsTool.cxx:17
MergeCalibHitsTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase...
Definition: MergeCalibHitsTool.cxx:124
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MergeCalibHitsTool::m_firstSubEvent
bool m_firstSubEvent
Definition: MergeCalibHitsTool.h:55
PileUpToolBase
Definition: PileUpToolBase.h:18
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MergeCalibHitsTool::MergeCalibHitsTool
MergeCalibHitsTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MergeCalibHitsTool.cxx:10
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
MergeCalibHitsTool
an algorithm to copy in the overlayed store the calib hits from the signal event
Definition: MergeCalibHitsTool.h:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MergeCalibHitsTool::m_oldFormat
Gaudi::Property< bool > m_oldFormat
Definition: MergeCalibHitsTool.h:53
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
MergeCalibHitsTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int nInputEvents) override final
called before the subevts loop.
Definition: MergeCalibHitsTool.cxx:45
MergeCalibHitsTool::m_CalibrationHitContainer
std::vector< std::string > m_CalibrationHitContainer
Definition: MergeCalibHitsTool.h:57
ServiceHandle< PileUpMergeSvc >
MergeCalibHitsTool::processBunchXing
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
called for each active bunch-crossing to process current SubEvents bunchXing is in ns
Definition: MergeCalibHitsTool.cxx:57