HelloWorld.cpp
Go to the documentation of this file.
1 // Include files
2 #include "HelloWorld.h"
3 
4 // Static Factory declaration
6 
7 // Constructor
8 //------------------------------------------------------------------------------
9 HelloWorld::HelloWorld(const std::string& name, ISvcLocator* ploc)
10  : Algorithm(name, ploc) {
11 //------------------------------------------------------------------------------
12  m_initialized = false;
13 }
14 
15 //------------------------------------------------------------------------------
17 //------------------------------------------------------------------------------
18  // avoid calling initialize more than once
20 
21  info() << "initializing...." << endmsg;
22 
23  m_initialized = true;
24  return StatusCode::SUCCESS;
25 }
26 
27 
28 //------------------------------------------------------------------------------
30 //------------------------------------------------------------------------------
31  info() << "executing...." << endmsg;
32 
33  return StatusCode::SUCCESS;
34 }
35 
36 
37 //------------------------------------------------------------------------------
39 //------------------------------------------------------------------------------
40  info() << "finalizing...." << endmsg;
41 
42  m_initialized = false;
43  return StatusCode::SUCCESS;
44 }
45 //------------------------------------------------------------------------------
47 //------------------------------------------------------------------------------
48  info() << "beginning new run...." << endmsg;
49 
50  m_initialized = true;
51  return StatusCode::SUCCESS;
52 }
53 
54 
55 //------------------------------------------------------------------------------
57 //------------------------------------------------------------------------------
58  info() << "ending new run...." << endmsg;
59 
60  m_initialized = true;
61  return StatusCode::SUCCESS;
62 }
StatusCode endRun()
Definition: HelloWorld.cpp:56
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
STL namespace.
#define DECLARE_COMPONENT(type)
Definition: PluginService.h:36
StatusCode execute()
Definition: HelloWorld.cpp:29
StatusCode beginRun()
Definition: HelloWorld.cpp:46
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Trivial Algorithm for tutotial purposes.
Definition: HelloWorld.h:14
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:74
StatusCode initialize()
Three mandatory member functions of any algorithm.
Definition: HelloWorld.cpp:16
bool m_initialized
Definition: HelloWorld.h:26
StatusCode finalize()
Definition: HelloWorld.cpp:38
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244