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
00014
00015 IJobOptionsSvc* jobSvc;
00016 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
00017 jobSvc->setMyProperties("EFAlgorithm", &m_propMgr);
00018
00019
00020
00021
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 }