BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
TDstEvent.cxx
Go to the documentation of this file.
2#include "TCollection.h" // Declares TIter
3
5
6// Allocate the TObjArray just once
7
8TObjArray *TDstEvent::s_staticMdcTrackCol = 0;
9TObjArray *TDstEvent::s_staticEmcTrackCol = 0;
10TObjArray *TDstEvent::s_staticTofTrackCol = 0;
11TObjArray *TDstEvent::s_staticMucTrackCol = 0;
12TObjArray *TDstEvent::s_staticMdcDedxCol = 0;
13TObjArray *TDstEvent::s_staticExtTrackCol = 0;
14TObjArray *TDstEvent::s_staticMdcKalTrackCol = 0;
15
16//***************************************************************
18{
19 //Dst Track
20
21 if (!s_staticMdcTrackCol) {
22 s_staticMdcTrackCol = new TObjArray();
23 }
24 m_mdcTrackCol = s_staticMdcTrackCol;
25
26 if (!s_staticEmcTrackCol ){
27 s_staticEmcTrackCol = new TObjArray();
28 }
29 m_emcTrackCol = s_staticEmcTrackCol;
30
31 if (! s_staticTofTrackCol ){
32 s_staticTofTrackCol = new TObjArray();
33 }
34 m_tofTrackCol = s_staticTofTrackCol;
35
36 if (! s_staticMucTrackCol ){
37 s_staticMucTrackCol = new TObjArray();
38 }
39 m_mucTrackCol = s_staticMucTrackCol;
40
41 if (! s_staticMdcDedxCol ){
42 s_staticMdcDedxCol = new TObjArray();
43 }
44 m_mdcDedxCol = s_staticMdcDedxCol;
45
46 if (! s_staticExtTrackCol ){
47 s_staticExtTrackCol = new TObjArray();
48 }
49 m_extTrackCol = s_staticExtTrackCol;
50
51
52 if (! s_staticMdcKalTrackCol ){
53 s_staticMdcKalTrackCol = new TObjArray();
54 }
55 m_mdcKalTrackCol = s_staticMdcKalTrackCol;
56
57 Clear();
58
59}
60
61//*****************************************************************
63
64 /**************************** Dst Track *************************/
65 if(m_mdcTrackCol == s_staticMdcTrackCol) s_staticMdcTrackCol = 0;
66 m_mdcTrackCol->Delete();
67 delete m_mdcTrackCol;
68 m_mdcTrackCol = 0;
69
70 if(m_emcTrackCol == s_staticEmcTrackCol) s_staticEmcTrackCol = 0;
71 m_emcTrackCol->Delete();
72 delete m_emcTrackCol;
73 m_emcTrackCol = 0;
74
75 if(m_tofTrackCol == s_staticTofTrackCol ) s_staticTofTrackCol = 0;
76 m_tofTrackCol->Delete();
77 delete m_tofTrackCol;
78 m_tofTrackCol = 0;
79
80 if(m_mucTrackCol == s_staticMucTrackCol ) s_staticMucTrackCol = 0;
81 m_mucTrackCol->Delete();
82 delete m_mucTrackCol;
83 m_mucTrackCol = 0;
84
85 if(m_mdcDedxCol == s_staticMdcDedxCol ) s_staticMdcDedxCol = 0;
86 m_mdcDedxCol->Delete();
87 delete m_mdcDedxCol;
88 m_mdcDedxCol = 0;
89
90 if(m_extTrackCol == s_staticExtTrackCol ) s_staticExtTrackCol = 0;
91 m_extTrackCol->Delete();
92 delete m_extTrackCol;
93 m_extTrackCol = 0;
94
95 if(m_mdcKalTrackCol == s_staticMdcKalTrackCol ) s_staticMdcKalTrackCol = 0;
96 m_mdcKalTrackCol->Delete();
97 delete m_mdcKalTrackCol;
98 m_mdcKalTrackCol = 0;
99
100
101}
102
103//*****************************************************************
106
107//*****************************************************************
108void TDstEvent::Clear(Option_t *option) {
109
110}
111
112//*****************************************************************************
113void TDstEvent::Print(Option_t *option) const {
114 TObject::Print(option);
115}
116
117
118/**************** Dst Track ************************/
119/// Mdc
121 m_mdcTrackCol->Add(Track);
122}
123
124const TMdcTrack* TDstEvent::getMdcTrack(Int_t i) const {
125 if (Int_t(i) >= m_mdcTrackCol->GetEntries())
126 return 0;
127 return (TMdcTrack*)m_mdcTrackCol->At(i);
128}
129///Emc
131 m_emcTrackCol->Add(Track);
132}
133
134const TEmcTrack* TDstEvent::getEmcTrack( Int_t i) const {
135 if(Int_t(i) >= m_emcTrackCol->GetEntries())
136 return 0;
137 return (TEmcTrack*)m_emcTrackCol->At(i);
138}
139
140///Tof
142 m_tofTrackCol->Add(Track);
143}
144
145
146const TTofTrack* TDstEvent::getTofTrack(Int_t i) const {
147 if(Int_t(i) >=m_tofTrackCol->GetEntries())
148 return 0;
149 return (TTofTrack*) m_tofTrackCol->At(i);
150}
151 ///Muc
153 m_mucTrackCol->Add(Track);
154}
155
156
157const TMucTrack* TDstEvent::getMucTrack(Int_t i) const {
158 if(Int_t(i) >=m_mucTrackCol->GetEntries())
159 return 0;
160 return (TMucTrack*) m_mucTrackCol->At(i);
161}
162 ///Dedx
164 m_mdcDedxCol->Add(Track);
165}
166
167
168const TMdcDedx* TDstEvent::getMdcDedx(Int_t i) const {
169 if(Int_t(i) >=m_mdcDedxCol->GetEntries())
170 return 0;
171 return (TMdcDedx*) m_mdcDedxCol->At(i);
172}
173
174// Ext
176 m_extTrackCol->Add(Track);
177}
178
179const TExtTrack* TDstEvent::getExtTrack(Int_t i) const {
180 if(Int_t(i) >=m_extTrackCol->GetEntries())
181 return 0;
182 return (TExtTrack*) m_extTrackCol->At(i);
183}
184
185//MdcKal
187 m_mdcKalTrackCol->Add(Track);
188}
189
191 if(Int_t(i) >=m_mdcKalTrackCol->GetEntries())
192 return 0;
193 return (TMdcKalTrack*) m_mdcKalTrackCol->At(i);
194}
195
ClassImp(TBossFullEvent) TBossFullEvent
#define Track
Definition TTrackBase.h:30
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.
void initialize()
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 addMdcKalTrack(TMdcKalTrack *Track)
void addMucTrack(TMucTrack *Track)
Add a MucTrack into the TOF Data collection.
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 addMdcDedx(TMdcDedx *Track)
Add a Dedx into the TOF Data collection.
const TMdcKalTrack * getMdcKalTrack(Int_t i) const
virtual ~TDstEvent()
Definition TDstEvent.cxx:62
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="")
void addTofTrack(TTofTrack *Track)
Add a TofTrack into the TOF Data collection.