15class UseMdcCalibData : public Algorithm {
18 UseMdcCalibData(const std::string& name, ISvcLocator* pSvcLocator);
20 StatusCode initialize();
24 StatusCode finalize();
27 IDataProviderSvc* m_pCalibDataSvc;
28 ICalibRootSvc* m_pRootSvc;
29 // Maybe something to say which kind of data to look up?
34//static const AlgFactory<UseMdcCalibData> Factory;
35//const IAlgFactory& UseCalibFactory = Factory;
36//const IAlgFactory& UseMdcCalibDataFactory = Factory;
40 ISvcLocator* pSvcLocator )
41 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
50 MsgStream log(
msgSvc(), name());
51 log << MSG::INFO <<
"Initialize()" << endreq;
56 log<<MSG::INFO <<
"setProperties()" << endreq;
58 sc = service(
"CalibDataSvc", m_pCalibDataSvc,
true);
60 if ( !sc.isSuccess() ) {
62 <<
"Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
67 <<
"Retrieved IDataProviderSvc interface of CalibXmlCnvSvc"
71 sc = service(
"CalibRootCnvSvc", m_pRootSvc,
true);
72 if ( !sc.isSuccess() ) {
74 <<
"Could not get ICalibRootSvc interface of CalibRootCnvSvc"
81 return StatusCode::SUCCESS;
88 MsgStream log(
msgSvc(), name());
92 std::string fullPath =
"/Calib/MdcCal";
94 std::cout<<
"file="<<file<<
"\n";
96 log << MSG::INFO<<
"execute() fullPath = "<<fullPath<< endreq;
98 SmartDataPtr<CalibData::MdcCalibData> test1Copy(m_pCalibDataSvc, fullPath);
103 m_pRootSvc->
writeToRoot(
"Mdc_test.root", fullPath);
106 return StatusCode::SUCCESS;
113 MsgStream log(
msgSvc(), name());
115 <<
" UseMdcCalibData1 FINALIZE!! "
118 return StatusCode::SUCCESS;
virtual StatusCode writeToRoot(const std::string &outputFile, const std::string &tdsPath)=0
virtual std::string getrootfile()=0
UseMdcCalibData(const std::string &name, ISvcLocator *pSvcLocator)