16class checkMdc : public Algorithm {
19 checkMdc(const std::string& name, ISvcLocator* pSvcLocator);
21 StatusCode initialize();
25 StatusCode finalize();
28 IDataProviderSvc* m_pCalibDataSvc;
29 ICalibTreeSvc* m_pTreeSvc;
30 // Maybe something to say which kind of data to look up?
35//static const AlgFactory<checkMdc> Factory;
36//const IAlgFactory& UseCalibFactory = Factory;
37//const IAlgFactory& checkMdcFactory = Factory;
39checkMdc::checkMdc( const std::string& name,
40 ISvcLocator* pSvcLocator )
41 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
43 // Declare properties here.
49 : Algorithm( name, pSvcLocator ), m_pCalibDataSvc( 0 ) {
56 MsgStream log(
msgSvc(), name() );
57 log << MSG::INFO <<
"Initialize()" << endmsg;
62 log << MSG::INFO <<
"setProperties()" << endmsg;
64 sc = service(
"CalibDataSvc", m_pCalibDataSvc,
true );
66 if ( !sc.isSuccess() )
68 log << MSG::ERROR <<
"Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
73 { log << MSG::DEBUG <<
"Retrieved IDataProviderSvc interface of CalibXmlCnvSvc" << endmsg; }
75 sc = service(
"CalibTreeCnvSvc", m_pTreeSvc,
true );
76 if ( !sc.isSuccess() )
78 log << MSG::ERROR <<
"Could not get ICalibTreeSvc interface of CalibTreeCnvSvc" << endmsg;
85 return StatusCode::SUCCESS;
90 MsgStream log(
msgSvc(), name() );
94 std::string fullPath =
"/Calib/MdcCal";
95 log << MSG::INFO <<
"execute() fullPath = " << fullPath << endmsg;
97 SmartDataPtr<CalibData::MdcCalibData>
test( m_pCalibDataSvc, fullPath );
99 int qtparno =
test->getqtparNo();
100 int xtno =
test->getxtNo();
101 int t0no =
test->gett0No();
102 std::cout <<
"qtparno=" << qtparno <<
"xtno=" << xtno <<
"t0no=" << t0no << std::endl;
104 return StatusCode::SUCCESS;
111 MsgStream log(
msgSvc(), name() );
112 log << MSG::INFO <<
" checkMdc FINALIZE!! " << endmsg;
114 return StatusCode::SUCCESS;
checkMdc(const std::string &name, ISvcLocator *pSvcLocator)