DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
ers
src
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
>
25
#include <
ers/internal/SingletonCreator.hpp
>
26
#include <
ers/internal/Util.hpp
>
27
32
ers::Configuration
&
33
ers::Configuration::instance
()
34
{
37
static
ers::Configuration
*
instance
=
ers::SingletonCreator<ers::Configuration>::create
();
38
39
return
*
instance
;
40
}
41
45
ers::Configuration::Configuration
()
46
:
m_debug_level
( 0 ),
47
m_verbosity_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
53
void
54
ers::Configuration::verbosity_level
(
int
verbosity_level
)
55
{
56
m_verbosity_level
=
verbosity_level
;
57
}
58
59
std::ostream &
60
ers::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
}
SingletonCreator.hpp
Util.hpp
ers::Configuration
Manager of ERS streams configuration.
Definition
Configuration.hpp:50
ers::Configuration::m_debug_level
int m_debug_level
current active level for the debug stream
Definition
Configuration.hpp:72
ers::Configuration::Configuration
Configuration()
Definition
Configuration.cpp:45
ers::Configuration::verbosity_level
int verbosity_level() const
returns current verbosity level
Definition
Configuration.hpp:61
ers::Configuration::instance
static Configuration & instance()
return the singleton
Definition
Configuration.cpp:33
ers::Configuration::m_verbosity_level
int m_verbosity_level
current verbosity level for all streams
Definition
Configuration.hpp:73
ers::SingletonCreator::create
static T * create()
Definition
SingletonCreator.hpp:40
Configuration.hpp
ers.hpp
ers::read_from_environment
int read_from_environment(const char *name, int default_value)
Definition
Util.cpp:38
ers::operator<<
std::ostream & operator<<(std::ostream &, const ers::Configuration &)
Definition
Configuration.cpp:60
Generated on
for DUNE-DAQ by
1.17.0