BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
HelloWorld Class Reference

#include <HelloWorld.h>

+ Inheritance diagram for HelloWorld:

Public Member Functions

 HelloWorld (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 6 of file HelloWorld.h.

Constructor & Destructor Documentation

◆ HelloWorld()

HelloWorld::HelloWorld ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 6 of file HelloWorld.cxx.

6 :
7 Algorithm(name, pSvcLocator), m_myInt(0), m_myBool(0), m_myDouble(0)
8{
9 // Part 1: Declare the properties
10 declareProperty("MyInt", m_myInt);
11 declareProperty("MyBool", m_myBool);
12 declareProperty("MyDouble", m_myDouble);
13 declareProperty("MyStringVec",m_myStringVec);
14}

Member Function Documentation

◆ execute()

StatusCode HelloWorld::execute ( )

Definition at line 39 of file HelloWorld.cxx.

39 {
40
41 // Part 1: Get the messaging service, print where you are
42 MsgStream log(msgSvc(), name());
43 log << MSG::INFO << "AtlasHelloWorld execute()" << endreq;
44
45 // Part 2: Print out the different levels of messages
46 log << MSG::DEBUG << "A DEBUG message" << endreq;
47 log << MSG::INFO << "An INFO message" << endreq;
48 log << MSG::WARNING << "A WARNING message" << endreq;
49 log << MSG::ERROR << "An ERROR message" << endreq;
50 log << MSG::FATAL << "A FATAL error message" << endreq;
51
52 return StatusCode::SUCCESS;
53}
IMessageSvc * msgSvc()

◆ finalize()

StatusCode HelloWorld::finalize ( )

Definition at line 57 of file HelloWorld.cxx.

57 {
58
59 // Part 1: Get the messaging service, print where you are
60 MsgStream log(msgSvc(), name());
61 log << MSG::INFO << "HelloWorld finalize()" << endreq;
62
63 return StatusCode::SUCCESS;
64}

◆ initialize()

StatusCode HelloWorld::initialize ( )

Definition at line 18 of file HelloWorld.cxx.

18 {
19
20 // Part 1: Get the messaging service, print where you are
21 MsgStream log(msgSvc(), name());
22 log << MSG::INFO << " HelloWorld initialize()" << endreq;
23
24 // Part 2: Print out the property values
25 log << MSG::INFO << " MyInt = " << m_myInt << endreq;
26 log << MSG::INFO << " MyBool = " << (int)m_myBool << endreq;
27 log << MSG::INFO << " MyDouble = " << m_myDouble << endreq;
28
29 for (unsigned int i=0; i<m_myStringVec.size(); i++) {
30 log << MSG::INFO << " MyStringVec[" << i << "] = " << m_myStringVec[i]
31 << endreq;
32 }
33
34 return StatusCode::SUCCESS;
35}

The documentation for this class was generated from the following files: