ToolDAQFramework
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
UserTools
template
MyTool.h
Go to the documentation of this file.
1
#ifndef MYTOOL_H
2
#define MYTOOL_H
3
4
#include <string>
5
#include <iostream>
6
7
#include "Tool.h"
8
#include "
Stopwatch.h
"
9
10
20
class
MyTool
:
public
Tool {
21
22
23
public
:
24
25
MyTool
();
26
bool
Initialise
(std::string configfile,
DataModel
&data);
27
bool
Execute
();
28
bool
Finalise
();
29
30
31
private
:
32
33
35
util::Stopwatch
*
m_stopwatch
;
37
std::string
m_stopwatch_file
;
38
40
int
m_verbose
;
41
43
std::stringstream
m_ss
;
44
47
void
StreamToLog
(
int
level) {
48
Log
(
m_ss
.str(), level,
m_verbose
);
49
m_ss
.str(
""
);
50
}
51
53
enum
LogLevel
{
FATAL
=-1,
ERROR
=0,
WARN
=1,
INFO
=2,
DEBUG1
=3,
DEBUG2
=4,
DEBUG3
=5};
54
55
56
};
57
58
59
#endif
MyTool::ERROR
Definition:
MyTool.h:53
MyTool::MyTool
MyTool()
Simple constructor.
Definition:
MyTool.cpp:3
MyTool
Definition:
MyTool.h:20
MyTool::DEBUG2
Definition:
MyTool.h:53
MyTool::m_ss
std::stringstream m_ss
For easy formatting of Log messages.
Definition:
MyTool.h:43
MyTool::m_stopwatch
util::Stopwatch * m_stopwatch
The stopwatch, if we're using one.
Definition:
MyTool.h:35
MyTool::Finalise
bool Finalise()
Finalise funciton used to clean up resorces.
Definition:
MyTool.cpp:52
MyTool::StreamToLog
void StreamToLog(int level)
Definition:
MyTool.h:47
MyTool::INFO
Definition:
MyTool.h:53
DataModel
Definition:
DataModel.h:39
MyTool::m_verbose
int m_verbose
Verbosity level, as defined in tool parameter file.
Definition:
MyTool.h:40
Stopwatch.h
MyTool::DEBUG3
Definition:
MyTool.h:53
MyTool::m_stopwatch_file
std::string m_stopwatch_file
Image filename to save the histogram to, if required.
Definition:
MyTool.h:37
util::Log
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
Definition:
Utilities.cpp:276
MyTool::FATAL
Definition:
MyTool.h:53
MyTool::Initialise
bool Initialise(std::string configfile, DataModel &data)
Initialise Function for setting up Tool resorces.
Definition:
MyTool.cpp:6
MyTool::LogLevel
LogLevel
Log level enumerations.
Definition:
MyTool.h:53
MyTool::DEBUG1
Definition:
MyTool.h:53
MyTool::WARN
Definition:
MyTool.h:53
MyTool::Execute
bool Execute()
Executre function used to perform Tool perpose.
Definition:
MyTool.cpp:40
util::Stopwatch
Definition:
Stopwatch.h:17
Generated by
1.8.5