BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/RootCnvSvc/RootCnvSvc-02-01-12/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 "RootEventData/TDigiEvent.h"
7#include "RootCnvSvc/commonData.h" //zoujh
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()
26 {
27 return CLID_DigiEvent;
28 }
29
30 virtual ~DigiCnv() { };
31
32 virtual StatusCode initialize();
33
34 /// returns object to be written (maintained here for all DIGI-converters)
35 static TDigiEvent* getWriteObject() { return m_objWrite;}
36
37 protected:
38 DigiCnv(ISvcLocator* svc);
39
40 /// transformation from TDS object to ROOT
41 virtual StatusCode DataObjectToTObject(DataObject* obj, RootAddress* addr);
42
43 /// do the transformation from ROOT to TDS object
44 virtual StatusCode TObjectToDataObject(DataObject*& refpObject);
45
46private:
47 /// Root object to be written
48 static TDigiEvent* m_objWrite;
49
50 /// Run number
51 Int_t m_runId;
52 /// Event Number
53 Int_t m_eventId;
54
55 /// Denote whether or not this data was simulated
56 Bool_t m_fromMc;
57
58 commonData m_common; //zoujh
59
60};
61
62#endif // DigiCnv_H
const CLID & CLID_DigiEvent
Raw event and Digi IDs.
Definition: EventModel.cxx:232
const CLID & CLID_DigiEvent
Raw event and Digi IDs.
Definition: EventModel.cxx:232
Concrete converter for the Rec branch.
virtual StatusCode initialize()
Definition: DigiCnv.cxx:38
virtual StatusCode TObjectToDataObject(DataObject *&refpObject)
do the transformation from ROOT to TDS object
Definition: DigiCnv.cxx:51
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation from TDS object to ROOT
Definition: DigiCnv.cxx:72
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
Definition of a Root address, derived from IOpaqueAddress.