DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Configuration.cpp
Go to the documentation of this file.
1/*
2 * Configuration.cxx
3 * ERS
4 *
5 * Created by Serguei Kolos on 21.01.05.
6 * Copyright 2005 CERN. All rights reserved.
7 *
8 */
9#include <cstdio>
10#include <iostream>
11
12#include <ers/Configuration.hpp>
13#include <ers/ers.hpp>
15#include <ers/internal/Util.hpp>
16
30
35 : m_debug_level( 0 ),
36 m_verbosity_level( 0 )
37{
38 m_debug_level = read_from_environment( "DUNEDAQ_ERS_DEBUG_LEVEL", m_debug_level );
39 m_verbosity_level = read_from_environment( "DUNEDAQ_ERS_VERBOSITY_LEVEL", m_verbosity_level );
40}
41
42void
47
48std::ostream &
49ers::operator<<( std::ostream & out, const ers::Configuration & conf )
50{
51 out << "debug level = " << conf.m_debug_level << " verbosity level = " << conf.m_verbosity_level;
52 return out;
53}
Manager of ERS streams configuration.
int m_debug_level
current active level for the debug stream
int verbosity_level() const
returns current verbosity level
static Configuration & instance()
return the singleton
int m_verbosity_level
current verbosity level for all streams
int verbosity_level()
Definition ers.hpp:108
int read_from_environment(const char *name, int default_value)
Definition Util.cpp:27
std::ostream & operator<<(std::ostream &, const ers::Configuration &)