DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
StandardStream.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/internal/StandardStream.h to include/ers/internal/StandardStream.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 * StandardStream.h
14 * ers
15 *
16 * Created by Serguei Kolos on 02.08.05.
17 * Copyright 2004 CERN. All rights reserved.
18 *
19 */
20
25
26#ifndef ERS_STANDARD_STREAM_H
27#define ERS_STANDARD_STREAM_H
28
29#include <ers/OutputStream.hpp>
31
32namespace ers {
33
39
40template<class Device>
42 : public OutputStream
44 , public Device
45{
46 using Device::device;
47
49
50 StandardStream(const std::string& file_name)
51 : Device(file_name)
52 {
53 ;
54 }
55
56 void write(const Issue& issue)
57 {
58 println(device().stream(), issue, Configuration::instance().verbosity_level());
59 chained().write(issue);
60 }
61};
62}
63
64#endif
static Configuration & instance()
return the singleton
Base class for any user define issue.
Definition Issue.hpp:76
virtual void write(const Issue &issue)=0
OutputStream & chained()
int verbosity_level()
Definition ers.hpp:140
static std::ostream & println(std::ostream &out, const Issue &issue, int verbosity)
void write(const Issue &issue)
StandardStream(const std::string &file_name)