BOSS 7.0.7
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 * 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 14 of file TDigiEvent.h.

Constructor & Destructor Documentation

◆ TDigiEvent()

TDigiEvent::TDigiEvent ( )

Definition at line 16 of file TDigiEvent.cxx.

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

◆ ~TDigiEvent()

TDigiEvent::~TDigiEvent ( )
virtual

Definition at line 48 of file TDigiEvent.cxx.

48 {
49
50 if(m_mdcDigiCol == s_staticMdcDigiCol) s_staticMdcDigiCol = 0;
51 m_mdcDigiCol->Delete();
52 delete m_mdcDigiCol;
53 m_mdcDigiCol = 0;
54
55 if(m_emcDigiCol == s_staticEmcDigiCol) s_staticEmcDigiCol = 0;
56 m_emcDigiCol->Delete();
57 delete m_emcDigiCol;
58 m_emcDigiCol = 0;
59
60 if(m_tofDigiCol == s_staticTofDigiCol ) s_staticTofDigiCol = 0;
61 m_tofDigiCol->Delete();
62 delete m_tofDigiCol;
63 m_tofDigiCol = 0;
64
65 if(m_mucDigiCol == s_staticMucDigiCol ) s_staticMucDigiCol = 0;
66 m_mucDigiCol->Delete();
67 delete m_mucDigiCol;
68 m_mucDigiCol = 0;
69
70 if ( m_lumiDigiCol == s_staticLumiDigiCol ) s_staticLumiDigiCol = 0;
71 m_lumiDigiCol->Delete();
72 delete m_lumiDigiCol;
73 m_lumiDigiCol = 0;
74
75}

Member Function Documentation

◆ addEmcDigi()

void TDigiEvent::addEmcDigi ( TEmcDigi digi)

Add a TkrDigi into the TKR data collection.

Emc.

Definition at line 130 of file TDigiEvent.cxx.

130 {
131 m_emcDigiCol->Add(digi);
132}

Referenced by EmcDigiCnv::DataObjectToTObject().

◆ addLumiDigi()

void TDigiEvent::addLumiDigi ( TLumiDigi digi)

Add a LumiDigi into the MUC Data collection.

Lumi.

Definition at line 165 of file TDigiEvent.cxx.

165 {
166 m_lumiDigiCol->Add(digi);
167}

Referenced by LumiDigiCnv::DataObjectToTObject().

◆ addMdcDigi()

void TDigiEvent::addMdcDigi ( TMdcDigi digi)

Add a TkrDigi into the TKR data collection.

Mdc.

Definition at line 120 of file TDigiEvent.cxx.

120 {
121 m_mdcDigiCol->Add(digi);
122}

Referenced by MdcDigiCnv::DataObjectToTObject().

◆ addMucDigi()

void TDigiEvent::addMucDigi ( TMucDigi digi)

Add a MucDigi into the MUC Data collection.

Muc.

Definition at line 153 of file TDigiEvent.cxx.

153 {
154 m_mucDigiCol->Add(digi);
155}

Referenced by MucDigiCnv::DataObjectToTObject().

◆ addTofDigi()

void TDigiEvent::addTofDigi ( TTofDigi digi)

Add a TofDigi into the TOF Data collection.

Tof.

Definition at line 141 of file TDigiEvent.cxx.

141 {
142 m_tofDigiCol->Add(digi);
143}

Referenced by TofDigiCnv::DataObjectToTObject().

◆ Clear()

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

Definition at line 83 of file TDigiEvent.cxx.

83 {
84 /*
85 const Int_t nd = 20000;
86 static Int_t limit = 100;
87 static Int_t ind=0;
88 static TMdcDigi* keep[nd];
89
90
91 Int_t n = m_mdcDigiCol->GetEntries();
92 if (n>limit) {
93 limit=n+10;
94 if (limit > nd)
95 std::cout << "!!!Warning: limit for TMdcDigi is greater than " << nd << std::endl;
96 for (Int_t j=0;j<ind;j++) delete keep[j];
97 ind = 0;
98 }
99 for (Int_t i=0;i<n;i++) keep[ind+i] = (TMdcDigi*)m_mdcDigiCol->At(i);
100 ind += n;
101 if (ind > nd-limit) {
102 for (Int_t j=0;j<ind;j++) delete keep[j];
103 ind = 0;
104 }
105 m_mdcDigiCol->Clear();
106*/
107}

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

◆ clearEmcDigiCol()

void TDigiEvent::clearEmcDigiCol ( )
inline

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

