CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TDigiEvent Class Reference

#include <TDigiEvent.h>

+ Inheritance diagram for TDigiEvent:

Public Member Functions

 TDigiEvent ()
 
virtual ~TDigiEvent ()
 
void initialize (Bool_t fromMc=true)
 
void Clear (Option_t *option="")
 
void Print (Option_t *option="") const
 
Bool_t getFromMc ()
 
const TObjArray * getMdcDigiCol () const
 retrieve the whole TObjArray of TkrDigi Data
 
void addMdcDigi (TMdcDigi *digi)
 Add a TkrDigi into the TKR data collection.
 
const TMdcDigigetMdcDigi (Int_t i) const
 retrieve a TkrDigi from the collection, using the index into the array
 
void clearMdcDigiCol ()
 clear the whole array (necessary because of the consts-s)
 
const TObjArray * getCgemDigiCol () const
 retrieve the whole TObjArray of TkrDigi Data
 
void addCgemDigi (TCgemDigi *digi)
 Add a TkrDigi into the TKR data collection.
 
const TCgemDigigetCgemDigi (Int_t i) const
 retrieve a TkrDigi from the collection, using the index into the array
 
void clearCgemDigiCol ()
 clear the whole array (necessary because of the consts-s)
 
const TObjArray * getEmcDigiCol () const
 retrieve the whole TObjArray of TkrDigi Data
 
void addEmcDigi (TEmcDigi *digi)
 Add a TkrDigi into the TKR data collection.
 
const TEmcDigigetEmcDigi (Int_t i) const
 retrieve a EmcDigi from the collection, using the index into the array
 
void clearEmcDigiCol ()
 clear the whole array (necessary because of the consts-s)
 
const TObjArray * getTofDigiCol () const
 retrieve the whole TObjArray of TofDigi Data
 
void addTofDigi (TTofDigi *digi)
 Add a TofDigi into the TOF Data collection.
 
const TTofDigigetTofDigi (Int_t i) const
 retrieve a TofDigi From the collection, using the index into the array
 
void clearTofDigiCol ()
 clear the whole array
 
const TObjArray * getMucDigiCol () const
 retrieve the whole TObjArray of MucDigi Data
 
void addMucDigi (TMucDigi *digi)
 Add a MucDigi into the MUC Data collection.
 
const TMucDigigetMucDigi (Int_t i) const
 retrieve a MucDigi From the collection, using the index into the array
 
void clearMucDigiCol ()
 clear the whole array
 
const TObjArray * getLumiDigiCol () const
 retrieve the whole TObjArray of LumiDigi Data
 
void addLumiDigi (TLumiDigi *digi)
 Add a LumiDigi into the MUC Data collection.
 
const TLumiDigigetLumiDigi (Int_t i) const
 retrieve a LumiDigi From the collection, using the index into the array
 
void clearLumiDigiCol ()
 clear the whole array
 

Detailed Description

Definition at line 15 of file TDigiEvent.h.

Constructor & Destructor Documentation

◆ TDigiEvent()

TDigiEvent::TDigiEvent ( )

Definition at line 17 of file TDigiEvent.cxx.

18{
19 if (!s_staticMdcDigiCol) {
20 s_staticMdcDigiCol = new TObjArray();
21 }
22 m_mdcDigiCol = s_staticMdcDigiCol;
23
24 if (!s_staticCgemDigiCol) {
25 s_staticCgemDigiCol = new TObjArray();
26 }
27 m_cgemDigiCol = s_staticCgemDigiCol;
28
29 if (!s_staticEmcDigiCol ){
30 s_staticEmcDigiCol = new TObjArray();
31 }
32 m_emcDigiCol = s_staticEmcDigiCol;
33
34 if (! s_staticTofDigiCol ){
35 s_staticTofDigiCol = new TObjArray();
36 }
37 m_tofDigiCol = s_staticTofDigiCol;
38
39 if (! s_staticMucDigiCol ){
40 s_staticMucDigiCol = new TObjArray();
41 }
42 m_mucDigiCol = s_staticMucDigiCol;
43
44 if (! s_staticLumiDigiCol ) {
45 s_staticLumiDigiCol = new TObjArray();
46 }
47 m_lumiDigiCol = s_staticLumiDigiCol;
48
49 Clear();
50
51}
void Clear(Option_t *option="")
Definition: TDigiEvent.cxx:94

