All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HelloWorld.cpp
Go to the documentation of this file.
1 // Include files
2 #include "GaudiKernel/MsgStream.h"
3 #include "GaudiKernel/DataObject.h"
4 #include "GaudiKernel/IDataProviderSvc.h"
5 #include "HelloWorld.h"
6 
7 // Static Factory declaration
9 
10 // Constructor
11 //------------------------------------------------------------------------------
12 HelloWorld::HelloWorld(const std::string& name, ISvcLocator* ploc)
13  : Algorithm(name, ploc) {
14 //------------------------------------------------------------------------------
15  m_initialized = false;
16 }
17 
18 //------------------------------------------------------------------------------
20 //------------------------------------------------------------------------------
21  // avoid calling initialize more than once
23 
24  MsgStream log(msgSvc(), name());
25  log << MSG::INFO << "initializing...." << endmsg;
26 
27  m_initialized = true;
28  return StatusCode::SUCCESS;
29 }
30 
31 
32 //------------------------------------------------------------------------------
34 //------------------------------------------------------------------------------
35  MsgStream log( msgSvc(), name() );
36  log << MSG::INFO << "executing...." << endmsg;
37 
38  return StatusCode::SUCCESS;
39 }
40 
41 
42 //------------------------------------------------------------------------------
44 //------------------------------------------------------------------------------
45  MsgStream log(msgSvc(), name());
46  log << MSG::INFO << "finalizing...." << endmsg;
47 
48  m_initialized = false;
49  return StatusCode::SUCCESS;
50 }
51 //------------------------------------------------------------------------------
53 //------------------------------------------------------------------------------
54  MsgStream log(msgSvc(), name());
55  log << MSG::INFO << "beginning new run...." << endmsg;
56 
57  m_initialized = true;
58  return StatusCode::SUCCESS;
59 }
60 
61 
62 //------------------------------------------------------------------------------
64 //------------------------------------------------------------------------------
65  MsgStream log(msgSvc(), name());
66  log << MSG::INFO << "ending new run...." << endmsg;
67 
68  m_initialized = true;
69  return StatusCode::SUCCESS;
70 }