ATLAS Offline Software
TestPileUpTool.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef PILEUPCOMPS_TESTPILEUPTOOL_H
8 #define PILEUPCOMPS_TESTPILEUPTOOL_H
9 
14 #include <vector>
15 #include <utility> /* pair */
16 
19 {
20 public:
22 
23  TestPileUpTool(const std::string& type,
24  const std::string& name,
25  const IInterface* parent);
27 
29  virtual StatusCode prepareEvent(const EventContext& ctx, unsigned int nInputEvents) override final;
33  virtual StatusCode mergeEvent(const EventContext& ctx) override final;
36  virtual StatusCode
37  processBunchXing(int bunchXing,
38  SubEventIterator bSubEvents,
39  SubEventIterator eSubEvents) override final;
42 
43 private:
44  std::vector<std::pair<unsigned int, int> > m_seen;
45  Gaudi::Property<bool> m_doFiltering{this, "DoFiltering", false, ""};
46  Gaudi::Property<unsigned int> m_maxInTimePileUp{this, "MaxInTimePileUp", 4, ""};
47 };
48 #endif
TestPileUpTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int nInputEvents) override final
called before the bunchXing loop
Definition: TestPileUpTool.cxx:16
TestPileUpTool::TestPileUpTool
TestPileUpTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TestPileUpTool.cxx:9
TestPileUpTool::m_seen
std::vector< std::pair< unsigned int, int > > m_seen
return false if not interested in certain xing times (in ns) implemented by default in PileUpToolBase...
Definition: TestPileUpTool.h:44
TestPileUpTool::m_maxInTimePileUp
Gaudi::Property< unsigned int > m_maxInTimePileUp
Definition: TestPileUpTool.h:46
TestPileUpTool
Definition: TestPileUpTool.h:19
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TestPileUpTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the subevts loop.
Definition: TestPileUpTool.cxx:22
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
TestPileUpTool::m_doFiltering
Gaudi::Property< bool > m_doFiltering
Definition: TestPileUpTool.h:45
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TestPileUpTool::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: TestPileUpTool.cxx:31
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
PileUpToolBase.h
helper base class IPileUpTool::toProcess().