ATLAS Offline Software
MergeTrackRecordCollTool.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_MERGETRACKRECORDCOLLTOOL_H
6 #define MCTRUTHSIMALGS_MERGETRACKRECORDCOLLTOOL_H
7 
10 
11 #include "Gaudi/Property.h"
12 #include "GaudiKernel/ServiceHandle.h"
14 
15 #include <string>
16 
25 public:
26  MergeTrackRecordCollTool(const std::string& type,
27  const std::string& name,
28  const IInterface* parent);
30  virtual StatusCode initialize() override final;
33  virtual StatusCode prepareEvent(const EventContext& ctx, unsigned int nInputEvents) override final;
36  virtual StatusCode mergeEvent(const EventContext& ctx) override final;
39  virtual StatusCode processBunchXing(int bunchXing,
40  SubEventIterator bSubEvents,
41  SubEventIterator eSubEvents) override final;
44  virtual bool toProcess(int bunchXing) const override final;
48  virtual StatusCode processAllSubEvents(const EventContext& ctx) override final;
49 private:
50  ServiceHandle<PileUpMergeSvc> m_pMergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc", ""};
51  StringProperty m_trRecCollKey{this, "TrackRecordCollKey", "MuonEntryLayer", ""};
52  SG::WriteHandleKey<TrackRecordCollection> m_outputKey{ this, "TrackRecordCollOutputKey", "MuonExitLayer", "" };
53  bool m_firstSubEvent{true};
54 };
55 #endif //MCTRUTHSIMALGS_MERGETRACKRECORDCOLLTOOL_H
MergeTrackRecordCollTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
Propagate the TrackRecordCollections to the output StoreGate.
Definition: MergeTrackRecordCollTool.cxx:81
MergeTrackRecordCollTool::toProcess
virtual bool toProcess(int bunchXing) const override final
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase...
Definition: MergeTrackRecordCollTool.cxx:74
MergeTrackRecordCollTool
an algorithm to merge MC track record collTool in the overlay store
Definition: MergeTrackRecordCollTool.h:24
MergeTrackRecordCollTool::initialize
virtual StatusCode initialize() override final
Initialize tool.
Definition: MergeTrackRecordCollTool.cxx:16
MergeTrackRecordCollTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the subevts loop.
Definition: MergeTrackRecordCollTool.cxx:68
MergeTrackRecordCollTool::MergeTrackRecordCollTool
MergeTrackRecordCollTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MergeTrackRecordCollTool.cxx:9
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
MergeTrackRecordCollTool::m_pMergeSvc
ServiceHandle< PileUpMergeSvc > m_pMergeSvc
Definition: MergeTrackRecordCollTool.h:50
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MergeTrackRecordCollTool::m_outputKey
SG::WriteHandleKey< TrackRecordCollection > m_outputKey
Definition: MergeTrackRecordCollTool.h:52
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PileUpToolBase
Definition: PileUpToolBase.h:18
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrackRecordCollection.h
MergeTrackRecordCollTool::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: MergeTrackRecordCollTool.cxx:32
MergeTrackRecordCollTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int nInputEvents) override final
called before the subevts loop.
Definition: MergeTrackRecordCollTool.cxx:24
MergeTrackRecordCollTool::m_firstSubEvent
bool m_firstSubEvent
Definition: MergeTrackRecordCollTool.h:53
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MergeTrackRecordCollTool::m_trRecCollKey
StringProperty m_trRecCollKey
Definition: MergeTrackRecordCollTool.h:51
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PileUpToolBase.h
helper base class IPileUpTool::toProcess().
ServiceHandle< PileUpMergeSvc >