23class UseMuc : public Algorithm {
26 UseMuc(const std::string& name, ISvcLocator* pSvcLocator);
28 StatusCode initialize();
32 StatusCode finalize();
36 IDataProviderSvc* m_pCalibDataSvc;
37 ICalibRootSvc* m_pRootSvc;
38 // MucIdTransform* m_pIdTr;
39 // Maybe something to say which kind of data to look up?
44//static const AlgFactory<UseMuc> Factory;
45//const IAlgFactory& UseCalibFactory = Factory;
46//const IAlgFactory& UseMucFactory = Factory;
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"
94 return StatusCode::SUCCESS;
101 MsgStream log(
msgSvc(), name());
126 std::string fullPath =
"/Calib/MucCal";
127 log << MSG::INFO<<
"execute() fullPath = "<<fullPath<< endreq;
135 SmartDataPtr<CalibData::MucCalibData>
test(m_pCalibDataSvc, fullPath);
137 std::cout<<
"m_uniformEff="<<
test->getUniformEff()<<std::endl;
138 std::cout<<
"m_UniformNos="<<
test->getUniformNos()<<std::endl;
139 std::cout<<
"m_UniformClst="<<
test->getUniformClst()<<std::endl;
140 for(
int i=0;i<LAYER_MAX;i++){
141 std::cout<<
"m_layerEff["<<i<<
"]="<<
test->getLayerEff(i)<<
" m_layerNos["<<i<<
"]="<<
test->getLayerNos(i)<<std::endl;
142 for(
int j=0;j<CLST_MAX;j++){
143 std::cout<<
"m_layerClstPro["<<i<<
"]["<<j<<
"]="<<
test->getLayerClstPro(i,j)<<std::endl;
153 std::cout <<
"Box: " << i <<
"\t" << j <<
"\t" << k <<
"\t"
154 <<
test->getBoxEff(i, j, k) << endl;
177 return StatusCode::SUCCESS;
182 MsgStream log(
msgSvc(), name());
184 <<
" UseMuc FINALIZE!! "
187 return StatusCode::SUCCESS;
UseMuc(const std::string &name, ISvcLocator *pSvcLocator)