DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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
33namespace ers {
34class BadSeverity;
35
45
47{
49 : type(severity)
50 , rank(level)
51 {
52 ;
53 }
54
55 operator ers::severity() { return type; }
56
58 int rank;
59};
60
62parse(const std::string& s, severity&);
64parse(const std::string& s, Severity&);
65std::string
67std::string
69
70inline std::ostream&
71operator<<(std::ostream& out, ers::severity severity)
72{
73 out << to_string(severity);
74 return out;
75}
76
77inline std::ostream&
78operator<<(std::ostream& out, const ers::Severity& severity)
79{
80 out << to_string(severity);
81 return out;
82}
83
84inline std::istream&
86{
87 std::string string;
88 in >> string;
89 parse(string, severity);
90 return in;
91}
92
93inline std::istream&
95{
96 std::string string;
97 in >> string;
98 parse(string, severity);
99 return in;
100}
101}
102
103#endif
std::istream & operator>>(std::istream &in, ers::severity &severity)
Definition Severity.hpp:85
std::string to_string(severity s)
severity parse(const std::string &s, severity &)
Definition Severity.cpp:60
std::ostream & operator<<(std::ostream &, const ers::Configuration &)
severity
Definition Severity.hpp:37
@ Debug
Definition Severity.hpp:38
@ Error
Definition Severity.hpp:42
@ Fatal
Definition Severity.hpp:43
@ Log
Definition Severity.hpp:39
@ Warning
Definition Severity.hpp:41
@ Information
Definition Severity.hpp:40
operator ers::severity()
Definition Severity.hpp:55
Severity(ers::severity severity, int level=0)
Definition Severity.hpp:48
enum severity type
Definition Severity.hpp:57