Definition at line 53 of file TDigiEvent.h.

53{ m_emcDigiCol->Clear(); }

Referenced by EmcDigiCnv::DataObjectToTObject().

◆ clearLumiDigiCol()

void TDigiEvent::clearLumiDigiCol ( )
inline

clear the whole array

Definition at line 89 of file TDigiEvent.h.

89{ 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 40 of file TDigiEvent.h.

40{ m_mdcDigiCol->Clear(); }

Referenced by MdcDigiCnv::DataObjectToTObject().

◆ clearMucDigiCol()

void TDigiEvent::clearMucDigiCol ( )
inline

clear the whole array

Definition at line 77 of file TDigiEvent.h.

77{ m_mucDigiCol->Clear();}

Referenced by MucDigiCnv::DataObjectToTObject().

◆ clearTofDigiCol()

void TDigiEvent::clearTofDigiCol ( )
inline

clear the whole array

Definition at line 65 of file TDigiEvent.h.

65{ m_tofDigiCol->Clear();}

Referenced by TofDigiCnv::DataObjectToTObject().

◆ getEmcDigi()

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

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

Definition at line 134 of file TDigiEvent.cxx.

134 {
135 if(Int_t(i) >= m_emcDigiCol->GetEntries())
136 return 0;
137 return (TEmcDigi*)m_emcDigiCol->At(i);
138}

Referenced by BesEvent::GetEmcDigi().

◆ getEmcDigiCol()

const TObjArray * TDigiEvent::getEmcDigiCol ( ) const
inline

retrieve the whole TObjArray of TkrDigi Data

Definition at line 44 of file TDigiEvent.h.

44{ return m_emcDigiCol; };

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

◆ getFromMc()

Bool_t TDigiEvent::getFromMc ( )
inline

Definition at line 27 of file TDigiEvent.h.

27{ 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 169 of file TDigiEvent.cxx.

169 {
170 if ( i >= m_lumiDigiCol->GetEntries() )
171 return 0;
172 return (TLumiDigi*) m_lumiDigiCol->At(i);
173}

◆ getLumiDigiCol()

const TObjArray * TDigiEvent::getLumiDigiCol ( ) const
inline

retrieve the whole TObjArray of LumiDigi Data

Definition at line 80 of file TDigiEvent.h.

80{ 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 124 of file TDigiEvent.cxx.

124 {
125 if (Int_t(i) >= m_mdcDigiCol->GetEntries())
126 return 0;
127 return (TMdcDigi*)m_mdcDigiCol->At(i);
128}

Referenced by BesEvent::GetMdcDigi().

◆ getMdcDigiCol()

const TObjArray * TDigiEvent::getMdcDigiCol ( ) const
inline

retrieve the whole TObjArray of TkrDigi Data

Definition at line 31 of file TDigiEvent.h.

31{ 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 158 of file TDigiEvent.cxx.

158 {
159 if(Int_t(i) >=m_mucDigiCol->GetEntries())
160 return 0;
161 return (TMucDigi*) m_mucDigiCol->At(i);
162}

Referenced by BesEvent::GetMucDigi().

◆ getMucDigiCol()

const TObjArray * TDigiEvent::getMucDigiCol ( ) const
inline

retrieve the whole TObjArray of MucDigi Data

Definition at line 68 of file TDigiEvent.h.

68{ 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 146 of file TDigiEvent.cxx.

146 {
147 if(Int_t(i) >=m_tofDigiCol->GetEntries())
148 return 0;
149 return (TTofDigi*) m_tofDigiCol->At(i);
150}

Referenced by BesEvent::GetTofDigi().

◆ getTofDigiCol()

const TObjArray * TDigiEvent::getTofDigiCol ( ) const
inline

retrieve the whole TObjArray of TofDigi Data

Definition at line 56 of file TDigiEvent.h.

56{ return m_tofDigiCol; };

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

◆ initialize()

void TDigiEvent::initialize ( Bool_t  fromMc = true)

Definition at line 78 of file TDigiEvent.cxx.

78 {
79 m_fromMc = fromMc;
80}

Referenced by DigiCnv::DataObjectToTObject().

◆ Print()

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

Definition at line 110 of file TDigiEvent.cxx.

110 {
111 TObject::Print(option);
112 std::cout.precision(2);
113 if (m_mdcDigiCol)
114 std::cout << "Number of TMdcDigis " << m_mdcDigiCol->GetEntries() << std::endl;
115 else
116 std::cout << "Number of TMdcDigis 0" << std::endl;
117}

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