Belle II Software development
DAQLogMessage.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#ifndef _Belle2_DAQLogMessage_h
9#define _Belle2_DAQLogMessage_h
10
11#include "daq/slc/base/Date.h"
12
13#include "daq/slc/system/LogFile.h"
14
15#include <string>
16
17namespace Belle2 {
24
25 public:
27
28 DAQLogMessage(const std::string& nodename,
29 LogFile::Priority priority,
30 const std::string& message);
31
32 DAQLogMessage(const std::string& nodename,
33 LogFile::Priority priority,
34 const std::string& message,
35 const Date& date);
36
37 DAQLogMessage(const std::string& nodename,
38 const std::string& priority,
39 const std::string& message,
40 const Date& date);
41
42 DAQLogMessage(const std::string& nodename,
43 LogFile::Priority priority,
44 const std::string& category,
45 const std::string& message);
46
47 DAQLogMessage(const std::string& nodename,
48 LogFile::Priority priority,
49 int category,
50 const std::string& message);
51
52 DAQLogMessage(const std::string& nodename,
53 LogFile::Priority priority,
54 const std::string& category,
55 const std::string& message,
56 const Date& date);
57
58 DAQLogMessage(const std::string& nodename,
59 LogFile::Priority priority,
60 int category,
61 const std::string& message,
62 const Date& date);
63
64 DAQLogMessage(const DAQLogMessage& log);
65 virtual ~DAQLogMessage() {}
66
67 public:
68 void setId(int id) { m_id = id; }
69 void setPriority(const std::string& priority);
70 void setPriority(LogFile::Priority priority);
71 void setCategory(int category);
72 void setCategory(const std::string& category);
73 void setNodeName(const std::string& name);
74 void setMessage(const std::string& message);
75 void setDate();
76 void setDate(int date);
77 void setDate(const Date& date);
78 int getId() const { return m_id; }
79 LogFile::Priority getPriority() const;
80 int getCategory() const;
81 const std::string getCategoryName() const;
82 int getPriorityInt() const;
83 const std::string getPriorityText() const;
84 const std::string& getNodeName() const;
85 const std::string& getMessage() const;
86 int getDateInt() const;
87 const Date getDate() const;
88
89 private:
90 int m_date;
91 std::string m_nodename;
92 int m_priority;
93 std::string m_message;
94 int m_id;
95 int m_category;
96
97 };
98
100}
101
102#endif
Abstract base class for different kinds of events.