BOSS 7.0.9
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 queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
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 ()
 
virtual BTofGeoBTof (unsigned id) const =0
 
virtual ETofGeoETof (unsigned id) const =0
 
virtual const double getBPhiMax (unsigned id)=0
 
virtual const double getBPhiMin (unsigned id)=0
 
virtual const double getEPhiMax (unsigned id)=0
 
virtual const double getEPhiMin (unsigned id)=0
 
virtual void Dump ()=0
 

Additional Inherited Members

- Static Public Member Functions inherited from ITofGeomSvc
static const InterfaceID & interfaceID ()
 

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.

9: Service(name, svcloc) {}

◆ ~TofGeomSvc()

TofGeomSvc::~TofGeomSvc ( )

Definition at line 39 of file TofGeomSvc.cxx.

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

Member Function Documentation

◆ BTof()

BTofGeo * TofGeomSvc::BTof ( unsigned  id) const
virtual

Implements ITofGeomSvc.

Definition at line 166 of file TofGeomSvc.cxx.

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

◆ Dump()

void TofGeomSvc::Dump ( )
virtual

Implements ITofGeomSvc.

Definition at line 115 of file TofGeomSvc.cxx.

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

Referenced by main().

◆ ETof()

ETofGeo * TofGeomSvc::ETof ( unsigned  id) const
virtual

Implements ITofGeomSvc.

Definition at line 172 of file TofGeomSvc.cxx.

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

◆ finalize()

StatusCode TofGeomSvc::finalize ( )
virtual

Definition at line 33 of file TofGeomSvc.cxx.

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

◆ getBPhiMax()

const double TofGeomSvc::getBPhiMax ( unsigned  id)
virtual

Implements ITofGeomSvc.

Definition at line 142 of file TofGeomSvc.cxx.

142 {
143 if (id < fBTofGeo.size())
144 return fBTofGeo[id]->getPhiMax();
145 return 0;
146}

◆ getBPhiMin()

const double TofGeomSvc::getBPhiMin ( unsigned  id)
virtual

Implements ITofGeomSvc.

Definition at line 148 of file TofGeomSvc.cxx.

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

◆ getEPhiMax()

const double TofGeomSvc::getEPhiMax ( unsigned  id)
virtual

Implements ITofGeomSvc.

Definition at line 154 of file TofGeomSvc.cxx.

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

◆ getEPhiMin()

const double TofGeomSvc::getEPhiMin ( unsigned  id)
virtual

Implements ITofGeomSvc.

Definition at line 160 of file TofGeomSvc.cxx.

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

◆ initialize()

StatusCode TofGeomSvc::initialize ( )
virtual

Definition at line 21 of file TofGeomSvc.cxx.

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

Referenced by main().

◆ queryInterface()

StatusCode TofGeomSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvUnknown 
)
virtual

Definition at line 11 of file TofGeomSvc.cxx.

11 {
12
13 if ( IID_ITofGeomSvc.versionMatch(riid) ) {
14 *ppvInterface = static_cast<ITofGeomSvc*> (this);
15 } else {
16 return Service::queryInterface(riid, ppvInterface) ;
17 }
18 return StatusCode::SUCCESS;
19}

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