18class UseEmc : public Algorithm {
21 UseEmc(const std::string& name, ISvcLocator* pSvcLocator);
23 StatusCode initialize();
27 StatusCode finalize();
30 IDataProviderSvc* m_pCalibDataSvc;
31 ICalibRootSvc* m_pRootSvc;
32 // Maybe something to say which kind of data to look up?
37//static const AlgFactory<UseEmc> Factory;
38//const IAlgFactory& UseCalibFactory = Factory;
39//const IAlgFactory& UseEmcFactory = Factory;
43 ISvcLocator* pSvcLocator )
44 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
53 MsgStream log(
msgSvc(), name());
54 log << MSG::INFO <<
"Initialize()" << endreq;
59 log<<MSG::INFO <<
"setProperties()" << endreq;
61 sc = service(
"CalibDataSvc", m_pCalibDataSvc,
true);
63 if ( !sc.isSuccess() ) {
65 <<
"Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
70 <<
"Retrieved IDataProviderSvc interface of CalibXmlCnvSvc"
74 sc = service(
"CalibRootCnvSvc", m_pRootSvc,
true);
75 if ( !sc.isSuccess() ) {
77 <<
"Could not get ICalibRootSvc interface of CalibRootCnvSvc"
85 return StatusCode::SUCCESS;
92 MsgStream log(
msgSvc(), name());
94 std::vector<double> emccalib;
98 { emccalib.push_back(i);
106 std::string fullPath =
"/Calib/EmcCal";
107 log << MSG::INFO<<
"execute() fullPath = "<<fullPath<< endreq;
108 m_pCalibDataSvc->registerObject(fullPath,emc);
111 m_pRootSvc->
writeToRoot(
"./Emc_dat.root", fullPath);
115 SmartDataPtr<CalibData::EmcCalibData>
test(m_pCalibDataSvc, fullPath);
117 return StatusCode::SUCCESS;
121 MsgStream log(
msgSvc(), name());
123 <<
" UseEmc FINALIZE!! "
126 return StatusCode::SUCCESS;
void setrunfrm(int runfrm)
void setDigiCalibConst(const vector< double > *DigiCalibConst)
virtual StatusCode writeToRoot(const std::string &outputFile, const std::string &tdsPath)=0
UseEmc(const std::string &name, ISvcLocator *pSvcLocator)