/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RootEventData/RootEventData-00-03-80/src/THltEvent.cxx

Go to the documentation of this file.
00001 #include "RootEventData/THltEvent.h"
00002 #include "TCollection.h"  // Declares TIter
00003 
00004 ClassImp(THltEvent)
00005 
00006 // Allocate the TObjArray just once
00007 TObjArray *THltEvent::s_staticHltRawCol = 0;
00008 //THltInf *THltEvent::s_staticHltInf = 0;
00009 //TDstHltInf *THltEvent::s_staticDstHltInf = 0;
00010 THltInf *THltEvent::s_staticHltInf = 0;
00011 TDstHltInf *THltEvent::s_staticDstHltInf = 0;
00012 
00013 //***************************************************************
00014 THltEvent::THltEvent() 
00015 {
00016   if (! s_staticHltRawCol ) {
00017     s_staticHltRawCol = new TObjArray();
00018   }
00019   if (! s_staticHltInf ) {
00020     s_staticHltInf = new THltInf();
00021   }
00022   if (! s_staticDstHltInf ) {
00023     s_staticDstHltInf = new TDstHltInf();
00024   }
00025 
00026   m_hltRawCol = s_staticHltRawCol;
00027   m_hltInf = s_staticHltInf;
00028   m_dstHltInf = s_staticDstHltInf;
00029 
00030   Clear();
00031 }
00032 
00033 //*****************************************************************
00034 THltEvent::~THltEvent() {
00035   if(m_hltRawCol == s_staticHltRawCol ) s_staticHltRawCol = 0;
00036   m_hltRawCol->Delete();
00037   delete m_hltRawCol;
00038   m_hltRawCol = 0;
00039 
00040   if(m_hltInf == s_staticHltInf ) s_staticHltInf = 0;
00041   delete m_hltInf;
00042   m_hltInf = 0;
00043 
00044   if(m_dstHltInf == s_staticDstHltInf ) s_staticDstHltInf = 0;
00045   delete m_dstHltInf;
00046   m_dstHltInf = 0;
00047 }
00048 
00049 //*****************************************************************
00050 //o void THltEvent::initialize(Bool_t fromMc){ 
00051 //o     m_fromMc = fromMc;
00052 //o }
00053   
00054 //*****************************************************************
00055 void THltEvent::Clear(Option_t *option) {
00056 
00057 }
00058 
00059 //*****************************************************************************
00060 void THltEvent::Print(Option_t *option) const {
00061     TObject::Print(option);
00062 }
00063 
00065 void  THltEvent::addHltRaw(THltRaw * hltRaw){
00066     m_hltRawCol->Add(hltRaw);
00067 }
00068 const THltRaw*  THltEvent::getHltRaw(Int_t i) const {
00069   if (Int_t(i) >= m_hltRawCol->GetEntries()) 
00070     return 0;
00071   return (THltRaw*)m_hltRawCol->At(i);
00072 }
00073 const TObjArray*  THltEvent::getHltRawCol() const {
00074   return (TObjArray*)m_hltRawCol ;
00075 }
00076 void  THltEvent::addHltInf(THltInf * hltInf){
00077     m_hltInf = hltInf;
00078 }
00079 const THltInf*  THltEvent::getHltInf() const {
00080         return (THltInf*)m_hltInf ;
00081 }
00082 void  THltEvent::addDstHltInf(TDstHltInf * hltInf){
00083     m_dstHltInf = hltInf;
00084 }
00085 const TDstHltInf*  THltEvent::getDstHltInf() const {
00086         return (TDstHltInf*)m_dstHltInf ;
00087 }

Generated on Tue Nov 29 23:11:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7