DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
ers
include
ers
Severity.hpp
Go to the documentation of this file.
1
/*
2
* DUNE DAQ modification notice:
3
* This file has been modified from the original ATLAS ers source for the DUNE DAQ project.
4
* Fork baseline commit: 8267df82a4f6fe6bf02c4014923eba19eddc4614 (2020-04-14).
5
* Renamed since fork: yes (from ers/Severity.h to include/ers/Severity.hpp).
6
*
7
* Original copyright:
8
* Copyright (C) 2001-2020 CERN for the benefit of the ATLAS collaboration.
9
* Licensed under the Apache License, Version 2.0.
10
*/
11
12
/*
13
* Severity.h
14
* ers
15
*
16
* Created by Serguei Kolos on 26.08.05.
17
* Copyright 2005 CERN. All rights reserved.
18
*
19
*/
20
25
26
#ifndef ERS_SEVERITY_H
27
#define ERS_SEVERITY_H
28
29
#include <iostream>
30
#include <string>
31
#include <vector>
32
33
namespace
ers
{
34
class
BadSeverity;
35
36
enum
severity
37
{
38
Debug
,
39
Log
,
40
Information
,
41
Warning
,
42
Error
,
43
Fatal
44
};
45
46
struct
Severity
47
{
48
Severity
(
ers::severity
severity
,
int
level = 0)
49
:
type
(
severity
)
50
,
rank
(level)
51
{
52
;
53
}
54
55
operator
ers::severity
() {
return
type
; }
56
57
enum
severity
type
;
58
int
rank
;
59
};
60
61
severity
62
parse
(
const
std::string& s,
severity
&);
63
Severity
64
parse
(
const
std::string& s,
Severity
&);
65
std::string
66
to_string
(
severity
s);
67
std::string
68
to_string
(
Severity
s);
69
70
inline
std::ostream&
71
operator<<
(std::ostream& out,
ers::severity
severity
)
72
{
73
out <<
to_string
(
severity
);
74
return
out;
75
}
76
77
inline
std::ostream&
78
operator<<
(std::ostream& out,
const
ers::Severity
&
severity
)
79
{
80
out <<
to_string
(
severity
);
81
return
out;
82
}
83
84
inline
std::istream&
85
operator>>
(std::istream& in,
ers::severity
&
severity
)
86
{
87
std::string string;
88
in >> string;
89
parse
(
string
,
severity
);
90
return
in;
91
}
92
93
inline
std::istream&
94
operator>>
(std::istream& in,
ers::Severity
&
severity
)
95
{
96
std::string string;
97
in >> string;
98
parse
(
string
,
severity
);
99
return
in;
100
}
101
}
102
103
#endif
ers
Definition
Logger.hxx:231
ers::operator>>
std::istream & operator>>(std::istream &in, ers::severity &severity)
Definition
Severity.hpp:85
ers::to_string
std::string to_string(severity s)
ers::parse
severity parse(const std::string &s, severity &)
Definition
Severity.cpp:60
ers::operator<<
std::ostream & operator<<(std::ostream &, const ers::Configuration &)
Definition
Configuration.cpp:60
ers::severity
severity
Definition
Severity.hpp:37
ers::Debug
@ Debug
Definition
Severity.hpp:38
ers::Error
@ Error
Definition
Severity.hpp:42
ers::Fatal
@ Fatal
Definition
Severity.hpp:43
ers::Log
@ Log
Definition
Severity.hpp:39
ers::Warning
@ Warning
Definition
Severity.hpp:41
ers::Information
@ Information
Definition
Severity.hpp:40
ers::Severity
Definition
Severity.hpp:47
ers::Severity::severity
operator ers::severity()
Definition
Severity.hpp:55
ers::Severity::Severity
Severity(ers::severity severity, int level=0)
Definition
Severity.hpp:48
ers::Severity::type
enum severity type
Definition
Severity.hpp:57
ers::Severity::rank
int rank
Definition
Severity.hpp:58
Generated on
for DUNE-DAQ by
1.18.0