ATLAS Offline Software
IPileUpTool.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 PILEUPTOOLS_IPILEUPTOOL_H
8 #define PILEUPTOOLS_IPILEUPTOOL_H
9 
17 #include "GaudiKernel/IAlgTool.h"
18 
20 
21 #include <vector>
22 typedef std::vector<xAOD::EventInfo::SubEvent>::const_iterator SubEventIterator;
23 
24 class IPileUpTool : virtual public IAlgTool{
25 public:
27  virtual StatusCode prepareEvent(const EventContext& /*ctx*/, unsigned int /*nInputEvents*/) { return StatusCode::SUCCESS; }
29  virtual StatusCode processBunchXing(int bunchXing,
30  SubEventIterator bSubEvents,
31  SubEventIterator eSubEvents) = 0;
34  virtual bool toProcess(int bunchXing) const =0;
36  virtual StatusCode mergeEvent(const EventContext& /*ctx*/) { return StatusCode::SUCCESS; }
39  virtual StatusCode processAllSubEvents(const EventContext& ctx) = 0;
41  virtual bool filterPassed() const =0;
43  virtual void resetFilter() =0;
44 
47 };
48 
49 #endif // PILEUPTOOLS_IPILEUPTOOL_H
IPileUpTool::toProcess
virtual bool toProcess(int bunchXing) const =0
flags whether this tool is "live" for bunchXing (time in ns) implemented by default in PileUpToolBase...
IPileUpTool::filterPassed
virtual bool filterPassed() const =0
flags whether the event should be removed or not
IPileUpTool::DeclareInterfaceID
DeclareInterfaceID(IPileUpTool, 1, 0)
Creates the InterfaceID and interfaceID() method.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IPileUpTool
Definition: IPileUpTool.h:24
IPileUpTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx)=0
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
IPileUpTool::resetFilter
virtual void resetFilter()=0
reset the filter
EventInfo.h
IPileUpTool::processBunchXing
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)=0
called for each active bunch-crossing (time in ns)
IPileUpTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &)
called at the end of the bunchXing loop
Definition: IPileUpTool.h:36
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
IPileUpTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &, unsigned int)
called before the bunchXing loop
Definition: IPileUpTool.h:27