1#include "TofGeomSvc/TofGeomSvc.h"
2#include "GaudiKernel/Kernel.h"
3#include "GaudiKernel/IInterface.h"
4#include "GaudiKernel/StatusCode.h"
5#include "GaudiKernel/SvcFactory.h"
6#include "GaudiKernel/MsgStream.h"
13 if ( IID_ITofGeomSvc.versionMatch(riid) ) {
16 return Service::queryInterface(riid, ppvInterface) ;
18 return StatusCode::SUCCESS;
22 MsgStream log(messageService(), name());
23 log << MSG::INFO << name() <<
": Start of run initialisation" << endreq;
25 StatusCode sc = Service::initialize();
26 if ( sc.isFailure() )
return sc;
30 return StatusCode::SUCCESS;
34 MsgStream log(messageService(), name());
35 log << MSG::INFO << name() <<
": End of Run" << endreq;
36 return StatusCode::SUCCESS;
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;
116 std::cout<<
"Now can get the TOF Geometry Service!!"<<std::endl;
143 if (
id < fBTofGeo.size())
144 return fBTofGeo[id]->getPhiMax();
149 if (
id < fBTofGeo.size())
150 return fBTofGeo[id]->getPhiMin();
155 if (
id < fETofGeo.size())
156 return fETofGeo[id]->getPhiMax();
161 if (
id < fETofGeo.size())
162 return fETofGeo[id]->getPhiMin();
167 if (
id < fBTofGeo.size())
173 if (
id < fETofGeo.size())
ETofGeo * ETof(unsigned id) const
const double getBPhiMin(unsigned id)
virtual StatusCode initialize()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
const double getEPhiMax(unsigned id)
TofGeomSvc(const std::string &name, ISvcLocator *svcloc)
BTofGeo * BTof(unsigned id) const
virtual StatusCode finalize()
const double getEPhiMin(unsigned id)
const double getBPhiMax(unsigned id)