1#include "RootEventData/TDigiEvent.h"
3#include "TCollection.h"
8TObjArray *TDigiEvent::s_staticMdcDigiCol = 0;
9TObjArray *TDigiEvent::s_staticEmcDigiCol = 0;
10TObjArray *TDigiEvent::s_staticTofDigiCol = 0;
11TObjArray *TDigiEvent::s_staticMucDigiCol = 0;
12TObjArray *TDigiEvent::s_staticLumiDigiCol = 0;
18 if (!s_staticMdcDigiCol) {
19 s_staticMdcDigiCol =
new TObjArray();
21 m_mdcDigiCol = s_staticMdcDigiCol;
23 if (!s_staticEmcDigiCol ){
24 s_staticEmcDigiCol =
new TObjArray();
26 m_emcDigiCol = s_staticEmcDigiCol;
28 if (! s_staticTofDigiCol ){
29 s_staticTofDigiCol =
new TObjArray();
31 m_tofDigiCol = s_staticTofDigiCol;
33 if (! s_staticMucDigiCol ){
34 s_staticMucDigiCol =
new TObjArray();
36 m_mucDigiCol = s_staticMucDigiCol;
38 if (! s_staticLumiDigiCol ) {
39 s_staticLumiDigiCol =
new TObjArray();
41 m_lumiDigiCol = s_staticLumiDigiCol;
50 if(m_mdcDigiCol == s_staticMdcDigiCol) s_staticMdcDigiCol = 0;
51 m_mdcDigiCol->Delete();
55 if(m_emcDigiCol == s_staticEmcDigiCol) s_staticEmcDigiCol = 0;
56 m_emcDigiCol->Delete();
60 if(m_tofDigiCol == s_staticTofDigiCol ) s_staticTofDigiCol = 0;
61 m_tofDigiCol->Delete();
65 if(m_mucDigiCol == s_staticMucDigiCol ) s_staticMucDigiCol = 0;
66 m_mucDigiCol->Delete();
70 if ( m_lumiDigiCol == s_staticLumiDigiCol ) s_staticLumiDigiCol = 0;
71 m_lumiDigiCol->Delete();
111 TObject::Print(option);
112 std::cout.precision(2);
114 std::cout <<
"Number of TMdcDigis " << m_mdcDigiCol->GetEntries() << std::endl;
116 std::cout <<
"Number of TMdcDigis 0" << std::endl;
121 m_mdcDigiCol->Add(digi);
125 if (Int_t(i) >= m_mdcDigiCol->GetEntries())
127 return (
TMdcDigi*)m_mdcDigiCol->At(i);
131 m_emcDigiCol->Add(digi);
135 if(Int_t(i) >= m_emcDigiCol->GetEntries())
137 return (
TEmcDigi*)m_emcDigiCol->At(i);
142 m_tofDigiCol->Add(digi);
147 if(Int_t(i) >=m_tofDigiCol->GetEntries())
149 return (
TTofDigi*) m_tofDigiCol->At(i);
154 m_mucDigiCol->Add(digi);
159 if(Int_t(i) >=m_mucDigiCol->GetEntries())
161 return (
TMucDigi*) m_mucDigiCol->At(i);
166 m_lumiDigiCol->Add(digi);
170 if ( i >= m_lumiDigiCol->GetEntries() )
172 return (
TLumiDigi*) m_lumiDigiCol->At(i);
ClassImp(TBossFullEvent) TBossFullEvent
void addMucDigi(TMucDigi *digi)
Add a MucDigi into the MUC Data collection.
void addEmcDigi(TEmcDigi *digi)
Add a TkrDigi into the TKR data collection.
const TMucDigi * getMucDigi(Int_t i) const
retrieve a MucDigi From the collection, using the index into the array
void Print(Option_t *option="") const
void initialize(Bool_t fromMc=true)
void Clear(Option_t *option="")
const TMdcDigi * getMdcDigi(Int_t i) const
retrieve a TkrDigi from the collection, using the index into the array
void addTofDigi(TTofDigi *digi)
Add a TofDigi into the TOF Data collection.
const TEmcDigi * getEmcDigi(Int_t i) const
retrieve a EmcDigi from the collection, using the index into the array
void addMdcDigi(TMdcDigi *digi)
Add a TkrDigi into the TKR data collection.
const TLumiDigi * getLumiDigi(Int_t i) const
retrieve a LumiDigi From the collection, using the index into the array
void addLumiDigi(TLumiDigi *digi)
Add a LumiDigi into the MUC Data collection.
const TTofDigi * getTofDigi(Int_t i) const
retrieve a TofDigi From the collection, using the index into the array