The Gaudi Framework  v33r1 (b1225454)
HiveSlimEventLoopMgr.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #ifndef GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H
12 #define GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H 1
13 
14 // Framework include files
22 #include "GaudiKernel/IScheduler.h"
24 #include "GaudiKernel/SmartIF.h"
25 
26 // External Libraries
27 #include <boost/dynamic_bitset.hpp>
28 
29 // STL
30 #include <memory>
31 
32 class HiveSlimEventLoopMgr : public extends<Service, IEventProcessor> {
33 
34 protected:
35  Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "", ""};
36  Gaudi::Property<std::string> m_evtsel{this, "EvtSel", "", ""};
37  Gaudi::Property<bool> m_warnings{this, "Warnings", true, "Set this property to false to suppress warning messages"};
38  Gaudi::Property<std::string> m_schedulerName{this, "SchedulerName", "AvalancheSchedulerSvc",
39  "Name of the scheduler to be used"};
40  Gaudi::Property<std::vector<unsigned int>> m_eventNumberBlacklist{this, "EventNumberBlackList", {}, ""};
41  Gaudi::Property<bool> m_abortOnFailure{this, "AbortOnFailure", true, "Abort job on event failure"};
42 
63  bool m_endEventFired = false;
67  StatusCode clearWBSlot( int evtSlot );
71  StatusCode drainScheduler( int& finishedEvents );
75  bool m_scheduledStop = false;
78 
79  // if finite number of evts is processed use bitset
81 
83 
84 public:
85  // inherit base class constructor
86  using extends::extends;
87 
88  ~HiveSlimEventLoopMgr() override;
89 
93  StatusCode initialize() override;
95  StatusCode reinitialize() override;
97  StatusCode stop() override;
99  StatusCode finalize() override;
101  StatusCode nextEvent( int maxevt ) override;
103  EventContext createEventContext() override;
105  StatusCode executeEvent( EventContext&& ctx ) override;
107  StatusCode executeRun( int maxevt ) override;
109  StatusCode stopRun() override;
110 };
111 #endif // GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Gaudi::Property< std::string > m_evtsel
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
std::unique_ptr< boost::dynamic_bitset<> > m_blackListBS
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
StatusCode declareEventRootAddress()
Declare the root address of the event.
Gaudi::Property< bool > m_abortOnFailure
EventContext createEventContext() override
implementation of IEventProcessor::createEventContext()
Implementation of property with value of concrete type.
Definition: Property.h:370
StatusCode drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
bool m_scheduledStop
Scheduled stop of event processing.
Gaudi::Property< std::vector< unsigned int > > m_eventNumberBlacklist
This class represents an entry point to all the event specific data.
Definition: EventContext.h:34
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
Gaudi::Property< bool > m_warnings
StatusCode finalize() override
implementation of IService::finalize
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
size_t ContextEvt_t
Definition: EventContext.h:37
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
StatusCode initialize() override
implementation of IService::initialize
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Reference to the AlgExecStateSvc.
STL class.
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
Gaudi::Property< std::string > m_schedulerName
Base class used to extend a class implementing other interfaces.
Definition: extends.h:20
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(EventContext&&)
StatusCode reinitialize() override
implementation of IService::reinitialize
Opaque address interface definition.
int maxevt
Definition: Bootstrap.cpp:270
Gaudi::Property< std::string > m_histPersName
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
StatusCode nextEvent(int maxevt) override
implementation of IService::nextEvent
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event)
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
StatusCode stop() override
implementation of IService::stop
EventContext::ContextEvt_t m_nevt
IEvtSelector::Context * m_evtContext
Event Iterator.