#include <TofGeomSvc.h>
Inheritance diagram for TofGeomSvc:
Public Member Functions | |
TofGeomSvc (const std::string &name, ISvcLocator *svcloc) | |
~TofGeomSvc () | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
BTofGeo * | BTof (unsigned id) const |
ETofGeo * | ETof (unsigned id) const |
const double | getBPhiMax (unsigned id) |
const double | getBPhiMin (unsigned id) |
const double | getEPhiMax (unsigned id) |
const double | getEPhiMin (unsigned id) |
void | Dump () |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Private Attributes | |
vector< BTofGeo * > | fBTofGeo |
vector< ETofGeo * > | fETofGeo |
Definition at line 20 of file TofGeomSvc.h.
TofGeomSvc::TofGeomSvc | ( | const std::string & | name, | |
ISvcLocator * | svcloc | |||
) |
TofGeomSvc::~TofGeomSvc | ( | ) |
Definition at line 39 of file TofGeomSvc.cxx.
References fBTofGeo, and fETofGeo.
00039 { 00040 for(vector<BTofGeo*>::iterator it1 = fBTofGeo.begin(); it1 != fBTofGeo.end(); it1++) delete *it1; 00041 for(vector<ETofGeo*>::iterator it2 = fETofGeo.begin(); it2 != fETofGeo.end(); it2++) delete *it2; 00042 fBTofGeo.clear(); 00043 fETofGeo.clear(); 00044 }
BTofGeo * TofGeomSvc::BTof | ( | unsigned | id | ) | const [virtual] |
void TofGeomSvc::Dump | ( | ) | [virtual] |
Implements ITofGeomSvc.
Definition at line 115 of file TofGeomSvc.cxx.
Referenced by main().
00115 { 00116 std::cout<<"Now can get the TOF Geometry Service!!"<<std::endl; 00117 /* 00118 std::cout<<"Barrel TOF Counter Number = "<<fBTofGeo.size()<<std::endl; 00119 std::cout<<"Endcap TOF Counter Number = "<<fETofGeo.size()<<std::endl; 00120 for(int ib=0; ib<176; ib++){ 00121 cout<<"The"<<" "<<ib<<" "<<"Barrel TOF phiMax is"<<" "<<BTof(ib)->getPhiMax()<<endl; 00122 cout<<"The"<<" "<<ib<<" "<<"Barrel TOF phiMin is"<<" "<<BTof(ib)->getPhiMin()<<endl; 00123 } 00124 for(int ie=0; ie<96; ie++){ 00125 cout<<"The"<<" "<<ie<<" "<<"Endcap TOF phiMax is"<<" "<<ETof(ie)->getPhiMax()<<endl; 00126 cout<<"The"<<" "<<ie<<" "<<"Endcap TOF phiMin is"<<" "<<ETof(ie)->getPhiMin()<<endl; 00127 } 00128 cout<<"The 33rd Barrel TOF Counter inrad is"<<" "<<BTof(33)->getInrad()<<endl; 00129 cout<<"The 133rd Barrel TOF Counter inrad is"<<" "<<BTof(133)->getInrad()<<endl; 00130 cout<<"The 133rd Barrel TOF Counter length is"<<" "<<BTof(133)->getLength()<<endl; 00131 cout<<"The 133rd Barrel TOF Counter thick is"<<" "<<BTof(133)->getThick()<<endl; 00132 cout<<"The 22rd Endcap TOF Counter inrad is"<<" "<<ETof(22)->getInrad()<<endl; 00133 cout<<"The 22rd Endcap TOF Counter outrad is"<<" "<<ETof(22)->getOutrad()<<endl; 00134 cout<<"The 22rd Endcap TOF Counter thick is"<<" "<<ETof(22)->getThick()<<endl; 00135 cout<<"The 22rd Endcap TOF Counter thetaMax is"<<" "<<ETof(22)->getThetaMax()<<endl; 00136 cout<<"The 22rd Endcap TOF Counter thetaMin is"<<" "<<ETof(22)->getThetaMin()<<endl; 00137 cout<<"The 90rd Endcap TOF Counter thetaMax is"<<" "<<ETof(90)->getThetaMax()<<endl; 00138 cout<<"The 90rd Endcap TOF Counter thetaMin is"<<" "<<ETof(90)->getThetaMin()<<endl; 00139 */ 00140 }
ETofGeo * TofGeomSvc::ETof | ( | unsigned | id | ) | const [virtual] |
StatusCode TofGeomSvc::finalize | ( | ) | [virtual] |
Definition at line 33 of file TofGeomSvc.cxx.
References Bes_Common::INFO.
00033 { 00034 MsgStream log(messageService(), name()); 00035 log << MSG::INFO << name() << ": End of Run" << endreq; 00036 return StatusCode::SUCCESS; 00037 }
const double TofGeomSvc::getBPhiMax | ( | unsigned | id | ) | [virtual] |
Implements ITofGeomSvc.
Definition at line 142 of file TofGeomSvc.cxx.
References fBTofGeo.
00142 { 00143 if (id < fBTofGeo.size()) 00144 return fBTofGeo[id]->getPhiMax(); 00145 return 0; 00146 }
const double TofGeomSvc::getBPhiMin | ( | unsigned | id | ) | [virtual] |
Implements ITofGeomSvc.
Definition at line 148 of file TofGeomSvc.cxx.
References fBTofGeo.
00148 { 00149 if (id < fBTofGeo.size()) 00150 return fBTofGeo[id]->getPhiMin(); 00151 return 0; 00152 }
const double TofGeomSvc::getEPhiMax | ( | unsigned | id | ) | [virtual] |
Implements ITofGeomSvc.
Definition at line 154 of file TofGeomSvc.cxx.
References fETofGeo.
00154 { 00155 if (id < fETofGeo.size()) 00156 return fETofGeo[id]->getPhiMax(); 00157 return 0; 00158 }
const double TofGeomSvc::getEPhiMin | ( | unsigned | id | ) | [virtual] |
Implements ITofGeomSvc.
Definition at line 160 of file TofGeomSvc.cxx.
References fETofGeo.
00160 { 00161 if (id < fETofGeo.size()) 00162 return fETofGeo[id]->getPhiMin(); 00163 return 0; 00164 }
StatusCode TofGeomSvc::initialize | ( | ) | [virtual] |
Definition at line 21 of file TofGeomSvc.cxx.
References Bes_Common::INFO.
Referenced by main().
00021 { 00022 MsgStream log(messageService(), name()); 00023 log << MSG::INFO << name() << ": Start of run initialisation" << endreq; 00024 00025 StatusCode sc = Service::initialize(); 00026 if ( sc.isFailure() ) return sc; 00027 00028 // get geometry data 00029 // Fill(); 00030 return StatusCode::SUCCESS; 00031 }
static const InterfaceID& ITofGeomSvc::interfaceID | ( | ) | [inline, static, inherited] |
Definition at line 16 of file ITofGeomSvc.h.
References IID_ITofGeomSvc.
00016 { return IID_ITofGeomSvc; }
StatusCode TofGeomSvc::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvUnknown | |||
) | [virtual] |
Definition at line 11 of file TofGeomSvc.cxx.
References IID_ITofGeomSvc.
00011 { 00012 00013 if ( IID_ITofGeomSvc.versionMatch(riid) ) { 00014 *ppvInterface = static_cast<ITofGeomSvc*> (this); 00015 } else { 00016 return Service::queryInterface(riid, ppvInterface) ; 00017 } 00018 return StatusCode::SUCCESS; 00019 }
vector<BTofGeo*> TofGeomSvc::fBTofGeo [private] |
Definition at line 46 of file TofGeomSvc.h.
Referenced by BTof(), getBPhiMax(), getBPhiMin(), and ~TofGeomSvc().
vector<ETofGeo*> TofGeomSvc::fETofGeo [private] |
Definition at line 47 of file TofGeomSvc.h.
Referenced by ETof(), getEPhiMax(), getEPhiMin(), and ~TofGeomSvc().