ToolDAQFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
DummyTool.cpp
Go to the documentation of this file.
1 #include "DummyTool.h"
2 
4 
5 
6 bool DummyTool::Initialise(std::string configfile, DataModel &data){
7 
8  if(configfile!="") m_variables.Initialise(configfile);
9  //m_variables.Print();
10 
11  m_data= &data;
12  m_log= m_data->Log;
13 
14  if(!m_variables.Get("verbose",m_verbose)) m_verbose=1;
15 
16  Log("test 1",1,m_verbose);
17 
18  return true;
19 }
20 
21 
23 
24  // Dummy test of various printout sytles and techniques
25 
26  Log("test 2",1,m_verbose);
27  Log("test 3",1,5);
28  *m_log<<red<<"test 4 "<<green<<"test 5 "<<std::endl<<"test 6 "<<std::endl;
29  *m_log<<MsgL(2,6)<<yellow<<"test 7 "<<std::endl<<"test 8 "<<std::endl;
30  *m_log<<ML(2)<<pink<<"test 9 "<<std::endl<<"test 10 "<<std::endl;
31  *m_log<<blue<<"test 11 "<<std::endl<<"test 12 "<<std::endl;
32  MLC();
33 
34  return true;
35 }
36 
37 
39 
40  return true;
41 }
bool Initialise(std::string configfile, DataModel &data)
Assigns verbosity from config file and creates a log message.
Definition: DummyTool.cpp:6
Logging * Log
Log class pointer for use in Tools, it can be used to send messages which can have multiple error lev...
Definition: DataModel.h:60
bool Execute()
Creates a log message.
Definition: DummyTool.cpp:22
DummyTool()
Constructor.
Definition: DummyTool.cpp:3
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
Definition: Utilities.cpp:276
bool Finalise()
Does nothing.
Definition: DummyTool.cpp:38