CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
RootEventData-00-05-13/src/TDstEvent.cxx
Go to the documentation of this file.
1#include "RootEventData/TDstEvent.h"
2#include "TCollection.h" // Declares TIter
3
5
6// Allocate the TObjArray just once
7
8TObjArray *TDstEvent::s_staticMdcTrackCol = 0;
9TObjArray *TDstEvent::s_staticCgemTrackCol = 0;
10TObjArray *TDstEvent::s_staticEmcTrackCol = 0;
11TObjArray *TDstEvent::s_staticTofTrackCol = 0;
12TObjArray *TDstEvent::s_staticMucTrackCol = 0;
13TObjArray *TDstEvent::s_staticMdcDedxCol = 0;
14TObjArray *TDstEvent::s_staticCgemDedxCol = 0;
15TObjArray *TDstEvent::s_staticExtTrackCol = 0;
16TObjArray *TDstEvent::s_staticMdcKalTrackCol = 0;
17TObjArray *TDstEvent::s_staticCgemKalTrackCol = 0;
18TObjArray *TDstEvent::s_staticCgemSegmentCol = 0;
19
20//***************************************************************
22{
23 //Dst Track
24
25 if (!s_staticMdcTrackCol) {
26 s_staticMdcTrackCol = new TObjArray();
27 }
28 m_mdcTrackCol = s_staticMdcTrackCol;
29
30 if (!s_staticCgemTrackCol) {
31 s_staticCgemTrackCol = new TObjArray();
32 }
33 m_cgemTrackCol = s_staticCgemTrackCol;
34
35 if (!s_staticCgemSegmentCol) {
36 s_staticCgemSegmentCol = new TObjArray();
37 }
38 m_cgemSegmentCol = s_staticCgemSegmentCol;
39
40 if (!s_staticEmcTrackCol ){
41 s_staticEmcTrackCol = new TObjArray();
42 }
43 m_emcTrackCol = s_staticEmcTrackCol;
44
45 if (! s_staticTofTrackCol ){
46 s_staticTofTrackCol = new TObjArray();
47 }
48 m_tofTrackCol = s_staticTofTrackCol;
49
50 if (! s_staticMucTrackCol ){
51 s_staticMucTrackCol = new TObjArray();
52 }
53 m_mucTrackCol = s_staticMucTrackCol;
54
55 if (! s_staticMdcDedxCol ){
56 s_staticMdcDedxCol = new TObjArray();
57 }
58 m_mdcDedxCol = s_staticMdcDedxCol;
59
60 if (! s_staticCgemDedxCol ){
61 s_staticCgemDedxCol = new TObjArray();
62 }
63 m_cgemDedxCol = s_staticCgemDedxCol;
64
65 if (! s_staticExtTrackCol ){
66 s_staticExtTrackCol = new TObjArray();
67 }
68 m_extTrackCol = s_staticExtTrackCol;
69
70
71 if (! s_staticMdcKalTrackCol ){
72 s_staticMdcKalTrackCol = new TObjArray();
73 }
74 m_mdcKalTrackCol = s_staticMdcKalTrackCol;
75
76 if (! s_staticCgemKalTrackCol ){
77 s_staticCgemKalTrackCol = new TObjArray();
78 }
79 m_cgemKalTrackCol = s_staticCgemKalTrackCol;
80
81 Clear();
82
83}
84
85//*****************************************************************
87
88 /**************************** Dst Track *************************/
89 if(m_mdcTrackCol == s_staticMdcTrackCol) s_staticMdcTrackCol = 0;
90 m_mdcTrackCol->Delete();
91 delete m_mdcTrackCol;
92 m_mdcTrackCol = 0;
93
94 if(m_cgemSegmentCol == s_staticCgemSegmentCol) s_staticCgemSegmentCol = 0;
95 m_cgemSegmentCol->Delete();
96 delete m_cgemSegmentCol;
97 m_cgemSegmentCol = 0;
98
99 if(m_cgemTrackCol == s_staticCgemTrackCol) s_staticCgemTrackCol = 0;
100 m_cgemTrackCol->Delete();
101 delete m_cgemTrackCol;
102 m_cgemTrackCol = 0;
103
104 if(m_emcTrackCol == s_staticEmcTrackCol) s_staticEmcTrackCol = 0;
105 m_emcTrackCol->Delete();
106 delete m_emcTrackCol;
107 m_emcTrackCol = 0;
108
109 if(m_tofTrackCol == s_staticTofTrackCol ) s_staticTofTrackCol = 0;
110 m_tofTrackCol->Delete();
111 delete m_tofTrackCol;
112 m_tofTrackCol = 0;
113
114 if(m_mucTrackCol == s_staticMucTrackCol ) s_staticMucTrackCol = 0;
115 m_mucTrackCol->Delete();
116 delete m_mucTrackCol;
117 m_mucTrackCol = 0;
118
119 if(m_mdcDedxCol == s_staticMdcDedxCol ) s_staticMdcDedxCol = 0;
120 m_mdcDedxCol->Delete();
121 delete m_mdcDedxCol;
122 m_mdcDedxCol = 0;
123
124 if(m_cgemDedxCol == s_staticCgemDedxCol ) s_staticCgemDedxCol = 0;
125 m_cgemDedxCol->Delete();
126 delete m_cgemDedxCol;
127 m_cgemDedxCol = 0;
128
129 if(m_extTrackCol == s_staticExtTrackCol ) s_staticExtTrackCol = 0;
130 m_extTrackCol->Delete();
131 delete m_extTrackCol;
132 m_extTrackCol = 0;
133
134 if(m_mdcKalTrackCol == s_staticMdcKalTrackCol ) s_staticMdcKalTrackCol = 0;
135 m_mdcKalTrackCol->Delete();
136 delete m_mdcKalTrackCol;
137 m_mdcKalTrackCol = 0;
138
139 if(m_cgemKalTrackCol == s_staticCgemKalTrackCol ) s_staticCgemKalTrackCol = 0;
140 m_cgemKalTrackCol->Delete();
141 delete m_cgemKalTrackCol;
142 m_cgemKalTrackCol = 0;
143
144
145}
146
147//*****************************************************************
149}
150
151//*****************************************************************
152void TDstEvent::Clear(Option_t *option) {
153
154}
155
156//*****************************************************************************
157void TDstEvent::Print(Option_t *option) const {
158 TObject::Print(option);
159}
160
161
162/**************** Dst Track ************************/
163/// Mdc
165 m_mdcTrackCol->Add(Track);
166}
167
168const TMdcTrack* TDstEvent::getMdcTrack(Int_t i) const {
169 if (Int_t(i) >= m_mdcTrackCol->GetEntries())
170 return 0;
171 return (TMdcTrack*)m_mdcTrackCol->At(i);
172}
173/// Cgem
175 m_cgemTrackCol->Add(Track);
176}
177
178const TCgemTrack* TDstEvent::getCgemTrack(Int_t i) const {
179 if (Int_t(i) >= m_cgemTrackCol->GetEntries())
180 return 0;
181 return (TCgemTrack*)m_cgemTrackCol->At(i);
182}
183
185 m_cgemSegmentCol->Add(Segment);
186}
187
188const TCgemSegment* TDstEvent::getCgemSegment(Int_t i) const {
189 if (Int_t(i) >= m_cgemSegmentCol->GetEntries())
190 return 0;
191 return (TCgemSegment*)m_cgemSegmentCol->At(i);
192}
193///Emc
195 m_emcTrackCol->Add(Track);
196}
197
198const TEmcTrack* TDstEvent::getEmcTrack( Int_t i) const {
199 if(Int_t(i) >= m_emcTrackCol->GetEntries())
200 return 0;
201 return (TEmcTrack*)m_emcTrackCol->At(i);
202}
203
204///Tof
206 m_tofTrackCol->Add(Track);
207}
208
209
210const TTofTrack* TDstEvent::getTofTrack(Int_t i) const {
211 if(Int_t(i) >=m_tofTrackCol->GetEntries())
212 return 0;
213 return (TTofTrack*) m_tofTrackCol->At(i);
214}
215 ///Muc
217 m_mucTrackCol->Add(Track);
218}
219
220
221const TMucTrack* TDstEvent::getMucTrack(Int_t i) const {
222 if(Int_t(i) >=m_mucTrackCol->GetEntries())
223 return 0;
224 return (TMucTrack*) m_mucTrackCol->At(i);
225}
226 ///Dedx
228 m_mdcDedxCol->Add(Track);
229}
230
231
232const TMdcDedx* TDstEvent::getMdcDedx(Int_t i) const {
233 if(Int_t(i) >=m_mdcDedxCol->GetEntries())
234 return 0;
235 return (TMdcDedx*) m_mdcDedxCol->At(i);
236}
237
239 m_cgemDedxCol->Add(Track);
240}
241
242
243const TCgemDedx* TDstEvent::getCgemDedx(Int_t i) const {
244 if(Int_t(i) >=m_cgemDedxCol->GetEntries())
245 return 0;
246 return (TCgemDedx*) m_cgemDedxCol->At(i);
247}
248
249// Ext
251 m_extTrackCol->Add(Track);
252}
253
254const TExtTrack* TDstEvent::getExtTrack(Int_t i) const {
255 if(Int_t(i) >=m_extTrackCol->GetEntries())
256 return 0;
257 return (TExtTrack*) m_extTrackCol->At(i);
258}
259
260//MdcKal
262 m_mdcKalTrackCol->Add(Track);
263}
264
265const TMdcKalTrack* TDstEvent::getMdcKalTrack(Int_t i) const {
266 if(Int_t(i) >=m_mdcKalTrackCol->GetEntries())
267 return 0;
268 return (TMdcKalTrack*) m_mdcKalTrackCol->At(i);
269}
270
271//CgemKal
273 m_cgemKalTrackCol->Add(Track);
274}
275
276const TCgemKalTrack* TDstEvent::getCgemKalTrack(Int_t i) const {
277 if(Int_t(i) >=m_cgemKalTrackCol->GetEntries())
278 return 0;
279 return (TCgemKalTrack*) m_cgemKalTrackCol->At(i);
280}
281
ClassImp(TBossFullEvent) TBossFullEvent
const TCgemDedx * getCgemDedx(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
void addMdcTrack(TMdcTrack *Track)
Add a Tkrtrack into the Mdc data collection.
const TMdcDedx * getMdcDedx(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
void addEmcTrack(TEmcTrack *Track)
Add a TkrTrack into the Emc data collection.
const TEmcTrack * getEmcTrack(Int_t i) const
retrieve a EmcTrack from the collection, using the index into the array
void addExtTrack(TExtTrack *Track)
Add a ExtTrack into the Ext Data collection.
void addCgemDedx(TCgemDedx *Track)
Add a Dedx into the TOF Data collection.
void addCgemTrack(TCgemTrack *Track)
Add a tkrtrack into the Cgem data collection.
void addMdcKalTrack(TMdcKalTrack *Track)
void addMucTrack(TMucTrack *Track)
Add a MucTrack into the TOF Data collection.
const TCgemTrack * getCgemTrack(Int_t i) const
retrieve a CgemTrack from the collection, using the index into the array
void Print(Option_t *option="") const
const TExtTrack * getExtTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
void addCgemSegment(TCgemSegment *Segment)
Add a segment into the Cgem data collection.
void addCgemKalTrack(TCgemKalTrack *Track)
void addMdcDedx(TMdcDedx *Track)
Add a Dedx into the TOF Data collection.
const TMdcKalTrack * getMdcKalTrack(Int_t i) const
const TTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
const TMdcTrack * getMdcTrack(Int_t i) const
retrieve a Mdctrack from the collection, using the index into the array
void Clear(Option_t *option="")
const TCgemKalTrack * getCgemKalTrack(Int_t i) const
void addTofTrack(TTofTrack *Track)
Add a TofTrack into the TOF Data collection.
const TCgemSegment * getCgemSegment(Int_t i) const
retrieve a CgemSegment from the collection, using the index into the array