00001 #include "DybHelloWorld.h"
00002
00003 using namespace std;
00004
00005 DybHelloWorld::DybHelloWorld(const string& name, ISvcLocator* pSvcLocator) :
00006 GaudiAlgorithm(name, pSvcLocator), m_myInt(0), m_myBool(0), m_myDouble(0)
00007 {
00008
00009 declareProperty("MyInt", m_myInt, "My Integer");
00010 declareProperty("MyBool", m_myBool, "My Bool");
00011 declareProperty("MyDouble", m_myDouble, "My Double");
00012 declareProperty("MyStringVec",m_myStringVec, "My String Vector");
00013 declareProperty("MyIntegerProperty", m_participant=40, "My Integer Property");
00014 declareProperty("MyStringMap",m_myStringMap,"My String Map");
00015 declareProperty("MyStringVectorMap",m_myStringVectorMap,"My String Vector Map");
00016 m_participant.verifier().setBounds(0, 45);
00017 }
00018
00019
00020
00021 StatusCode DybHelloWorld::initialize(){
00022
00023
00024 info() << " DybHelloWorld initialize()" << endreq;
00025
00026
00027 info() << " MyInt = " << m_myInt << endreq;
00028 info() << " MyBool = " << (int)m_myBool << endreq;
00029 info() << " MyDouble = " << m_myDouble << endreq;
00030
00031 for (unsigned int i=0; i<m_myStringVec.size(); i++) {
00032 info() << " MyStringVec[" << i << "] = " << m_myStringVec[i]
00033 << endreq;
00034 }
00035
00036 {
00037 map<string,string>::iterator it, done = m_myStringMap.end();
00038 info () << "MyStringMap: {\n";
00039 for (it = m_myStringMap.begin(); it != done; ++it) {
00040 info() << "\t" << it->first << " : " << it->second << ",\n";
00041 }
00042 info () << "\t}" << endreq;
00043 }
00044 {
00045 map<string,vector<string> >::iterator it, done = m_myStringVectorMap.end();
00046 info () << "MyStringVectorMap: {\n";
00047 for (it = m_myStringVectorMap.begin(); it != done; ++it) {
00048 info() << "\t" << it->first << " : [";
00049 vector<string>& vec = it->second;
00050 for (size_t ind = 0; ind < vec.size(); ++ind) {
00051 info() << " " << vec[ind];
00052 }
00053 info() << "]\n";
00054 }
00055 info () << "\t}" << endreq;
00056 }
00057 info() << " MyIntegerProperty = " << m_participant
00058 << " [Bounds are " << m_participant.verifier().lower()
00059 << " , " << m_participant.verifier().upper() << " ] "
00060 << endreq;
00061
00062 return StatusCode::SUCCESS;
00063 }
00064
00065
00066
00067 StatusCode DybHelloWorld::execute() {
00068
00069
00070 info() << "DybHelloWorld execute()" << endreq;
00071
00072
00073 verbose() << "A VERBOSE message" << endreq;
00074 debug() << "A DEBUG message" << endreq;
00075 info() << "An INFO message" << endreq;
00076 warning() << "A WARNING message" << endreq;
00077 error() << "An ERROR message" << endreq;
00078 fatal() << "A FATAL error message" << endreq;
00079 always() << "A ALWAYS message" << endreq;
00080
00081 return StatusCode::SUCCESS;
00082 }
00083
00084
00085
00086 StatusCode DybHelloWorld::finalize() {
00087
00088
00089 info() << "DybHelloWorld finalize()" << endreq;
00090
00091 return StatusCode::SUCCESS;
00092 }