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