#include <TDigiEvent.h>
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 TMdcDigi * | getMdcDigi (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 TEmcDigi * | getEmcDigi (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 TTofDigi * | getTofDigi (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 TMucDigi * | getMucDigi (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 TLumiDigi * | getLumiDigi (Int_t i) const |
retrieve a LumiDigi From the collection, using the index into the array | |
void | clearLumiDigiCol () |
clear the whole array | |
Private Attributes | |
Bool_t | m_fromMc |
Denote whether or not this data was simulated. | |
TObjArray * | m_mdcDigiCol |
TObjArray * | m_emcDigiCol |
TObjArray * | m_tofDigiCol |
TObjArray * | m_mucDigiCol |
TObjArray * | m_lumiDigiCol |
Static Private Attributes | |
static TObjArray * | s_staticMdcDigiCol |
data members to store Mdc data | |
static TObjArray * | s_staticEmcDigiCol |
data members to store Emc data | |
static TObjArray * | s_staticTofDigiCol = 0 |
data members to store Tof data | |
static TObjArray * | s_staticMucDigiCol = 0 |
data members to store Muc data | |
static TObjArray * | s_staticLumiDigiCol = 0 |
data members to store Lumi data |
Definition at line 14 of file TDigiEvent.h.
TDigiEvent::TDigiEvent | ( | ) |
Definition at line 16 of file TDigiEvent.cxx.
00017 { 00018 if (!s_staticMdcDigiCol) { 00019 s_staticMdcDigiCol = new TObjArray(); 00020 } 00021 m_mdcDigiCol = s_staticMdcDigiCol; 00022 00023 if (!s_staticEmcDigiCol ){ 00024 s_staticEmcDigiCol = new TObjArray(); 00025 } 00026 m_emcDigiCol = s_staticEmcDigiCol; 00027 00028 if (! s_staticTofDigiCol ){ 00029 s_staticTofDigiCol = new TObjArray(); 00030 } 00031 m_tofDigiCol = s_staticTofDigiCol; 00032 00033 if (! s_staticMucDigiCol ){ 00034 s_staticMucDigiCol = new TObjArray(); 00035 } 00036 m_mucDigiCol = s_staticMucDigiCol; 00037 00038 if (! s_staticLumiDigiCol ) { 00039 s_staticLumiDigiCol = new TObjArray(); 00040 } 00041 m_lumiDigiCol = s_staticLumiDigiCol; 00042 00043 Clear(); 00044 00045 }
TDigiEvent::~TDigiEvent | ( | ) | [virtual] |
Definition at line 48 of file TDigiEvent.cxx.
References m_emcDigiCol, m_lumiDigiCol, m_mdcDigiCol, m_mucDigiCol, m_tofDigiCol, s_staticEmcDigiCol, s_staticLumiDigiCol, s_staticMdcDigiCol, s_staticMucDigiCol, and s_staticTofDigiCol.
00048 { 00049 00050 if(m_mdcDigiCol == s_staticMdcDigiCol) s_staticMdcDigiCol = 0; 00051 m_mdcDigiCol->Delete(); 00052 delete m_mdcDigiCol; 00053 m_mdcDigiCol = 0; 00054 00055 if(m_emcDigiCol == s_staticEmcDigiCol) s_staticEmcDigiCol = 0; 00056 m_emcDigiCol->Delete(); 00057 delete m_emcDigiCol; 00058 m_emcDigiCol = 0; 00059 00060 if(m_tofDigiCol == s_staticTofDigiCol ) s_staticTofDigiCol = 0; 00061 m_tofDigiCol->Delete(); 00062 delete m_tofDigiCol; 00063 m_tofDigiCol = 0; 00064 00065 if(m_mucDigiCol == s_staticMucDigiCol ) s_staticMucDigiCol = 0; 00066 m_mucDigiCol->Delete(); 00067 delete m_mucDigiCol; 00068 m_mucDigiCol = 0; 00069 00070 if ( m_lumiDigiCol == s_staticLumiDigiCol ) s_staticLumiDigiCol = 0; 00071 m_lumiDigiCol->Delete(); 00072 delete m_lumiDigiCol; 00073 m_lumiDigiCol = 0; 00074 00075 }
void TDigiEvent::addEmcDigi | ( | TEmcDigi * | digi | ) |
Add a TkrDigi into the TKR data collection.
Definition at line 130 of file TDigiEvent.cxx.
References m_emcDigiCol.
Referenced by EmcDigiCnv::DataObjectToTObject().
00130 { 00131 m_emcDigiCol->Add(digi); 00132 }
void TDigiEvent::addLumiDigi | ( | TLumiDigi * | digi | ) |
Add a LumiDigi into the MUC Data collection.
Definition at line 165 of file TDigiEvent.cxx.
References m_lumiDigiCol.
Referenced by LumiDigiCnv::DataObjectToTObject().
00165 { 00166 m_lumiDigiCol->Add(digi); 00167 }
void TDigiEvent::addMdcDigi | ( | TMdcDigi * | digi | ) |
Add a TkrDigi into the TKR data collection.
Definition at line 120 of file TDigiEvent.cxx.
References m_mdcDigiCol.
Referenced by MdcDigiCnv::DataObjectToTObject().
00120 { 00121 m_mdcDigiCol->Add(digi); 00122 }
void TDigiEvent::addMucDigi | ( | TMucDigi * | digi | ) |
Add a MucDigi into the MUC Data collection.
Definition at line 153 of file TDigiEvent.cxx.
References m_mucDigiCol.
Referenced by MucDigiCnv::DataObjectToTObject().
00153 { 00154 m_mucDigiCol->Add(digi); 00155 }
void TDigiEvent::addTofDigi | ( | TTofDigi * | digi | ) |
Add a TofDigi into the TOF Data collection.
Definition at line 141 of file TDigiEvent.cxx.
References m_tofDigiCol.
Referenced by TofDigiCnv::DataObjectToTObject().
00141 { 00142 m_tofDigiCol->Add(digi); 00143 }
void TDigiEvent::Clear | ( | Option_t * | option = "" |
) |
Definition at line 83 of file TDigiEvent.cxx.
Referenced by BesEvent::Clear(), and RootCnvSvc::commitOutput().
00083 { 00084 /* 00085 const Int_t nd = 20000; 00086 static Int_t limit = 100; 00087 static Int_t ind=0; 00088 static TMdcDigi* keep[nd]; 00089 00090 00091 Int_t n = m_mdcDigiCol->GetEntries(); 00092 if (n>limit) { 00093 limit=n+10; 00094 if (limit > nd) 00095 std::cout << "!!!Warning: limit for TMdcDigi is greater than " << nd << std::endl; 00096 for (Int_t j=0;j<ind;j++) delete keep[j]; 00097 ind = 0; 00098 } 00099 for (Int_t i=0;i<n;i++) keep[ind+i] = (TMdcDigi*)m_mdcDigiCol->At(i); 00100 ind += n; 00101 if (ind > nd-limit) { 00102 for (Int_t j=0;j<ind;j++) delete keep[j]; 00103 ind = 0; 00104 } 00105 m_mdcDigiCol->Clear(); 00106 */ 00107 }
void TDigiEvent::clearEmcDigiCol | ( | ) | [inline] |
clear the whole array (necessary because of the consts-s)
Definition at line 53 of file TDigiEvent.h.
References m_emcDigiCol.
Referenced by EmcDigiCnv::DataObjectToTObject().
00053 { m_emcDigiCol->Clear(); }
void TDigiEvent::clearLumiDigiCol | ( | ) | [inline] |
clear the whole array
Definition at line 89 of file TDigiEvent.h.
References m_lumiDigiCol.
Referenced by LumiDigiCnv::DataObjectToTObject().
00089 { m_lumiDigiCol->Clear();}
void TDigiEvent::clearMdcDigiCol | ( | ) | [inline] |
clear the whole array (necessary because of the consts-s)
Definition at line 40 of file TDigiEvent.h.
References m_mdcDigiCol.
Referenced by MdcDigiCnv::DataObjectToTObject().
00040 { m_mdcDigiCol->Clear(); }
void TDigiEvent::clearMucDigiCol | ( | ) | [inline] |
clear the whole array
Definition at line 77 of file TDigiEvent.h.
References m_mucDigiCol.
Referenced by MucDigiCnv::DataObjectToTObject().
00077 { m_mucDigiCol->Clear();}
void TDigiEvent::clearTofDigiCol | ( | ) | [inline] |
clear the whole array
Definition at line 65 of file TDigiEvent.h.
References m_tofDigiCol.
Referenced by TofDigiCnv::DataObjectToTObject().
00065 { m_tofDigiCol->Clear();}
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.
References m_emcDigiCol.
Referenced by BesEvent::GetEmcDigi().
00134 { 00135 if(Int_t(i) >= m_emcDigiCol->GetEntries()) 00136 return 0; 00137 return (TEmcDigi*)m_emcDigiCol->At(i); 00138 }
const TObjArray* TDigiEvent::getEmcDigiCol | ( | ) | const [inline] |
retrieve the whole TObjArray of TkrDigi Data
Definition at line 44 of file TDigiEvent.h.
References m_emcDigiCol.
Referenced by EmcDigiCnv::DataObjectToTObject(), BesEvent::GetEmcDigiCol(), and BesEvent::GetEmcDigiNum().
00044 { return m_emcDigiCol; };
Bool_t TDigiEvent::getFromMc | ( | ) | [inline] |
Definition at line 27 of file TDigiEvent.h.
References m_fromMc.
Referenced by BesEvent::SetEvent().
00027 { return m_fromMc; };
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.
References m_lumiDigiCol.
00169 { 00170 if ( i >= m_lumiDigiCol->GetEntries() ) 00171 return 0; 00172 return (TLumiDigi*) m_lumiDigiCol->At(i); 00173 }
const TObjArray* TDigiEvent::getLumiDigiCol | ( | ) | const [inline] |
retrieve the whole TObjArray of LumiDigi Data
Definition at line 80 of file TDigiEvent.h.
References m_lumiDigiCol.
Referenced by LumiDigiCnv::DataObjectToTObject().
00080 { return m_lumiDigiCol; };
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.
References m_mdcDigiCol.
Referenced by BesEvent::GetMdcDigi().
00124 { 00125 if (Int_t(i) >= m_mdcDigiCol->GetEntries()) 00126 return 0; 00127 return (TMdcDigi*)m_mdcDigiCol->At(i); 00128 }
const TObjArray* TDigiEvent::getMdcDigiCol | ( | ) | const [inline] |
retrieve the whole TObjArray of TkrDigi Data
Definition at line 31 of file TDigiEvent.h.
References m_mdcDigiCol.
Referenced by MdcDigiCnv::DataObjectToTObject(), BesEvent::GetMdcDigiCol(), and BesEvent::GetMdcDigiNum().
00031 { return m_mdcDigiCol; };
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.
References m_mucDigiCol.
Referenced by BesEvent::GetMucDigi().
00158 { 00159 if(Int_t(i) >=m_mucDigiCol->GetEntries()) 00160 return 0; 00161 return (TMucDigi*) m_mucDigiCol->At(i); 00162 }
const TObjArray* TDigiEvent::getMucDigiCol | ( | ) | const [inline] |
retrieve the whole TObjArray of MucDigi Data
Definition at line 68 of file TDigiEvent.h.
References m_mucDigiCol.
Referenced by MucDigiCnv::DataObjectToTObject(), BesEvent::GetMucDigiCol(), and BesEvent::GetMucDigiNum().
00068 { return m_mucDigiCol; };
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.
References m_tofDigiCol.
Referenced by BesEvent::GetTofDigi().
00146 { 00147 if(Int_t(i) >=m_tofDigiCol->GetEntries()) 00148 return 0; 00149 return (TTofDigi*) m_tofDigiCol->At(i); 00150 }
const TObjArray* TDigiEvent::getTofDigiCol | ( | ) | const [inline] |
retrieve the whole TObjArray of TofDigi Data
Definition at line 56 of file TDigiEvent.h.
References m_tofDigiCol.
Referenced by TofDigiCnv::DataObjectToTObject(), BesEvent::GetTofDigiCol(), and BesEvent::GetTofDigiNum().
00056 { return m_tofDigiCol; };
void TDigiEvent::initialize | ( | Bool_t | fromMc = true |
) |
Definition at line 78 of file TDigiEvent.cxx.
References m_fromMc.
Referenced by DigiCnv::DataObjectToTObject().
00078 { 00079 m_fromMc = fromMc; 00080 }
void TDigiEvent::Print | ( | Option_t * | option = "" |
) | const |
Definition at line 110 of file TDigiEvent.cxx.
References m_mdcDigiCol.
00110 { 00111 TObject::Print(option); 00112 std::cout.precision(2); 00113 if (m_mdcDigiCol) 00114 std::cout << "Number of TMdcDigis " << m_mdcDigiCol->GetEntries() << std::endl; 00115 else 00116 std::cout << "Number of TMdcDigis 0" << std::endl; 00117 }
TObjArray* TDigiEvent::m_emcDigiCol [private] |
Definition at line 103 of file TDigiEvent.h.
Referenced by addEmcDigi(), clearEmcDigiCol(), getEmcDigi(), getEmcDigiCol(), and ~TDigiEvent().
Bool_t TDigiEvent::m_fromMc [private] |
Denote whether or not this data was simulated.
Definition at line 95 of file TDigiEvent.h.
Referenced by getFromMc(), and initialize().
TObjArray* TDigiEvent::m_lumiDigiCol [private] |
Definition at line 115 of file TDigiEvent.h.
Referenced by addLumiDigi(), clearLumiDigiCol(), getLumiDigi(), getLumiDigiCol(), and ~TDigiEvent().
TObjArray* TDigiEvent::m_mdcDigiCol [private] |
Definition at line 99 of file TDigiEvent.h.
Referenced by addMdcDigi(), clearMdcDigiCol(), getMdcDigi(), getMdcDigiCol(), Print(), and ~TDigiEvent().
TObjArray* TDigiEvent::m_mucDigiCol [private] |
Definition at line 111 of file TDigiEvent.h.
Referenced by addMucDigi(), clearMucDigiCol(), getMucDigi(), getMucDigiCol(), and ~TDigiEvent().
TObjArray* TDigiEvent::m_tofDigiCol [private] |
Definition at line 107 of file TDigiEvent.h.
Referenced by addTofDigi(), clearTofDigiCol(), getTofDigi(), getTofDigiCol(), and ~TDigiEvent().
TObjArray* TDigiEvent::s_staticEmcDigiCol [static, private] |
data members to store Emc data
Definition at line 102 of file TDigiEvent.h.
Referenced by ~TDigiEvent().
TObjArray * TDigiEvent::s_staticLumiDigiCol = 0 [static, private] |
data members to store Lumi data
Definition at line 114 of file TDigiEvent.h.
Referenced by ~TDigiEvent().
TObjArray* TDigiEvent::s_staticMdcDigiCol [static, private] |
data members to store Mdc data
Definition at line 98 of file TDigiEvent.h.
Referenced by ~TDigiEvent().
TObjArray * TDigiEvent::s_staticMucDigiCol = 0 [static, private] |
data members to store Muc data
Definition at line 110 of file TDigiEvent.h.
Referenced by ~TDigiEvent().
TObjArray * TDigiEvent::s_staticTofDigiCol = 0 [static, private] |
data members to store Tof data
Definition at line 106 of file TDigiEvent.h.
Referenced by ~TDigiEvent().