DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
StandardStream.hpp
Go to the documentation of this file.
1/*
2 * StandardStream.h
3 * ers
4 *
5 * Created by Serguei Kolos on 02.08.05.
6 * Copyright 2004 CERN. All rights reserved.
7 *
8 */
9
15#ifndef ERS_STANDARD_STREAM_H
16#define ERS_STANDARD_STREAM_H
17
18#include <ers/OutputStream.hpp>
20
21namespace ers
22{
23
30 template <class Device>
33 public Device
34 {
35 using Device::device;
36
38 { ; }
39
40 StandardStream( const std::string & file_name )
41 : Device ( file_name )
42 { ; }
43
44 void write( const Issue & issue )
45 {
46 println( device().stream(), issue, Configuration::instance().verbosity_level() );
47 chained().write( issue );
48 }
49 };
50}
51
52#endif
static Configuration & instance()
return the singleton
Base class for any user define issue.
Definition Issue.hpp:69
ERS abstract output stream interface.
virtual void write(const Issue &issue)=0
OutputStream & chained()
int verbosity_level()
Definition ers.hpp:108
static std::ostream & println(std::ostream &out, const Issue &issue, int verbosity)
Single line, human readable format stream.
void write(const Issue &issue)
StandardStream(const std::string &file_name)