BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
McCnv.h
Go to the documentation of this file.
1#ifndef McCnv_H
2#define McCnv_H 1
3
5
7#include "RootCnvSvc/commonData.h" //zoujh
8
9extern const CLID& CLID_McEvent;
10
11// Abstract factory to create the converter
12template <class TYPE> class CnvFactory;
13
14/** @class McCnv
15 * @brief Concrete converter for the Mc branch
16 *
17 * Based on the McCnv of GLAST.
18 */
19
20class McCnv : public RootEventBaseCnv {
21
22 friend class CnvFactory<McCnv>;
23
24public:
25 static const CLID& classID()
26 {
27 return CLID_McEvent;
28 }
29
30 virtual ~McCnv() { };
31
32 virtual StatusCode initialize();
33
34 /// returns object to be written (maintained here for all DIGI-converters)
35 static TMcEvent* getWriteObject() { return m_objWrite;}
36
37 protected:
38 McCnv(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 TMcEvent* m_objWrite;
49
50 /// Run number
51 Int_t m_runId;
52 /// Event Number
53 Int_t m_eventId;
54
55
56 commonData m_common;
57};
58
59#endif // McCnv_H
const CLID & CLID_McEvent
Definition: EventModel.cxx:203
Concrete converter for the Mc branch.
Definition: McCnv.h:20
virtual ~McCnv()
Definition: McCnv.h:30
virtual StatusCode TObjectToDataObject(DataObject *&refpObject)
do the transformation from ROOT to TDS object
Definition: McCnv.cxx:50
static TMcEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
Definition: McCnv.h:35
virtual StatusCode DataObjectToTObject(DataObject *obj, RootAddress *addr)
transformation from TDS object to ROOT
Definition: McCnv.cxx:69
static const CLID & classID()
Definition: McCnv.h:25
virtual StatusCode initialize()
Definition: McCnv.cxx:36
Definition of a Root address, derived from IOpaqueAddress.
Definition: RootAddress.h:21
Base class for all Root Converters.