The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
HiveSlimEventLoopMgr.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13// Framework include files
23#include <GaudiKernel/SmartIF.h>
24
25// External Libraries
26#include <boost/dynamic_bitset.hpp>
27
28// STL
29#include <memory>
30
31class HiveSlimEventLoopMgr : public extends<Service, IEventProcessor> {
32
33protected:
34 Gaudi::Property<std::string> m_histPersName{ this, "HistogramPersistency", "", "" };
35 Gaudi::Property<std::string> m_evtsel{ this, "EvtSel", "", "" };
36 Gaudi::Property<std::string> m_schedulerName{ this, "SchedulerName", "AvalancheSchedulerSvc",
37 "Name of the scheduler to be used" };
38
39 Gaudi::Property<std::vector<unsigned int>> m_eventNumberBlacklist{ this, "EventNumberBlackList", {}, "" };
40 Gaudi::Property<bool> m_abortOnFailure{ this, "AbortOnFailure", true, "Abort job on event failure" };
41
62 bool m_endEventFired = false;
66 StatusCode clearWBSlot( int evtSlot );
70 StatusCode drainScheduler( int& finishedEvents );
74 bool m_scheduledStop = false;
77
78 // if finite number of evts is processed use bitset
79 std::unique_ptr<boost::dynamic_bitset<>> m_blackListBS;
80
82
83public:
84 // inherit base class constructor
85 using extends::extends;
86
87 ~HiveSlimEventLoopMgr() override;
88
92 StatusCode initialize() override;
94 StatusCode reinitialize() override;
96 StatusCode stop() override;
98 StatusCode finalize() override;
100 StatusCode nextEvent( int maxevt ) override;
104 StatusCode executeEvent( EventContext&& ctx ) override;
106 StatusCode executeRun( int maxevt ) override;
108 StatusCode stopRun() override;
109};
This class represents an entry point to all the event specific data.
size_t ContextEvt_t
Implementation of property with value of concrete type.
Definition PropertyFwd.h:27
EventContext::ContextEvt_t m_nevt
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
Gaudi::Property< bool > m_abortOnFailure
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
Gaudi::Property< std::string > m_histPersName
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
StatusCode stop() override
implementation of IService::stop
StatusCode initialize() override
implementation of IService::initialize
StatusCode drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
StatusCode nextEvent(int maxevt) override
implementation of IService::nextEvent
StatusCode reinitialize() override
implementation of IService::reinitialize
StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(EventContext&&)
std::unique_ptr< boost::dynamic_bitset<> > m_blackListBS
Gaudi::Property< std::string > m_schedulerName
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event)
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Gaudi::Property< std::vector< unsigned int > > m_eventNumberBlacklist
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
StatusCode declareEventRootAddress()
Declare the root address of the event.
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
IEvtSelector::Context * m_evtContext
Event Iterator.
bool m_scheduledStop
Scheduled stop of event processing.
StatusCode finalize() override
implementation of IService::finalize
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Reference to the AlgExecStateSvc.
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
Gaudi::Property< std::string > m_evtsel
EventContext createEventContext() override
implementation of IEventProcessor::createEventContext()
Opaque address interface definition.
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
Base class used to extend a class implementing other interfaces.
Definition extends.h:19