LCIO
02.17
|
Utility class to show warnings in LCIO. More...
#include <LCWarning.h>
Classes | |
struct | _warning_cfg_struct |
Public Member Functions | |
void | registerWarning (const std::string &id, const std::string &txt, int max=10) |
register a new warning More... | |
void | printWarning (const std::string &id) |
print the warning text associated to the given id More... | |
Static Public Member Functions | |
static LCWarning & | getInstance () |
Private Member Functions | |
LCWarning (std::ostream &outstream=std::cerr) | |
~LCWarning () | |
LCWarning (const LCWarning &) | |
LCWarning & | operator= (const LCWarning &) |
Private Attributes | |
std::map< std::string, _warning_cfg_struct > | _warning_cfg {} |
std::map< std::string, _warning_cfg_struct > ::iterator | _warning_cfg_it {} |
std::ostream & | _outstream |
Static Private Attributes | |
static LCWarning & | instance |
Utility class to show warnings in LCIO.
The maximum amount of warnings printed is configurable and per default set to 10.
Warnings are shown one last time when application ends.
Definition at line 20 of file LCWarning.h.
|
private |
Definition at line 12 of file LCWarning.cc.
References registerWarning().
|
private |
Definition at line 148 of file LCWarning.cc.
References _outstream, _warning_cfg, _warning_cfg_it, and std::endl().
|
private |
|
static |
Definition at line 171 of file LCWarning.cc.
References instance.
void UTIL::LCWarning::printWarning | ( | const std::string & | id | ) |
print the warning text associated to the given id
Definition at line 117 of file LCWarning.cc.
References _outstream, _warning_cfg, and std::endl().
void UTIL::LCWarning::registerWarning | ( | const std::string & | id, |
const std::string & | txt, | ||
int | max = 10 |
||
) |
register a new warning
id = "a_unique_string_to_identify_the_warning" txt = "the world will end tomorrow, leave the room immediately and go get some fun ;)" max = the maximum amount of times to display the warning
Definition at line 102 of file LCWarning.cc.
References _warning_cfg.
Referenced by LCWarning().
|
private |
Definition at line 53 of file LCWarning.h.
Referenced by printWarning(), and ~LCWarning().
|
private |
Definition at line 51 of file LCWarning.h.
Referenced by printWarning(), registerWarning(), and ~LCWarning().
|
private |
Definition at line 52 of file LCWarning.h.
Referenced by ~LCWarning().
|
staticprivate |
Definition at line 42 of file LCWarning.h.
Referenced by getInstance().