HelloWorld Class Reference

#include <HelloWorld.h>

List of all members.

Public Member Functions

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

Private Attributes

int m_myInt
bool m_myBool
double m_myDouble
std::vector< std::stringm_myStringVec


Detailed Description

Definition at line 6 of file HelloWorld.h.


Constructor & Destructor Documentation

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

Definition at line 6 of file HelloWorld.cxx.

References m_myBool, m_myDouble, m_myInt, and m_myStringVec.

00006                                                                       :
00007   Algorithm(name, pSvcLocator), m_myInt(0), m_myBool(0), m_myDouble(0)
00008 {
00009   // Part 1: Declare the properties
00010   declareProperty("MyInt", m_myInt);
00011   declareProperty("MyBool", m_myBool);
00012   declareProperty("MyDouble", m_myDouble);
00013   declareProperty("MyStringVec",m_myStringVec);
00014 }


Member Function Documentation

StatusCode HelloWorld::execute (  ) 

Definition at line 39 of file HelloWorld.cxx.

References Bes_Common::DEBUG, calibUtil::ERROR, Bes_Common::FATAL, Bes_Common::INFO, msgSvc(), and Bes_Common::WARNING.

00039                                {
00040 
00041   // Part 1: Get the messaging service, print where you are
00042   MsgStream log(msgSvc(), name());
00043   log << MSG::INFO << "AtlasHelloWorld execute()" << endreq;
00044 
00045   // Part 2: Print out the different levels of messages
00046   log << MSG::DEBUG << "A DEBUG message" << endreq;
00047   log << MSG::INFO << "An INFO message" << endreq;
00048   log << MSG::WARNING << "A WARNING message" << endreq;
00049   log << MSG::ERROR << "An ERROR message" << endreq;
00050   log << MSG::FATAL << "A FATAL error message" << endreq;
00051 
00052   return StatusCode::SUCCESS;
00053 }

StatusCode HelloWorld::finalize (  ) 

Definition at line 57 of file HelloWorld.cxx.

References Bes_Common::INFO, and msgSvc().

00057                                 {
00058 
00059   // Part 1: Get the messaging service, print where you are
00060   MsgStream log(msgSvc(), name());
00061   log << MSG::INFO << "HelloWorld finalize()" << endreq;
00062   
00063   return StatusCode::SUCCESS;
00064 }

StatusCode HelloWorld::initialize (  ) 

Definition at line 18 of file HelloWorld.cxx.

References genRecEmupikp::i, Bes_Common::INFO, m_myBool, m_myDouble, m_myInt, m_myStringVec, and msgSvc().

00018                                  {
00019 
00020   // Part 1: Get the messaging service, print where you are
00021   MsgStream log(msgSvc(), name());
00022   log << MSG::INFO << " HelloWorld initialize()" << endreq;
00023 
00024   // Part 2: Print out the property values
00025   log << MSG::INFO << "  MyInt =    " << m_myInt << endreq;
00026   log << MSG::INFO << "  MyBool =   " << (int)m_myBool << endreq;
00027   log << MSG::INFO << "  MyDouble = " << m_myDouble << endreq;
00028   
00029   for (unsigned int i=0; i<m_myStringVec.size(); i++) {
00030     log << MSG::INFO << "  MyStringVec[" << i << "] = " << m_myStringVec[i] 
00031         << endreq;
00032   }
00033   
00034   return StatusCode::SUCCESS;
00035 }


Member Data Documentation

bool HelloWorld::m_myBool [private]

Definition at line 16 of file HelloWorld.h.

Referenced by HelloWorld(), and initialize().

double HelloWorld::m_myDouble [private]

Definition at line 17 of file HelloWorld.h.

Referenced by HelloWorld(), and initialize().

int HelloWorld::m_myInt [private]

Definition at line 15 of file HelloWorld.h.

Referenced by HelloWorld(), and initialize().

std::vector<std::string> HelloWorld::m_myStringVec [private]

Definition at line 18 of file HelloWorld.h.

Referenced by HelloWorld(), and initialize().


Generated on Tue Nov 29 23:19:39 2016 for BOSS_7.0.2 by  doxygen 1.4.7