BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/RootCnvSvc/include/RootCnvSvc/Digi/DigiCnv.h
Go to the documentation of this file.
1#ifndef DigiCnv_H
2#define DigiCnv_H 1
3
4#include "RootCnvSvc/RootEventBaseCnv.h"
5
6#include "RootCnvSvc/commonData.h" //zoujh
7#include "RootEventData/TDigiEvent.h"
8
9extern const CLID& CLID_DigiEvent;
10
11// Abstract factory to create the converter
12template <class TYPE> class CnvFactory;
13
14/** @class DigiCnv
15 * @brief Concrete converter for the Rec branch
16 *
17 * Based on the DigiCnv of GLAST.
18 */
19
20class DigiCnv : public RootEventBaseCnv {
21
22 friend class CnvFactory<DigiCnv>;
23
24public:
25 static const CLID& classID() { return CLID_DigiEvent; }
26
27 virtual ~DigiCnv(){};
28
29 virtual StatusCode initialize();
30
31 /// returns object to be written (maintained here for all DIGI-converters)
32 static TDigiEvent* getWriteObject() { return m_objWrite; }
33
34 DigiCnv( ISvcLocator* svc );
35
36 /// transformation from TDS object to ROOT
37 virtual StatusCode DataObjectToTObject( DataObject* obj, RootAddress* addr );
38
39 /// do the transformation from ROOT to TDS object
40 virtual StatusCode TObjectToDataObject( DataObject*& refpObject );
41
42private:
43 /// Root object to be written
44 static TDigiEvent* m_objWrite;
45
46 /// Run number
47 Int_t m_runId;
48 /// Event Number
49 Int_t m_eventId;
50
51 /// Denote whether or not this data was simulated
52 Bool_t m_fromMc;
53
54 commonData m_common; // zoujh
55};
56
57#endif // DigiCnv_H
const CLID & CLID_DigiEvent
Raw event and Digi IDs.
virtual StatusCode initialize()
Definition DigiCnv.cxx:35
virtual StatusCode TObjectToDataObject(DataObject *&refpObject)
do the transformation from ROOT to TDS object
Definition DigiCnv.cxx:47
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation from TDS object to ROOT
Definition DigiCnv.cxx:68
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
DigiCnv(ISvcLocator *svc)
Definition DigiCnv.cxx:26
Definition of a Root address, derived from IOpaqueAddress.
RootEventBaseCnv(const CLID &clid, ISvcLocator *svc)