BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EFEventLoopMgr.h
Go to the documentation of this file.
1//====================================================================
2// EFEventLoopMgr.h
3//====================================================================
4#ifndef STOREGATE_EFEVENTLOOPMGR_H
5#define STOREGATE_EFEVENTLOOPMGR_H
6
7#define ONLINE_DATA_HEAD 36
8#define ONLINE_DATA_TAIL 4
9// Framework include files
10#ifndef GAUDIKERNEL_IEVTSELECTOR_H
11# include "GaudiKernel/IEvtSelector.h"
12#endif
13#include "GaudiKernel/SvcFactory.h"
14#ifndef GAUDISVC_MINIMALEVENTLOOPMGR_H
15// #include "ApplicationMgr/MinimalEventLoopMgr.h"
16# include "GaudiKernel/MinimalEventLoopMgr.h"
17#endif
18
21#include "HltDataTypes/EventID.h" /* number_type */
23
24#include "RawDataCnv/IRawDataInputSvc.h"
25#include "RawDataCnv/RawDataCnv.h"
26#include <stdint.h>
27#include <vector>
28
29// Forward declarations
30class IIncidentSvc;
31class IDataManagerSvc;
32class IConversionSvc;
33class IDataProviderSvc;
34class RAWEVENT;
35
36/** Class definition of EFEventLoopMgr.
37 This is the default processing manager of the application manager.
38 This object handles the minimal requirements needed by the
39 application manager. It also handles the default user
40 configuration setup for standard event processing.
41
42 <UL>
43 <LI> handling of the incidents when starting event processing
44 <LI> handling of the event loop
45 </UL>
46
47 <B>History:</B>
48 <PRE>
49 +---------+----------------------------------------------+---------+
50 | Date | Comment | Who |
51 +---------+----------------------------------------------+---------+
52 |13/12/00 | Initial version | M.Frank |
53 +---------+----------------------------------------------+---------+
54 </PRE>
55 @author Markus Frank
56 @version 1.0
57*/
58class EFEventLoopMgr : public MinimalEventLoopMgr, virtual public IEFEventLoopMgr {
59public:
60 /// Creator friend class
61 friend class SvcFactory<EFEventLoopMgr>;
62
63protected:
64 /// Reference to the indicent service
65 IIncidentSvc* m_incidentSvc;
66 /// Reference to HltStoreSvc;
68 /// Reference to the Event Selector
69 IEvtSelector* m_evtSelector;
70 /// Event Context
71 IEvtSelector::Context* m_evtContext;
72 /// Event selector
73 std::string m_evtsel;
74
75 /// Reference to the Event Data Service's IDataManagerSvc interface
76 IDataManagerSvc* m_evtDataMgrSvc;
77 /// Reference to the Event Data Service's IDataProviderSvc interface
78 IDataProviderSvc* m_evtDataSvc;
79
80 /// Reference to the Histogram Data Service
81 IDataManagerSvc* m_histoDataMgrSvc;
82 /// Reference to the Histogram Persistency Service
83 IConversionSvc* m_histoPersSvc;
84 /// Name of the Hist Pers type
85 std::string m_histPersName;
86
87 /// current run number
90
91protected:
92 /// Standard Constructor
93 EFEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
94 /// Standard Destructor
95 virtual ~EFEventLoopMgr();
96
97public:
98 /// implementation of IAppMgrUI::initalize
99 virtual StatusCode initialize();
100 /// implementation of IAppMgrUI::finalize
101 virtual StatusCode finalize();
102
103 /// implementation of IEventProcessor::executeEvent(void* par)
104 virtual StatusCode executeEvent( void* par );
105 /// Create event address using event selector
106 StatusCode getEventRoot( IOpaqueAddress*& refpAddr );
107 /// implementation of IInterface: queryInterface
108 virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
109 /// prepare for run step
110 virtual StatusCode prepareForRun( int ef_run_number );
111
112 /// whether it is a RrandomTrg
113 virtual bool getTrigChn( uint32_t* data, uint32_t ndata );
114 /// return data from EF decision
115 virtual std::string EF_Decision();
116 /// return version number
117 virtual uint32_t EF_Version();
118 /// return algorithm tag
119 virtual uint32_t EF_Algorithm_Tag();
120 /// return total energy
121 virtual uint32_t EF_Total_Energy();
122 /// Return a pointer to the local memory containing the EF subdetector fragment
123 virtual uint32_t* EF_Fragment_Address();
124
125private:
126 int m_total_nevt;
127 IRawDataInputSvc* m_inputSvc;
128 bool m_disableEFResult;
129 bool m_okexecuteEvent;
130 int m_timeTest;
131 EFResult* m_efResult;
132 EFResult* m_evtType;
133 // hxt IByteStreamEventAccess* m_ByteStreamEventAccess;
134 char* m_serializedEFAddress; ///< Pointer to the local memory containing the EF Fragment
135 uint32_t m_trgType;
136 bool m_firstEvent;
137 RAWEVENT* m_re;
138 // hxt typedef OFFLINE_FRAGMENTS_NAMESPACE::SubDetectorFragment DETF;
139 // hxt typedef std::vector<DETF*, Hlt_ALLOC> VDETF;
140};
141#endif // STOREGATE_EFEVENTLOOPMGR_H
TTree * data
Defines the EFResult RDO structure.
virtual bool getTrigChn(uint32_t *data, uint32_t ndata)
whether it is a RrandomTrg
std::string m_evtsel
Event selector.
virtual StatusCode executeEvent(void *par)
implementation of IEventProcessor::executeEvent(void* par)
IConversionSvc * m_histoPersSvc
Reference to the Histogram Persistency Service.
virtual ~EFEventLoopMgr()
Standard Destructor.
std::string m_histPersName
Name of the Hist Pers type.
virtual StatusCode initialize()
implementation of IAppMgrUI::initalize
virtual std::string EF_Decision()
return data from EF decision
virtual StatusCode finalize()
implementation of IAppMgrUI::finalize
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
EventID::number_type m_currentRun
current run number
virtual uint32_t EF_Version()
return version number
EFEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
virtual uint32_t EF_Total_Energy()
return total energy
IIncidentSvc * m_incidentSvc
Reference to the indicent service.
virtual uint32_t * EF_Fragment_Address()
Return a pointer to the local memory containing the EF subdetector fragment.
virtual StatusCode prepareForRun(int ef_run_number)
prepare for run step
IDataManagerSvc * m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
implementation of IInterface: queryInterface
IEvtSelector::Context * m_evtContext
Event Context.
IDataProviderSvc * m_evtDataSvc
Reference to the Event Data Service's IDataProviderSvc interface.
virtual uint32_t EF_Algorithm_Tag()
return algorithm tag
IDataManagerSvc * m_histoDataMgrSvc
Reference to the Histogram Data Service.
HltStoreSvc * m_HltStoreSvc
Reference to HltStoreSvc;.
IEvtSelector * m_evtSelector
Reference to the Event Selector.
unsigned int number_type
Definition EventID.h:30
Forward and external declarations.