UseEstTof Class Reference

Simple algorithm to test functioning of "the other" TDS. More...

#include <UseEstTof.h>

List of all members.

Public Member Functions

 UseEstTof (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()

Private Attributes

IDataProviderSvc * m_pCalibDataSvc
ICalibRootSvcm_pRootSvc


Detailed Description

Simple algorithm to test functioning of "the other" TDS.

Definition at line 16 of file UseEstTof.h.


Constructor & Destructor Documentation

UseEstTof::UseEstTof ( const std::string name,
ISvcLocator *  pSvcLocator 
)

Definition at line 49 of file UseEstTof.cxx.

00051   : Algorithm     ( name, pSvcLocator ), m_pCalibDataSvc(0)
00052 {
00053   // Declare properties here.
00054 
00055 }


Member Function Documentation

StatusCode UseEstTof::execute (  ) 

Definition at line 97 of file UseEstTof.cxx.

References CalibData::EndcapElec::getNum(), CalibData::EndcapElec::getP(), CalibData::EndcapElec::getSimP(), genRecEmupikp::i, Bes_Common::INFO, ganga-rec::j, m_pCalibDataSvc, msgSvc(), and deljobs::string.

00097                                {
00098    
00099   MsgStream log(msgSvc(), name());
00100 
00101   // Cheat for now since Windows is having trouble finding definition
00102   // of Calibdata::Test_t
00103   std::string fullPath = "/Calib/TofQElec";
00104    log << MSG::INFO<<"execute() fullPath = "<<fullPath<< endreq;
00105 
00106     SmartDataPtr<CalibData::TofElecData> btof(m_pCalibDataSvc, fullPath);
00107   
00108    for(int i =0;i<96;i++)
00109       {
00110         CalibData::BarrelElec aa = btof->getBTof(i);
00111         CalibData::EndcapElec bb = btof->getETof(i);
00112        std::cout<<"i==========="<<i<<std::endl;
00113        for(int j=0;j<4;j++){
00114        std::cout<<"getNumEast=="<<aa.getNumEast(j)<<"   getNumWest=="<<aa.getNumWest(j)<<std::endl;
00115         std::cout<<"getEast=="<<bb.getNum(j)<<std::endl;
00116         }
00117        for(int j=0;j<10;j++){ 
00118         std::cout<<"j==="<<j<<std::endl;
00119         std::cout<<"  getP1=="<<aa.getP1(j)<<std::endl;
00120         std::cout<<"  getP2=="<<aa.getP2(j)<<std::endl;
00121          std::cout<<"  getSimP1=="<<aa.getSimP1(j)<<std::endl;   
00122          std::cout<<"  getSimP2=="<<aa.getSimP2(j)<<std::endl;       
00123          std::cout<<"  getP=="<<bb.getP(j)<<std::endl;
00124           std::cout<<"  getSimP=="<<bb.getSimP(j)<<std::endl;
00125    }
00126       }
00127 
00128 
00129    
00130  
00131 
00132        //maqm comment because cann't write 
00133    //    m_pRootSvc->writeToRoot("./Tof_test.root", fullPath);
00134   
00135   return StatusCode::SUCCESS;
00136 }

StatusCode UseEstTof::finalize (  ) 

Definition at line 140 of file UseEstTof.cxx.

References Bes_Common::INFO, and msgSvc().

00140                                 {
00141 
00142   MsgStream log(msgSvc(), name());
00143   log << MSG::INFO 
00144       << "        UseTof FINALIZE!! "
00145       << endreq;
00146   
00147   return StatusCode::SUCCESS;
00148 }

StatusCode UseEstTof::initialize (  ) 

Definition at line 58 of file UseEstTof.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, Bes_Common::INFO, m_pCalibDataSvc, m_pRootSvc, and msgSvc().

00058                                  {
00059   StatusCode sc;
00060   MsgStream log(msgSvc(), name());
00061   log << MSG::INFO << "Initialize()" << endreq;
00062 
00063   // So far don't have any properties, but in case we do some day..
00064 //  setProperties();
00065 
00066    log<<MSG::INFO << "setProperties()" << endreq;
00067   
00068    sc = service("CalibDataSvc", m_pCalibDataSvc, true);
00069 
00070   if ( !sc.isSuccess() ) {
00071     log << MSG::ERROR 
00072         << "Could not get IDataProviderSvc interface of CalibXmlCnvSvc" 
00073         << endreq;
00074     return sc;
00075   } else {
00076     log << MSG::DEBUG 
00077         << "Retrieved IDataProviderSvc interface of CalibXmlCnvSvc" 
00078         << endreq;
00079   }
00080   
00081   sc = service("CalibRootCnvSvc", m_pRootSvc, true);
00082   if ( !sc.isSuccess() ) {
00083     log << MSG::ERROR 
00084         << "Could not get ICalibRootSvc interface of CalibRootCnvSvc" 
00085         << endreq;
00086     return sc;
00087   }
00088   // Get properties from the JobOptionsSvc
00089   
00090  sc = setProperties();
00091 
00092  return StatusCode::SUCCESS;
00093 
00094 }


Member Data Documentation

IDataProviderSvc* UseEstTof::m_pCalibDataSvc [private]

Definition at line 28 of file UseEstTof.h.

Referenced by execute(), and initialize().

ICalibRootSvc* UseEstTof::m_pRootSvc [private]

Definition at line 29 of file UseEstTof.h.

Referenced by initialize().


Generated on Tue Nov 29 23:36:20 2016 for BOSS_7.0.2 by  doxygen 1.4.7