BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
IEFAlgorithm.cxx
Go to the documentation of this file.
2#include "GaudiKernel/Bootstrap.h"
3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/IJobOptionsSvc.h"
5#include "GaudiKernel/ISvcLocator.h"
6#include "GaudiKernel/IService.h"
7#include "GaudiKernel/IMessageSvc.h"
8
9
10IEFAlgorithm::IEFAlgorithm(const std::string& name, ISvcLocator* pSvcLocator):
11 Algorithm(name, pSvcLocator){
12 m_propMgr.declareProperty("OutputLevel",m_output = 7777777);
13 m_propMgr.declareProperty("BeamEnergy",m_beam = 1.89);
14 //cout << "OutputLevel="<<m_output<<"; name="<<name<<endl;
15 // Get a pointer to the Job Options Service
16 IJobOptionsSvc* jobSvc;
17 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
18 jobSvc->setMyProperties("EFAlgorithm", &m_propMgr);
19
20 //cout << "OutputLevel="<<m_output<<"; name="<<name<<endl;
21 //MsgStream log(msgSvc(), name);
22 //msgSvc()->setOutputLevel(name,m_output);
23}
24
26 MsgStream log(msgSvc(), name());
27 log << MSG::INFO << "in initialize()" << endreq;
28
29 m_run=0;
30
31 StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc);
32 if( sc.isFailure() ) {
33 log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endreq;
34 return sc;
35 }
36
37 sc = m_HltStoreSvc->get("EFResult", m_ef);
38 if ( sc.isFailure() ) {
39 log << MSG::ERROR << "m_HltStoreSvc->get(EFResult) wrong" << endreq;
40 return sc;
41 }
42
43 sc = service("RawDataProviderSvc", m_rawDigiSvc);
44 if (sc == StatusCode::SUCCESS) {
45 log << MSG::INFO << "Raw Data Service Sucessfully at " << m_rawDigiSvc << " for " << name() << endreq;
46 }
47 else {
48 log << MSG::ERROR << "Raw Data Service Failed !! " << endreq;
49 return StatusCode::FAILURE;
50 }
51
52 log << MSG::DEBUG << "finish initialize()" << endreq;
53 return StatusCode::SUCCESS;
54}
IMessageSvc * msgSvc()
bool get(const std::string &name, T &value)
Definition: HltStoreSvc.h:76
EFResult * m_ef
Definition: IEFAlgorithm.h:22
IEFAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
IRawDataProviderSvc * m_rawDigiSvc
Definition: IEFAlgorithm.h:21
PropertyMgr m_propMgr
Definition: IEFAlgorithm.h:18
HltStoreSvc * m_HltStoreSvc
Definition: IEFAlgorithm.h:20