BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
TBossFullEvent.cxx
Go to the documentation of this file.
2#include "TClass.h"
3#include <iostream>
4
6
8 : m_mask(0),
9 m_EvtHeader(0),
10 m_digiEvt(0),
11 m_dstEvt(0),
12 m_mcEvt(0),
13 m_trigEvt(0),
14 m_hltEvt(0),
15 m_rectrackEvt(0),
16 m_evtRecObject(0)
17{
18}
19
20#define SafeDeleteObject(ObjType, var) \
21 if ( m_mask & has##ObjType ) { \
22 delete var; \
23 }
24
26{
27 SafeDeleteObject(EvtHeader, m_EvtHeader);
33 SafeDeleteObject(RecTrackEvent, m_rectrackEvt);
35}
36
37#define SafePrintObject(ObjType, var) \
38 if ( m_mask & has##ObjType ) { \
39 var->Print(); \
40 }
41
42void TBossFullEvent::Print(Option_t *option) const
43{
44 std::cout << "=============================================" << std::endl
45 << "TBossFullEvent mask: 0x" << std::hex << m_mask << std::dec << std::endl
46 << "---------------------------------------------" << std::endl;
47
48 SafePrintObject(EvtHeader, m_EvtHeader);
54 SafePrintObject(RecTrackEvent, m_rectrackEvt);
56
57 std::cout << "=============================================" << std::endl;
58}
59
61{
62 m_mask = obj->m_mask;
64 m_digiEvt = obj->m_digiEvt;
65 m_dstEvt = obj->m_dstEvt;
66 m_mcEvt = obj->m_mcEvt;
67 m_trigEvt = obj->m_trigEvt;
68 m_hltEvt = obj->m_hltEvt;
71}
72
73#define SafeReadObject(ObjType, var) \
74 if ( m_mask & has##ObjType ) { \
75 var = (T##ObjType*)R__b.ReadObject(T##ObjType::Class()); \
76 }
77
78#define SafeWriteObject(ObjType, var) \
79 if ( m_mask & has##ObjType ) { \
80 R__b.WriteObject(var); \
81 }
82
83void TBossFullEvent::Streamer(TBuffer &R__b)
84{
85 if ( R__b.IsReading() ) {
86 R__b >> m_mask;
87 SafeReadObject(EvtHeader, m_EvtHeader);
93 SafeReadObject(RecTrackEvent, m_rectrackEvt);
95 }
96 else {
97 R__b << m_mask;
98 SafeWriteObject(EvtHeader, m_EvtHeader);
104 SafeWriteObject(RecTrackEvent, m_rectrackEvt);
106 }
107}
#define SafePrintObject(ObjType, var)
#define SafeWriteObject(ObjType, var)
#define SafeReadObject(ObjType, var)
ClassImp(TBossFullEvent) TBossFullEvent
#define SafeDeleteObject(ObjType, var)
Definition: McEvent.h:8
TRecTrackEvent * m_rectrackEvt
THltEvent * m_hltEvt
virtual ~TBossFullEvent()
TDstEvent * m_dstEvt
TEvtRecObject * m_evtRecObject
TDigiEvent * m_digiEvt
TTrigEvent * m_trigEvt
void Print(Option_t *option="") const
TMcEvent * m_mcEvt
void copy(TBossFullEvent *obj)
TEvtHeader * m_EvtHeader