ATLAS Offline Software
Loading...
Searching...
No Matches
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
25public:
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;
49private:
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
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
the preferred mechanism to access information from the different event stores in a pileup job.
helper base class IPileUpTool::toProcess().
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
Propagate the TrackRecordCollections to the output StoreGate.
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
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the subevts loop.
SG::WriteHandleKey< TrackRecordCollection > m_outputKey
virtual StatusCode initialize() override final
Initialize tool.
ServiceHandle< PileUpMergeSvc > m_pMergeSvc
MergeTrackRecordCollTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int nInputEvents) override final
called before the subevts loop.
virtual bool toProcess(int bunchXing) const override final
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase...
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Property holding a SG store/key/clid from which a WriteHandle is made.