BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
ValidJpsiRhopi.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
11ValidJpsiRhopi::ValidJpsiRhopi(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// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
22 MsgStream log(msgSvc(), name());
23
24 log << MSG::INFO << "in initialize()" << endmsg;
25
26 StatusCode sc;
27
28 if (m_signal){
29 sc = createSubAlgorithm("rhopi", "rhopi", m_Signal);
30 if(sc.isFailure()) {
31 log << MSG::ERROR << "Error create 'Signal' algorithm" << endreq;
32 return StatusCode::FAILURE;
33 }
34 }
35
36 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
37 return StatusCode::SUCCESS;
38
39}
40
41// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
44
45 MsgStream log(msgSvc(), name());
46 log << MSG::INFO << "in execute()" << endreq;
47
48 StatusCode sc;
49 std::vector<Algorithm*>::const_iterator it = subAlgorithms()->begin();
50 std::vector<Algorithm*>::const_iterator end = subAlgorithms()->end();
51 for(; it != end; it++) {
52 sc = (*it)->execute();
53 if(sc.isFailure())
54 log << "Error while executing " << (*it)->name() << endreq;
55 }
56
57 return StatusCode::SUCCESS;
58}
59
60
61// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
62// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
64
65 MsgStream log(msgSvc(), name());
66 log << MSG::INFO << "in finalize()" << endmsg;
67
68
69 return StatusCode::SUCCESS;
70}
71
72
73
IMessageSvc * msgSvc()
StatusCode finalize()
StatusCode execute()
StatusCode initialize()
ValidJpsiRhopi(const std::string &name, ISvcLocator *pSvcLocator)