Wraps a message to logger (received as parameter or created here), its access and configuration. More...
#include <Configuration/MessageLoggerConfig.h>
Public Member Functions | |
void | ApplyConfiguration () |
Apply already loaded configuration. More... | |
void | Configure (const Branch &config) |
const unsigned int & | GetLevel () const |
Retrieve (read-only) the current level of verbosity. More... | |
unsigned int & | GetLevel () |
Retrieve by reference the current level of verbosity. More... | |
MessageLoggerConfig (MessageLogger &l, const Branch &config) | |
Create configurator with the logger to configure and the branch from where to load the configuration. More... | |
MessageLoggerConfig (MessageLogger &l) | |
Create configurator with the logger to configure. More... | |
MessageLoggerConfig (const Branch &config) | |
Create configurator given the branch from where to load the configuration. More... | |
MessageLoggerConfig () | |
Create a configurator without any configuration yet. More... | |
template<typename T > | |
MessageLogger::Message | operator() (const T &message, unsigned int level=0, bool trailEOL=true) |
void | SetLevel (unsigned int vl) |
Change the level of verbosity. More... | |
Public Attributes | |
template<class S > | |
void | const |
Apply configuration to the given stream via manipulators. More... | |
Private Member Functions | |
void | LoadConfiguration (const Branch &config) |
Private Attributes | |
unsigned int | fFlushPeriod = 0 |
The period. More... | |
unsigned int | fLevel = 0 |
unsigned int | fNPrecDigits = 0 |
Precission digits. More... | |
std::ofstream | fOutput |
Output message sink. More... | |
std::string | fOutputFilename |
Output log filename (if empty, then cout). More... | |
std::unique_ptr< MessageLogger > | fOwnLogger |
Pointer to self created logger. More... | |
MessageLogger & | fTheLogger |
The logger to configure. More... | |
Wraps a message to logger (received as parameter or created here), its access and configuration.
Definition at line 29 of file MessageLoggerConfig.h.
utl::MessageLoggerConfig::MessageLoggerConfig | ( | MessageLogger & | l, |
const Branch & | config | ||
) |
Create configurator with the logger to configure and the branch from where to load the configuration.
Definition at line 9 of file MessageLoggerConfig.cc.
References Configure().
utl::MessageLoggerConfig::MessageLoggerConfig | ( | MessageLogger & | l | ) |
Create configurator with the logger to configure.
Definition at line 16 of file MessageLoggerConfig.cc.
Create configurator given the branch from where to load the configuration.
Definition at line 21 of file MessageLoggerConfig.cc.
References Configure().
utl::MessageLoggerConfig::MessageLoggerConfig | ( | ) |
Create a configurator without any configuration yet.
Definition at line 29 of file MessageLoggerConfig.cc.
void utl::MessageLoggerConfig::ApplyConfiguration | ( | ) |
Apply already loaded configuration.
Definition at line 58 of file MessageLoggerConfig.cc.
References fFlushPeriod, fLevel, fNPrecDigits, fTheLogger, utl::MessageLogger::SetFlushPeriod(), utl::MessageLogger::SetLevel(), and utl::MessageLogger::SetNPrecDigits().
Referenced by Configure().
Definition at line 50 of file MessageLoggerConfig.cc.
References ApplyConfiguration(), and LoadConfiguration().
Referenced by EdepSimulatorAG::EdepSimulator::Init(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::Init(), MdCounterSimulatorAG::MdCounterSimulator::Init(), and MessageLoggerConfig().
|
inline |
Retrieve (read-only) the current level of verbosity.
Definition at line 49 of file MessageLoggerConfig.h.
References fLevel.
Referenced by MdCounterSimulatorAG::MdCounterSimulator::ApplyCITIROCTransfer(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlock(), MdCounterSimulatorAG::MdCounterSimulator::ApplyTransferBlock(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ApplyTransferBlocks(), MdCounterSimulatorAG::MdCounterSimulator::ApplyTransferBlocks(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::GetPulseTimeSpan(), MdCounterSimulatorAG::MdCounterSimulator::GetPulseTimeSpan(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::ProcessPulses(), MdCounterSimulatorAG::MdCounterSimulator::ProcessPulses(), EdepSimulatorAG::EdepSimulator::Run(), and MdCounterSimulatorAG::MdCounterSimulator::SimulatePulses().
|
inline |
Retrieve by reference the current level of verbosity.
Definition at line 53 of file MessageLoggerConfig.h.
References fLevel.
Definition at line 36 of file MessageLoggerConfig.cc.
References fFlushPeriod, fLevel, fNPrecDigits, fOutput, fOutputFilename, and utl::LoadConfig().
Referenced by Configure().
|
inline |
Create a message for the given level.
Definition at line 62 of file MessageLoggerConfig.h.
References fTheLogger.
|
inline |
Change the level of verbosity.
Definition at line 56 of file MessageLoggerConfig.h.
References fLevel.
void utl::MessageLoggerConfig::const |
Apply configuration to the given stream via manipulators.
Definition at line 70 of file MessageLoggerConfig.h.
|
private |
The period.
Definition at line 90 of file MessageLoggerConfig.h.
Referenced by ApplyConfiguration(), and LoadConfiguration().
|
private |
Control how much output is generated.
Definition at line 84 of file MessageLoggerConfig.h.
Referenced by ApplyConfiguration(), GetLevel(), LoadConfiguration(), and SetLevel().
|
private |
Precission digits.
Definition at line 87 of file MessageLoggerConfig.h.
Referenced by ApplyConfiguration(), and LoadConfiguration().
|
private |
Output message sink.
Definition at line 93 of file MessageLoggerConfig.h.
Referenced by LoadConfiguration().
|
private |
Output log filename (if empty, then cout).
Definition at line 96 of file MessageLoggerConfig.h.
Referenced by LoadConfiguration().
|
private |
Pointer to self created logger.
Definition at line 99 of file MessageLoggerConfig.h.
|
private |
The logger to configure.
Definition at line 102 of file MessageLoggerConfig.h.
Referenced by ApplyConfiguration(), and operator()().