◆ ~TDigiEvent()

TDigiEvent::~TDigiEvent ( )
virtual

Definition at line 54 of file TDigiEvent.cxx.

54 {
55
56 if(m_mdcDigiCol == s_staticMdcDigiCol) s_staticMdcDigiCol = 0;
57 m_mdcDigiCol->Delete();
58 delete m_mdcDigiCol;
59 m_mdcDigiCol = 0;
60
61 if(m_cgemDigiCol == s_staticCgemDigiCol) s_staticCgemDigiCol = 0;
62 m_cgemDigiCol->Delete();
63 delete m_cgemDigiCol;
64 m_cgemDigiCol = 0;
65
66 if(m_emcDigiCol == s_staticEmcDigiCol) s_staticEmcDigiCol = 0;
67 m_emcDigiCol->Delete();
68 delete m_emcDigiCol;
69 m_emcDigiCol = 0;
70
71 if(m_tofDigiCol == s_staticTofDigiCol ) s_staticTofDigiCol = 0;
72 m_tofDigiCol->Delete();
73 delete m_tofDigiCol;
74 m_tofDigiCol = 0;
75
76 if(m_mucDigiCol == s_staticMucDigiCol ) s_staticMucDigiCol = 0;
77 m_mucDigiCol->Delete();
78 delete m_mucDigiCol;
79 m_mucDigiCol = 0;
80
81 if ( m_lumiDigiCol == s_staticLumiDigiCol ) s_staticLumiDigiCol = 0;
82 m_lumiDigiCol->Delete();
83 delete m_lumiDigiCol;
84 m_lumiDigiCol = 0;
85
86}

Member Function Documentation

◆ addCgemDigi()

void TDigiEvent::addCgemDigi ( TCgemDigi digi)

Add a TkrDigi into the TKR data collection.

Cgem.

Definition at line 146 of file TDigiEvent.cxx.

146 {
147 m_cgemDigiCol->Add(digi);
148}

Referenced by CgemDigiCnv::DataObjectToTObject().

◆ addEmcDigi()

void TDigiEvent::addEmcDigi ( TEmcDigi digi)

Add a TkrDigi into the TKR data collection.

Emc.

Definition at line 156 of file TDigiEvent.cxx.

156 {
157 m_emcDigiCol->Add(digi);
158}

Referenced by EmcDigiCnv::DataObjectToTObject().

◆ addLumiDigi()

void TDigiEvent::addLumiDigi ( TLumiDigi digi)

Add a LumiDigi into the MUC Data collection.

Lumi.

Definition at line 191 of file TDigiEvent.cxx.

191 {
192 m_lumiDigiCol->Add(digi);
193}

Referenced by LumiDigiCnv::DataObjectToTObject().

◆ addMdcDigi()

void TDigiEvent::addMdcDigi ( TMdcDigi digi)

Add a TkrDigi into the TKR data collection.

Mdc.

Definition at line 136 of file TDigiEvent.cxx.

136 {
137 m_mdcDigiCol->Add(digi);
138}

Referenced by MdcDigiCnv::DataObjectToTObject().

◆ addMucDigi()

void TDigiEvent::addMucDigi ( TMucDigi digi)

Add a MucDigi into the MUC Data collection.

Muc.

Definition at line 179 of file TDigiEvent.cxx.

179 {
180 m_mucDigiCol->Add(digi);
181}

Referenced by MucDigiCnv::DataObjectToTObject().

◆ addTofDigi()

void TDigiEvent::addTofDigi ( TTofDigi digi)

Add a TofDigi into the TOF Data collection.

Tof.

Definition at line 167 of file TDigiEvent.cxx.

167 {
168 m_tofDigiCol->Add(digi);
169}

Referenced by TofDigiCnv::DataObjectToTObject().

◆ Clear()

void TDigiEvent::Clear ( Option_t *  option = "")

Definition at line 94 of file TDigiEvent.cxx.

94 {
95 /*
96 const Int_t nd = 20000;
97 static Int_t limit = 100;
98 static Int_t ind=0;
99 static TMdcDigi* keep[nd];
100
101
102 Int_t n = m_mdcDigiCol->GetEntries();
103 if (n>limit) {
104 limit=n+10;
105 if (limit > nd)
106 std::cout << "!!!Warning: limit for TMdcDigi is greater than " << nd << std::endl;
107 for (Int_t j=0;j<ind;j++) delete keep[j];
108 ind = 0;
109 }
110 for (Int_t i=0;i<n;i++) keep[ind+i] = (TMdcDigi*)m_mdcDigiCol->At(i);
111 ind += n;
112 if (ind > nd-limit) {
113 for (Int_t j=0;j<ind;j++) delete keep[j];
114 ind = 0;
115 }
116 m_mdcDigiCol->Clear();
117*/
118}

