DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ValidationReport.hpp
Go to the documentation of this file.
1
9#ifndef APPFWK_INCLUDE_APPFWK_VALIDATIONREPORT_HPP_
10#define APPFWK_INCLUDE_APPFWK_VALIDATIONREPORT_HPP_
11
12#include <string>
13
14namespace dunedaq {
15
16
17namespace appfwk {
18
20{
21public:
30
31 ValidationReport(Severity sev, std::string app, std::string module, std::string command, std::string message)
32 : m_severity(sev)
33 , m_app(app)
34 , m_module(module)
35 , m_command(command)
36 , m_message(message)
37 {
38 }
39
40 std::string severity_string()
41 {
42 switch (m_severity) {
43 case Severity::Fatal:
44 return "Fatal";
45 case Severity::Error:
46 return "Error";
48 return "Warning";
49 case Severity::Info:
50 return "Info";
52 return "Debug";
53 }
54 return "UNKNOWN";
55 }
56
57 Severity get_severity() const { return m_severity; }
58 std::string get_app() const { return m_app; }
59 std::string get_module() const { return m_module; }
60 std::string get_command() const { return m_command; }
61 std::string get_message() const { return m_message; }
62
63private:
65 std::string m_app;
66 std::string m_module;
67 std::string m_command;
68 std::string m_message;
69};
70
71} // namespace appfwk
72} //namespace dunedaq
73
74#endif // APPFWK_INCLUDE_APPFWK_VALIDATIONREPORT_HPP_
ValidationReport(Severity sev, std::string app, std::string module, std::string command, std::string message)
The DUNE-DAQ namespace.