00001 #include "test_read.h"
00002 #include "ReadPara.hh"
00003 #include "BesMdcRes.hh"
00004 test_read::test_read( const std::string& name,
00005 ISvcLocator* pSvcLocator )
00006 : Algorithm ( name, pSvcLocator )
00007 {
00008
00009
00010 }
00011
00012
00013 StatusCode test_read::initialize() {
00014 StatusCode sc;
00015 MsgStream log(msgSvc(), name());
00016 log << MSG::INFO << "Initialize()" << endreq;
00017
00018
00019
00020 sc = service("MdcTunningSvc", m_mdc, true);
00021 if ( !sc.isSuccess() ) {
00022 log << MSG::ERROR
00023 << "Could not get ICalibRootSvc interface of CalibRootCnvSvc"
00024 << endreq;
00025 return sc;
00026 }
00027
00028
00029
00030 return StatusCode::SUCCESS;
00031
00032 }
00033
00034
00035 StatusCode test_read::execute( ) {
00036
00037 MsgStream log(msgSvc(), name());
00038 for(int i=0;i<43;i++){
00039 for(int j=0;j<20;j++){
00040 double aa = m_mdc->get_docaEff(i,j);
00041 double bb = m_mdc->get_thetaEff(i,j);
00042 double cc = m_mdc->get_cellEff(i,j);
00043 std::cout<<"i: "<<i<<" j: "<<j<<std::endl;
00044 std::cout<<" get_docaEff: "<<aa<<" thetaEff:"<<bb<<" cellEff:"<<cc<<std::endl;
00045 }
00046 }
00047
00048 return StatusCode::SUCCESS;
00049 }
00050
00051 StatusCode test_read::finalize() {
00052 return StatusCode::SUCCESS;
00053
00054
00055 }