BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
OfflineEventLoopMgr.h
Go to the documentation of this file.
1// Reimplement by mrli, 2024/06/22
2// $Id: OfflineEventLoopMgr.h,v 1.7 2022/01/25 05:42:04 maqm Exp $
3
4#pragma once
5
6#include "GaudiKernel/EventContext.h"
7#include "GaudiKernel/IConversionSvc.h"
8#include "GaudiKernel/IDataManagerSvc.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/IEvtSelector.h"
11#include "GaudiKernel/IIncidentSvc.h"
12#include "GaudiKernel/MinimalEventLoopMgr.h"
13
14/** Class definition of OfflineEventLoopMgr.
15 This is the default processing manager of the application manager.
16 This object handles the minimal requirements needed by the
17 application manager. It also handles the default user
18 configuration setup for standard event processing.
19
20 <UL>
21 <LI> handling of the incidents when starting event processing
22 <LI> handling of the event loop
23 </UL>
24
25 <B>History:</B>
26 <PRE>
27 +---------+----------------------------------------------+---------+
28 | Date | Comment | Who |
29 +---------+----------------------------------------------+---------+
30 |13/12/00 | Initial version | M.Frank |
31 +---------+----------------------------------------------+---------+
32 </PRE>
33 @author Markus Frank
34 @version 1.0
35*/
36
37class OfflineEventLoopMgr : public MinimalEventLoopMgr {
38protected:
39 /// Reference to the indicent service
40 SmartIF<IIncidentSvc> m_incidentSvc;
41
42 /// Reference to the Event Data Service's IDataManagerSvc interface
43 SmartIF<IDataManagerSvc> m_evtDataMgrSvc;
44
45 /// Reference to the Event Data Service's IDataProviderSvc interface
46 SmartIF<IDataProviderSvc> m_evtDataSvc;
47
48 /// Reference to the Event Selector
49 SmartIF<IEvtSelector> m_evtSelector;
50
51 /// Event Iterator
52 IEvtSelector::Context* m_evtContext;
53
54 /// Reference to the Histogram Data Service
55 SmartIF<IDataManagerSvc> m_histoDataMgrSvc;
56
57 /// Reference to the Histogram Persistency Service
58 SmartIF<IConversionSvc> m_histoPersSvc;
59
60 /// Property interface of ApplicationMgr
61 SmartIF<IProperty> m_appMgrProperty;
62
63 /// Event selector
64 StringProperty m_evtsel{ this, "EvtSel" };
65
66 /// Name of the Hist Pers type
67 StringProperty m_histPersName{ this, "HistogramPersistency", "" };
68
69public:
70 /// Standard Constructor
71 OfflineEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
72
73 /// Standard Destructor
74 virtual ~OfflineEventLoopMgr();
75
76 /// Create event address using event selector
77 StatusCode getEventRoot( IOpaqueAddress*& refpAddr );
78
79 /// implementation of IService::initalize
80 virtual StatusCode initialize();
81
82 /// implementation of IService::reinitalize
83 virtual StatusCode reinitialize();
84
85 /// implementation of IService::finalize
86 virtual StatusCode finalize();
87
88 /// implementation of IService::nextEvent
89 virtual StatusCode nextEvent( int maxevt );
90
91 /// implementation of IEventProcessor::executeEvent(EventContext&&)
92 virtual StatusCode executeEvent( EventContext&& ctx );
93
94 /// show progress
95 UnsignedIntegerProperty m_showProgressInterval{ this, "ShowProgressInterval", 50,
96 "Interval to show progress, 0 to disable" };
97
98 /// progress level
99 UnsignedIntegerProperty m_progressLevelSetting{ this, "ProgressLevel", 3, "Progress level" };
100
101 /// Locate start event number
102 IntegerProperty m_startEvtNo{ this, "StartEvtNo", 0,
103 "Skip all events until this event number, 0 to disable" };
104 IntegerProperty m_startRunNo{ this, "StartRunNo", 0,
105 "Skip all events until this run number, 0 to disable" };
106
107private:
108 int m_runNo;
109 bool m_runNoSet;
110
111 bool m_skipEvt;
112
113 MSG::Level m_progressLevel;
114};
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
virtual StatusCode reinitialize()
implementation of IService::reinitalize
IntegerProperty m_startEvtNo
Locate start event number.
virtual StatusCode executeEvent(EventContext &&ctx)
implementation of IEventProcessor::executeEvent(EventContext&&)
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
StringProperty m_histPersName
Name of the Hist Pers type.
UnsignedIntegerProperty m_progressLevelSetting
progress level
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
UnsignedIntegerProperty m_showProgressInterval
show progress
virtual StatusCode finalize()
implementation of IService::finalize
SmartIF< IDataProviderSvc > m_evtDataSvc
Reference to the Event Data Service's IDataProviderSvc interface.
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
OfflineEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
virtual StatusCode initialize()
implementation of IService::initalize
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
virtual StatusCode nextEvent(int maxevt)
implementation of IService::nextEvent
IEvtSelector::Context * m_evtContext
Event Iterator.
StringProperty m_evtsel
Event selector.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
virtual ~OfflineEventLoopMgr()
Standard Destructor.
IntegerProperty m_startRunNo