BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/RootCnvSvc/RootCnvSvc/EvtHeaderCnv.h
Go to the documentation of this file.
1#ifndef EvtHeaderCnv_H
2#define EvtHeaderCnv_H 1
3
4#include "RootCnvSvc/RootEventBaseCnv.h"
5
6#include "RootEventData/TEvtHeader.h"
7#include "RootCnvSvc/commonData.h"
8
9//extern const CLID& CLID_Event;
10extern const CLID& CLID_EventHeader;
11
12// Abstract factory to create the converter
13template <class TYPE> class CnvFactory;
14
15/** @class EvtHeaderCnv
16 * @brief Concrete converter for the EvtHeader branch
17 *
18 * Based on the EvtHeaderCnv of GLAST.
19 */
20
21class EvtHeaderCnv : public RootEventBaseCnv {
22
23 friend class CnvFactory<EvtHeaderCnv>;
24
25public:
26 static const CLID& classID()
27 {
28 return CLID_EventHeader;
29 }
30
31 virtual ~EvtHeaderCnv() { };
32
33
34 virtual StatusCode initialize();
35
36 /// returns object to be written (maintained here for all DIGI-converters)
37 static TEvtHeader* getWriteObject() { return m_objWrite;}
38
39 protected:
40 EvtHeaderCnv(ISvcLocator* svc);
41
42 /// transformation from TDS object to ROOT
43 virtual StatusCode DataObjectToTObject(DataObject* obj, RootAddress* addr);
44
45 /// do the transformation from ROOT to TDS object
46 virtual StatusCode TObjectToDataObject(DataObject*& refpObject);
47
48private:
49 /// Root object to be written
50 static TEvtHeader* m_objWrite;
51
52 /// Run number
53 Int_t m_runId;
54 /// Event Number
55 Int_t m_eventId;
56
57 UInt_t m_time;
58
59 /// EventTag
60 UInt_t m_eventTag;
61
62 /// Flags
63 UInt_t m_flag1;
64 UInt_t m_flag2;
65
66 // Int_t* m_data;
67 Int_t m_data[10];
68
69 commonData m_common;
70};
71
72#endif // EvtHeaderCnv_H
const CLID & CLID_EventHeader
Definition: EventModel.cxx:196
Concrete converter for the EvtHeader branch.
static TEvtHeader * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
virtual StatusCode initialize()
virtual StatusCode TObjectToDataObject(DataObject *&refpObject)
do the transformation from ROOT to TDS object
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation from TDS object to ROOT
EvtHeaderCnv(ISvcLocator *svc)
Definition of a Root address, derived from IOpaqueAddress.