ATLAS Offline Software
Loading...
Searching...
No Matches
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
17#include "GaudiKernel/IAlgTool.h"
18
20
21#include <vector>
22typedef std::vector<xAOD::EventInfo::SubEvent>::const_iterator SubEventIterator;
23
24class IPileUpTool : virtual public IAlgTool{
25public:
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
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
DeclareInterfaceID(IPileUpTool, 1, 0)
Creates the InterfaceID and interfaceID() method.
virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)=0
called for each active bunch-crossing (time in ns)
virtual StatusCode processAllSubEvents(const EventContext &ctx)=0
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
virtual bool filterPassed() const =0
flags whether the event should be removed or not
virtual StatusCode mergeEvent(const EventContext &)
called at the end of the bunchXing loop
Definition IPileUpTool.h:36
virtual StatusCode prepareEvent(const EventContext &, unsigned int)
called before the bunchXing loop
Definition IPileUpTool.h:27
virtual void resetFilter()=0
reset the filter
virtual bool toProcess(int bunchXing) const =0
flags whether this tool is "live" for bunchXing (time in ns) implemented by default in PileUpToolBase...