BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
ValidPhyJPsill.cxx
Go to the documentation of this file.
1#include "GaudiKernel/MsgStream.h"
2#include "GaudiKernel/AlgFactory.h"
3#include "GaudiKernel/ISvcLocator.h"
4#include "GaudiKernel/SmartDataPtr.h"
5#include "GaudiKernel/IDataProviderSvc.h"
6#include "GaudiKernel/PropertyMgr.h"
8
9/////////////////////////////////////////////////////////////////////////////
10
11DECLARE_COMPONENT(ValidPhyJPsill)
12ValidPhyJPsill::ValidPhyJPsill(const std::string& name, ISvcLocator* pSvcLocator) :
13 Algorithm(name, pSvcLocator) {
14
15 //Declare the properties
16 declareProperty("signal", m_signal = false);
17
18
19}
20
21// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
22// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
24 MsgStream log(msgSvc(), name());
25
26 log << MSG::INFO << "in initialize()" << endmsg;
27
28 StatusCode sc;
29
30 if (m_signal){
31 sc = createSubAlgorithm("Signal", "Signal", m_Signal);
32 if(sc.isFailure()) {
33 log << MSG::ERROR << "Error create 'Signal' algorithm" << endreq;
34 return StatusCode::FAILURE;
35 }
36 }
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
55 return StatusCode::SUCCESS;
56
57}
58
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
60// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
62
63 MsgStream log(msgSvc(), name());
64 log << MSG::INFO << "in execute()" << endreq;
65
66 StatusCode sc;
67 std::vector<Algorithm*>::const_iterator it = subAlgorithms()->begin();
68 std::vector<Algorithm*>::const_iterator end = subAlgorithms()->end();
69 for(; it != end; it++) {
70 sc = (*it)->execute();
71 if(sc.isFailure())
72 log << "Error while executing " << (*it)->name() << endreq;
73 }
74
75 return StatusCode::SUCCESS;
76}
77
78
79// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
80// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
82
83 MsgStream log(msgSvc(), name());
84 log << MSG::INFO << "in finalize()" << endmsg;
85
86
87 return StatusCode::SUCCESS;
88}
89
90
91
IMessageSvc * msgSvc()
StatusCode initialize()
StatusCode finalize()
StatusCode execute()