Referenced by BesEvent::Clear(), RootCnvSvc::commitOutput(), and TDigiEvent().

◆ clearCgemDigiCol()

void TDigiEvent::clearCgemDigiCol ( )
inline

clear the whole array (necessary because of the consts-s)

Definition at line 53 of file TDigiEvent.h.

53{ m_cgemDigiCol->Clear(); }

Referenced by CgemDigiCnv::DataObjectToTObject().

◆ clearEmcDigiCol()

void TDigiEvent::clearEmcDigiCol ( )
inline

clear the whole array (necessary because of the consts-s)

Definition at line 66 of file TDigiEvent.h.

66{ m_emcDigiCol->Clear(); }

Referenced by EmcDigiCnv::DataObjectToTObject().

◆ clearLumiDigiCol()

void TDigiEvent::clearLumiDigiCol ( )
inline

clear the whole array

Definition at line 102 of file TDigiEvent.h.

102{ m_lumiDigiCol->Clear();}

Referenced by LumiDigiCnv::DataObjectToTObject().

◆ clearMdcDigiCol()

void TDigiEvent::clearMdcDigiCol ( )
inline

clear the whole array (necessary because of the consts-s)

Definition at line 41 of file TDigiEvent.h.

41{ m_mdcDigiCol->Clear(); }

Referenced by MdcDigiCnv::DataObjectToTObject().

◆ clearMucDigiCol()

void TDigiEvent::clearMucDigiCol ( )
inline

clear the whole array

Definition at line 90 of file TDigiEvent.h.

90{ m_mucDigiCol->Clear();}

Referenced by MucDigiCnv::DataObjectToTObject().

◆ clearTofDigiCol()

void TDigiEvent::clearTofDigiCol ( )
inline

clear the whole array

Definition at line 78 of file TDigiEvent.h.

78{ m_tofDigiCol->Clear();}

Referenced by TofDigiCnv::DataObjectToTObject().

◆ getCgemDigi()

const TCgemDigi * TDigiEvent::getCgemDigi ( Int_t  i) const

retrieve a TkrDigi from the collection, using the index into the array

Definition at line 150 of file TDigiEvent.cxx.

150 {
151 if (Int_t(i) >= m_cgemDigiCol->GetEntries())
152 return 0;
153 return (TCgemDigi*)m_cgemDigiCol->At(i);
154}

Referenced by BesEvent::GetCgemDigi().

◆ getCgemDigiCol()

const TObjArray * TDigiEvent::getCgemDigiCol ( ) const
inline

retrieve the whole TObjArray of TkrDigi Data

Definition at line 44 of file TDigiEvent.h.

44{ return m_cgemDigiCol; };

Referenced by CgemDigiCnv::DataObjectToTObject(), BesEvent::GetCgemDigiCol(), and BesEvent::GetCgemDigiNum().

◆ getEmcDigi()

const TEmcDigi * TDigiEvent::getEmcDigi ( Int_t  i) const

retrieve a EmcDigi from the collection, using the index into the array

Definition at line 160 of file TDigiEvent.cxx.

160 {
161 if(Int_t(i) >= m_emcDigiCol->GetEntries())
162 return 0;
163 return (TEmcDigi*)m_emcDigiCol->At(i);
164}

Referenced by BesEvent::GetEmcDigi().

◆ getEmcDigiCol()

const TObjArray * TDigiEvent::getEmcDigiCol ( ) const
inline

retrieve the whole TObjArray of TkrDigi Data

Definition at line 57 of file TDigiEvent.h.

57{ return m_emcDigiCol; };

Referenced by EmcDigiCnv::DataObjectToTObject(), BesEvent::GetEmcDigiCol(), and BesEvent::GetEmcDigiNum().

◆ getFromMc()

Bool_t TDigiEvent::getFromMc ( )
inline

Definition at line 28 of file TDigiEvent.h.

28{ return m_fromMc; };

Referenced by BesEvent::SetEvent().

