BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TofGeomSvc Class Reference

#include <TofGeomSvc.h>

Inheritance diagram for TofGeomSvc:

Public Member Functions

 TofGeomSvc (const std::string &name, ISvcLocator *svcloc)
 ~TofGeomSvc ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
BTofGeoBTof (unsigned id) const
ETofGeoETof (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 ()

Detailed Description

Definition at line 20 of file TofGeomSvc.h.

Constructor & Destructor Documentation

◆ TofGeomSvc()

TofGeomSvc::TofGeomSvc ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 9 of file TofGeomSvc.cxx.

10 : base_class( name, svcloc ) {}

Referenced by TofGeomSvc().

◆ ~TofGeomSvc()

TofGeomSvc::~TofGeomSvc ( )

Definition at line 43 of file TofGeomSvc.cxx.

43 {
44 for ( vector<BTofGeo*>::iterator it1 = fBTofGeo.begin(); it1 != fBTofGeo.end(); it1++ )
45 delete *it1;
46 for ( vector<ETofGeo*>::iterator it2 = fETofGeo.begin(); it2 != fETofGeo.end(); it2++ )
47 delete *it2;
48 fBTofGeo.clear();
49 fETofGeo.clear();
50}

Member Function Documentation

◆ BTof()

BTofGeo * TofGeomSvc::BTof ( unsigned id) const

Definition at line 167 of file TofGeomSvc.cxx.

167 {
168 if ( id < fBTofGeo.size() ) return fBTofGeo[id];
169 return 0;
170}

◆ Dump()

void TofGeomSvc::Dump ( )

Definition at line 120 of file TofGeomSvc.cxx.

120 {
121 std::cout << "Now can get the TOF Geometry Service!!" << std::endl;
122 /*
123 std::cout<<"Barrel TOF Counter Number = "<<fBTofGeo.size()<<std::endl;
124 std::cout<<"Endcap TOF Counter Number = "<<fETofGeo.size()<<std::endl;
125 for(int ib=0; ib<176; ib++){
126 cout<<"The"<<" "<<ib<<" "<<"Barrel TOF phiMax is"<<" "<<BTof(ib)->getPhiMax()<<endl;
127 cout<<"The"<<" "<<ib<<" "<<"Barrel TOF phiMin is"<<" "<<BTof(ib)->getPhiMin()<<endl;
128 }
129 for(int ie=0; ie<96; ie++){
130 cout<<"The"<<" "<<ie<<" "<<"Endcap TOF phiMax is"<<" "<<ETof(ie)->getPhiMax()<<endl;
131 cout<<"The"<<" "<<ie<<" "<<"Endcap TOF phiMin is"<<" "<<ETof(ie)->getPhiMin()<<endl;
132 }
133 cout<<"The 33rd Barrel TOF Counter inrad is"<<" "<<BTof(33)->getInrad()<<endl;
134 cout<<"The 133rd Barrel TOF Counter inrad is"<<" "<<BTof(133)->getInrad()<<endl;
135 cout<<"The 133rd Barrel TOF Counter length is"<<" "<<BTof(133)->getLength()<<endl;
136 cout<<"The 133rd Barrel TOF Counter thick is"<<" "<<BTof(133)->getThick()<<endl;
137 cout<<"The 22rd Endcap TOF Counter inrad is"<<" "<<ETof(22)->getInrad()<<endl;
138 cout<<"The 22rd Endcap TOF Counter outrad is"<<" "<<ETof(22)->getOutrad()<<endl;
139 cout<<"The 22rd Endcap TOF Counter thick is"<<" "<<ETof(22)->getThick()<<endl;
140 cout<<"The 22rd Endcap TOF Counter thetaMax is"<<" "<<ETof(22)->getThetaMax()<<endl;
141 cout<<"The 22rd Endcap TOF Counter thetaMin is"<<" "<<ETof(22)->getThetaMin()<<endl;
142 cout<<"The 90rd Endcap TOF Counter thetaMax is"<<" "<<ETof(90)->getThetaMax()<<endl;
143 cout<<"The 90rd Endcap TOF Counter thetaMin is"<<" "<<ETof(90)->getThetaMin()<<endl;
144 */
145}

Referenced by main().

◆ ETof()

ETofGeo * TofGeomSvc::ETof ( unsigned id) const

Definition at line 172 of file TofGeomSvc.cxx.

172 {
173 if ( id < fETofGeo.size() ) return fETofGeo[id];
174 return 0;
175}

◆ finalize()

StatusCode TofGeomSvc::finalize ( )
virtual

Definition at line 37 of file TofGeomSvc.cxx.

37 {
38 MsgStream log( msgSvc(), name() );
39 log << MSG::INFO << name() << ": End of Run" << endmsg;
40 return StatusCode::SUCCESS;
41}
IMessageSvc * msgSvc()

◆ getBPhiMax()

const double TofGeomSvc::getBPhiMax ( unsigned id)

Definition at line 147 of file TofGeomSvc.cxx.

147 {
148 if ( id < fBTofGeo.size() ) return fBTofGeo[id]->getPhiMax();
149 return 0;
150}

◆ getBPhiMin()

const double TofGeomSvc::getBPhiMin ( unsigned id)

Definition at line 152 of file TofGeomSvc.cxx.

152 {
153 if ( id < fBTofGeo.size() ) return fBTofGeo[id]->getPhiMin();
154 return 0;
155}

◆ getEPhiMax()

const double TofGeomSvc::getEPhiMax ( unsigned id)

Definition at line 157 of file TofGeomSvc.cxx.

157 {
158 if ( id < fETofGeo.size() ) return fETofGeo[id]->getPhiMax();
159 return 0;
160}

◆ getEPhiMin()

const double TofGeomSvc::getEPhiMin ( unsigned id)

Definition at line 162 of file TofGeomSvc.cxx.

162 {
163 if ( id < fETofGeo.size() ) return fETofGeo[id]->getPhiMin();
164 return 0;
165}

◆ initialize()

StatusCode TofGeomSvc::initialize ( )
virtual

Definition at line 25 of file TofGeomSvc.cxx.

25 {
26 MsgStream log( msgSvc(), name() );
27 log << MSG::INFO << name() << ": Start of run initialisation" << endmsg;
28
29 StatusCode sc = Service::initialize();
30 if ( sc.isFailure() ) return sc;
31
32 // get geometry data
33 // Fill();
34 return StatusCode::SUCCESS;
35}

Referenced by main().


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