5#ifndef PILEUPEVENTLOOPMGR_H
6#define PILEUPEVENTLOOPMGR_H
14#include "GaudiKernel/MinimalEventLoopMgr.h"
23#include "Gaudi/Property.h"
24#include "GaudiKernel/ServiceHandle.h"
25#include "GaudiKernel/ToolHandle.h"
26#include "GaudiKernel/IAlgExecStateSvc.h"
57 virtual StatusCode
finalize()
override;
58 virtual StatusCode
nextEvent(
int maxevt)
override;
59 virtual StatusCode
executeEvent( EventContext &&ctx )
override;
61 virtual StatusCode
seek(
int evt)
override;
62 virtual int curEvent()
const override;
80 inline unsigned int getBCID(
int bunchXing,
unsigned int centralBCID)
const {
95 "EventSelector for original (physics) events stream"};
97 "EventSelector for signal (hard-scatter) events stream"};
99 "The service providing the beam intensity distribution"};
101 "The service providing the beam luminosity distribution vs. run"};
103 "PileUp Merge Service"};
105 "ServiceHandle for EvtIdModifierSvc"};
108 "The number of slots in each LHC beam. Default: 3564."};
109 Gaudi::Property<float>
m_xingFreq{
this,
"XingFrequency", 25.0,
112 "time of first xing / XingFrequency (0th xing is 1st after trigger)"};
114 "time of last xing / XingFrequency (0th xing is 1st after trigger)"};
116 "Set to digitization numberOfCollisions prop. for variable-mu and RunDMC jobs."};
117 ToolHandleArray<IBkgStreamsCache>
m_caches{
this,
"bkgCaches", {},
118 "list of tools managing bkg events"};
120 "if true(default) an EOF condition in the BkgStreamsCaches is not considered "
121 "to be an error IF maxevt=-1 (loop over all available events)"};
123 "if set to true we will not cache bkg events from one xing to then next. "
124 "This greatly increases the amount of I/O and greatly reduces the memory required to run a job"};
126 "Controls behaviour of event loop depending on return code of"
127 " Algorithms. 0: all non-SUCCESSes terminate job. "
128 "1: RECOVERABLE skips to next event, FAILURE terminates job "
129 "(DEFAULT). 2: RECOVERABLE and FAILURE skip to next events"};
131 "When set to False, this will allow the code to reproduce serial output in an "
132 "AthenaMP job, albeit with a significant performance penalty."};
134 "SG key for the EventInfo object"};
136 "SG key for the EventInfoContainer object"};
138 "sample MC channel number" };
Abstract interface for seeking within an event stream.
const std::string c_pileUpEventInfoContName
default value for the EventInfoContainer storing subevents for PileUp
const std::string c_pileUpEventInfoObjName
default value for the EventInfoContainer storing subevents for PileUp
a triple selector/context/store defines a stream
MsgStream & msg() const
The standard message stream.
bool msgLvl(const MSG::Level lvl) const
Test the output level.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Interface to in-memory cache for pileup events.
ServiceHandle< StoreGateSvc > m_evtStore
output store
Gaudi::Property< bool > m_xingByXing
virtual StatusCode initialize() override
Gaudi::Property< float > m_xingFreq
virtual StatusCode nextEvent(int maxevt) override
Gaudi::Property< unsigned int > m_maxBunchCrossingPerOrbit
ServiceHandle< IEvtIdModifierSvc > m_evtIdModSvc
Gaudi::Property< uint32_t > m_mcChannelNumber
Gaudi::Property< float > m_maxCollPerXing
Gaudi::Property< bool > m_allowSerialAndMPToDiffer
void modifyEventContext(EventContext &ctx, const EventID &eID, bool consume_modifier_stream)
PileUpStream m_origStream
Input Stream.
virtual StatusCode seek(int evt) override
ServiceHandle< IIncidentSvc > m_incidentSvc
Incident Service.
virtual ~PileUpEventLoopMgr()
Standard Destructor.
ServiceHandle< IEvtSelector > m_signalSel
virtual int curEvent() const override
Gaudi::Property< std::string > m_evinfName
Gaudi::Property< int > m_firstXing
Gaudi::Property< int > m_failureMode
SmartIF< IAlgExecStateSvc > m_aess
Reference to the Algorithm Execution State Svc.
ServiceHandle< IEvtSelector > m_origSel
unsigned int getBCID(int bunchXing, unsigned int centralBCID) const
return the 'fake BCID' corresponding to bunchXing
virtual StatusCode executeEvent(EventContext &&ctx) override
Gaudi::Property< int > m_lastXing
ServiceHandle< IBeamLuminosity > m_beamLumi
ToolHandleArray< IBkgStreamsCache > m_caches
ServiceHandle< IBeamIntensity > m_beamInt
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUpEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
virtual StatusCode finalize() override
Gaudi::Property< bool > m_allowSubEvtsEOF
virtual StatusCode executeAlgorithms(const EventContext &ctx)
Run the algorithms for the current event.
uint32_t m_currentRun
current run number
Gaudi::Property< std::string > m_evinfContName
StatusCode setupStreams()
setup input and overlay selectors and iters
the preferred mechanism to access information from the different event stores in a pileup job.
a triple selector/context/store defines a stream
The Athena Transient Store API.