BOSS 7.0.9
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
11ValidPhyJPsill::ValidPhyJPsill(const std::string& name, ISvcLocator* pSvcLocator) :
12 Algorithm(name, pSvcLocator) {
13
14 //Declare the properties
15 declareProperty("signal", m_signal = false);
16
17
18}
19
20// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
21// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
23 MsgStream log(msgSvc(), name());
24
25 log << MSG::INFO << "in initialize()" << endmsg;
26
27 StatusCode sc;
28
29 if (m_signal){
30 sc = createSubAlgorithm("Signal", "Signal", m_Signal);
31 if(sc.isFailure()) {
32 log << MSG::ERROR << "Error create 'Signal' algorithm" << endreq;
33 return StatusCode::FAILURE;
34 }
35 }
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
54 return StatusCode::SUCCESS;
55
56}
57
58// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
61
62 MsgStream log(msgSvc(), name());
63 log << MSG::INFO << "in execute()" << endreq;
64
65 StatusCode sc;
66 std::vector<Algorithm*>::const_iterator it = subAlgorithms()->begin();
67 std::vector<Algorithm*>::const_iterator end = subAlgorithms()->end();
68 for(; it != end; it++) {
69 sc = (*it)->execute();
70 if(sc.isFailure())
71 log << "Error while executing " << (*it)->name() << endreq;
72 }
73
74 return StatusCode::SUCCESS;
75}
76
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
79// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
81
82 MsgStream log(msgSvc(), name());
83 log << MSG::INFO << "in finalize()" << endmsg;
84
85
86 return StatusCode::SUCCESS;
87}
88
89
90
IMessageSvc * msgSvc()
StatusCode initialize()
StatusCode finalize()
StatusCode execute()
ValidPhyJPsill(const std::string &name, ISvcLocator *pSvcLocator)