◆ getLumiDigi()

const TLumiDigi * TDigiEvent::getLumiDigi ( Int_t  i) const

retrieve a LumiDigi From the collection, using the index into the array

Definition at line 195 of file TDigiEvent.cxx.

195 {
196 if ( i >= m_lumiDigiCol->GetEntries() )
197 return 0;
198 return (TLumiDigi*) m_lumiDigiCol->At(i);
199}

◆ getLumiDigiCol()

const TObjArray * TDigiEvent::getLumiDigiCol ( ) const
inline

retrieve the whole TObjArray of LumiDigi Data

Definition at line 93 of file TDigiEvent.h.

93{ return m_lumiDigiCol; };

Referenced by LumiDigiCnv::DataObjectToTObject().

◆ getMdcDigi()

const TMdcDigi * TDigiEvent::getMdcDigi ( Int_t  i) const

retrieve a TkrDigi from the collection, using the index into the array

Definition at line 140 of file TDigiEvent.cxx.

140 {
141 if (Int_t(i) >= m_mdcDigiCol->GetEntries())
142 return 0;
143 return (TMdcDigi*)m_mdcDigiCol->At(i);
144}

Referenced by BesEvent::GetMdcDigi().

◆ getMdcDigiCol()

const TObjArray * TDigiEvent::getMdcDigiCol ( ) const
inline

retrieve the whole TObjArray of TkrDigi Data

Definition at line 32 of file TDigiEvent.h.

32{ return m_mdcDigiCol; };

Referenced by MdcDigiCnv::DataObjectToTObject(), BesEvent::GetMdcDigiCol(), and BesEvent::GetMdcDigiNum().

◆ getMucDigi()

const TMucDigi * TDigiEvent::getMucDigi ( Int_t  i) const

retrieve a MucDigi From the collection, using the index into the array

Definition at line 184 of file TDigiEvent.cxx.

184 {
185 if(Int_t(i) >=m_mucDigiCol->GetEntries())
186 return 0;
187 return (TMucDigi*) m_mucDigiCol->At(i);
188}

Referenced by BesEvent::GetMucDigi().

◆ getMucDigiCol()

const TObjArray * TDigiEvent::getMucDigiCol ( ) const
inline

retrieve the whole TObjArray of MucDigi Data

Definition at line 81 of file TDigiEvent.h.

81{ return m_mucDigiCol; };

Referenced by MucDigiCnv::DataObjectToTObject(), BesEvent::GetMucDigiCol(), and BesEvent::GetMucDigiNum().

◆ getTofDigi()

const TTofDigi * TDigiEvent::getTofDigi ( Int_t  i) const

retrieve a TofDigi From the collection, using the index into the array

Definition at line 172 of file TDigiEvent.cxx.

172 {
173 if(Int_t(i) >=m_tofDigiCol->GetEntries())
174 return 0;
175 return (TTofDigi*) m_tofDigiCol->At(i);
176}

Referenced by BesEvent::GetTofDigi().

◆ getTofDigiCol()

const TObjArray * TDigiEvent::getTofDigiCol ( ) const
inline

retrieve the whole TObjArray of TofDigi Data

Definition at line 69 of file TDigiEvent.h.

69{ return m_tofDigiCol; };

Referenced by TofDigiCnv::DataObjectToTObject(), BesEvent::GetTofDigiCol(), and BesEvent::GetTofDigiNum().

◆ initialize()

void TDigiEvent::initialize ( Bool_t  fromMc = true)

Definition at line 89 of file TDigiEvent.cxx.

89 {
90 m_fromMc = fromMc;
91}

Referenced by DigiCnv::DataObjectToTObject().

◆ Print()

void TDigiEvent::Print ( Option_t *  option = "") const

Definition at line 121 of file TDigiEvent.cxx.

121 {
122 TObject::Print(option);
123 std::cout.precision(2);
124 if (m_mdcDigiCol)
125 std::cout << "Number of TMdcDigis " << m_mdcDigiCol->GetEntries() << std::endl;
126 else
127 std::cout << "Number of TMdcDigis 0" << std::endl;
128
129 if (m_cgemDigiCol)
130 std::cout << "Number of TCgemDigis " << m_cgemDigiCol->GetEntries() << std::endl;
131 else
132 std::cout << "Number of TCgemDigis 0" << std::endl;
133}

The documentation for this class was generated from the following files: