/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventFilter/HltUtilities/HltAlgorithms/HltAlgorithms-01-03-01/src/IEFAlgorithm.cxx

Go to the documentation of this file.
00001 #include "HltAlgorithms/IEFAlgorithm.h"
00002 #include "GaudiKernel/Bootstrap.h"
00003 #include "GaudiKernel/MsgStream.h"
00004 #include "GaudiKernel/IJobOptionsSvc.h"
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "GaudiKernel/IService.h"
00007 #include "GaudiKernel/IMessageSvc.h"
00008 
00009 IEFAlgorithm::IEFAlgorithm(const std::string& name, ISvcLocator* pSvcLocator):
00010   Algorithm(name, pSvcLocator){
00011   m_propMgr.declareProperty("OutputLevel",m_output = 7777777);
00012   m_propMgr.declareProperty("BeamEnergy",m_beam = 1.89);
00013   //cout << "OutputLevel="<<m_output<<";  name="<<name<<endl;
00014   // Get a pointer to the Job Options Service
00015   IJobOptionsSvc* jobSvc;
00016   Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);  
00017   jobSvc->setMyProperties("EFAlgorithm", &m_propMgr);
00018 
00019   //cout << "OutputLevel="<<m_output<<";  name="<<name<<endl;
00020   //MsgStream log(msgSvc(), name);
00021   //msgSvc()->setOutputLevel(name,m_output);
00022 }
00023 
00024 StatusCode IEFAlgorithm::initialize(){
00025   MsgStream log(msgSvc(), name());
00026   log << MSG::INFO << "in initialize()" << endreq;
00027  
00028   m_run=0;
00029 
00030   StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc);
00031   if( sc.isFailure() ) {
00032     log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endreq;
00033     return sc;
00034   }
00035 
00036   sc = m_HltStoreSvc->get("EFResult", m_ef);
00037   if ( sc.isFailure() ) {
00038     log << MSG::ERROR << "m_HltStoreSvc->get(EFResult) wrong" << endreq;
00039     return sc;
00040   }  
00041 
00042   sc = service("RawDataProviderSvc", m_rawDigiSvc);
00043   if (sc ==  StatusCode::SUCCESS) {
00044     log << MSG::INFO << "Raw Data Service Sucessfully at " << m_rawDigiSvc << " for " << name() << endreq;
00045   }
00046   else {
00047     log << MSG::ERROR << "Raw Data Service Failed !! " << endreq;
00048     return StatusCode::FAILURE;
00049   }
00050   
00051   log << MSG::DEBUG << "finish initialize()" << endreq;
00052   return StatusCode::SUCCESS;
00053 }

Generated on Tue Nov 29 23:12:06 2016 for BOSS_7.0.2 by  doxygen 1.4.7