BOSS 7.1.2
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 10 of file TofGeomSvc.cxx.

10: base_class(name, svcloc) {}

◆ ~TofGeomSvc()

TofGeomSvc::~TofGeomSvc ( )

Definition at line 42 of file TofGeomSvc.cxx.

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

Member Function Documentation

◆ BTof()

BTofGeo * TofGeomSvc::BTof ( unsigned id) const

Definition at line 169 of file TofGeomSvc.cxx.

169 {
170 if (id < fBTofGeo.size())
171 return fBTofGeo[id];
172 return 0;
173}

◆ Dump()

void TofGeomSvc::Dump ( )

Definition at line 118 of file TofGeomSvc.cxx.

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

Referenced by main().

◆ ETof()

ETofGeo * TofGeomSvc::ETof ( unsigned id) const

Definition at line 175 of file TofGeomSvc.cxx.

175 {
176 if (id < fETofGeo.size())
177 return fETofGeo[id];
178 return 0;
179}

◆ finalize()

StatusCode TofGeomSvc::finalize ( )
virtual

Definition at line 36 of file TofGeomSvc.cxx.

36 {
37 MsgStream log(messageService(), name());
38 log << MSG::INFO << name() << ": End of Run" << endreq;
39 return StatusCode::SUCCESS;
40}

◆ getBPhiMax()

const double TofGeomSvc::getBPhiMax ( unsigned id)

Definition at line 145 of file TofGeomSvc.cxx.

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

◆ getBPhiMin()

const double TofGeomSvc::getBPhiMin ( unsigned id)

Definition at line 151 of file TofGeomSvc.cxx.

151 {
152 if (id < fBTofGeo.size())
153 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())
159 return fETofGeo[id]->getPhiMax();
160 return 0;
161}

◆ getEPhiMin()

const double TofGeomSvc::getEPhiMin ( unsigned id)

Definition at line 163 of file TofGeomSvc.cxx.

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

◆ initialize()

StatusCode TofGeomSvc::initialize ( )
virtual

Definition at line 24 of file TofGeomSvc.cxx.

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

Referenced by main().


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