DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Configuration.cpp
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 src/Configuration.cxx to src/Configuration.cpp).
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 * Configuration.cxx
14 * ERS
15 *
16 * Created by Serguei Kolos on 21.01.05.
17 * Copyright 2005 CERN. All rights reserved.
18 *
19 */
20#include <cstdio>
21#include <iostream>
22
23#include <ers/Configuration.hpp>
24#include <ers/ers.hpp>
26#include <ers/internal/Util.hpp>
27
41
46 : m_debug_level( 0 ),
48{
49 m_debug_level = read_from_environment( "DUNEDAQ_ERS_DEBUG_LEVEL", m_debug_level );
50 m_verbosity_level = read_from_environment( "DUNEDAQ_ERS_VERBOSITY_LEVEL", m_verbosity_level );
51}
52
53void
58
59std::ostream &
60ers::operator<<( std::ostream & out, const ers::Configuration & conf )
61{
62 out << "debug level = " << conf.m_debug_level << " verbosity level = " << conf.m_verbosity_level;
63 return out;
64}
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 read_from_environment(const char *name, int default_value)
Definition Util.cpp:38
std::ostream & operator<<(std::ostream &, const ers::Configuration &)