17class UseTof : public Algorithm {
20 UseTof(const std::string& name, ISvcLocator* pSvcLocator);
22 StatusCode initialize();
26 StatusCode finalize();
29 IDataProviderSvc* m_pCalibDataSvc;
30 ICalibRootSvc* m_pRootSvc;
31 // Maybe something to say which kind of data to look up?
36//static const AlgFactory<UseTof> Factory;
37//const IAlgFactory& UseCalibFactory = Factory;
38//const IAlgFactory& UseTofFactory = Factory;
43#include "TDirectory.h"
45#include "CalibData/Tof/TofElecData.h"
46#include "CalibData/Tof/BarrelElec.h"
47#include "CalibData/Tof/EndcapElec.h"
50 ISvcLocator* pSvcLocator )
51 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
60 MsgStream log(
msgSvc(), name());
61 log << MSG::INFO <<
"Initialize()" << endreq;
66 log<<MSG::INFO <<
"setProperties()" << endreq;
68 sc = service(
"CalibDataSvc", m_pCalibDataSvc,
true);
70 if ( !sc.isSuccess() ) {
72 <<
"Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
77 <<
"Retrieved IDataProviderSvc interface of CalibXmlCnvSvc"
81 sc = service(
"CalibRootCnvSvc", m_pRootSvc,
true);
82 if ( !sc.isSuccess() ) {
84 <<
"Could not get ICalibRootSvc interface of CalibRootCnvSvc"
92 return StatusCode::SUCCESS;
99 MsgStream log(
msgSvc(), name());
103 std::string fullPath =
"/Calib/TofQElec";
104 log << MSG::INFO<<
"execute() fullPath = "<<fullPath<< endreq;
106 SmartDataPtr<CalibData::TofElecData> btof(m_pCalibDataSvc, fullPath);
108 for(
int i =0;i<96;i++)
112 std::cout<<
"i==========="<<i<<std::endl;
113 for(
int j=0;j<4;j++){
115 std::cout<<
"getEast=="<<bb.
getNum(j)<<std::endl;
117 for(
int j=0;j<10;j++){
118 std::cout<<
"j==="<<j<<std::endl;
119 std::cout<<
" getP1=="<<aa.
getP1(j)<<std::endl;
120 std::cout<<
" getP2=="<<aa.
getP2(j)<<std::endl;
121 std::cout<<
" getSimP1=="<<aa.
getSimP1(j)<<std::endl;
122 std::cout<<
" getSimP2=="<<aa.
getSimP2(j)<<std::endl;
123 std::cout<<
" getP=="<<bb.
getP(j)<<std::endl;
124 std::cout<<
" getSimP=="<<bb.
getSimP(j)<<std::endl;
135 return StatusCode::SUCCESS;
142 MsgStream log(
msgSvc(), name());
144 <<
" UseTof FINALIZE!! "
147 return StatusCode::SUCCESS;
double getSimP1(int idx) const
unsigned int getNumWest(int idx) const
double getP1(int idx) const
double getP2(int idx) const
double getSimP2(int idx) const
unsigned int getNumEast(int idx) const
double getSimP(unsigned int idx) const
double getP(unsigned int idx) const
unsigned int getNum(unsigned int idx) const
UseEstTof(const std::string &name, ISvcLocator *pSvcLocator)