12 LCWarning::LCWarning(
ostream& outstream ) : _outstream(outstream) {
17 "SIMTRACKERHIT_DEPRECATED_GETDEDX",
18 "used DEPRECATED method SimTrackerHitImpl::getdEdx()\n"
19 "please change your code to use SimTrackerHitImpl::getEDep() instead"
23 "SIMTRACKERHIT_DEPRECATED_SETDEDX",
24 "used DEPRECATED method SimTrackerHitImpl::setdEdx()\n"
25 "please change your code to use SimTrackerHitImpl::setEDep() instead"
29 "SIMTRACKERHIT_DEPRECATED_GETCELLID",
30 "used DEPRECATED method SimTrackerHitImpl::getCellID()\n"
31 "please change your code to use SimTrackerHitImpl::getCellID0() instead"
35 "SIMTRACKERHIT_DEPRECATED_SETCELLID",
36 "used DEPRECATED method SimTrackerHitImpl::setCellID()\n"
37 "please change your code to use SimTrackerHitImpl::setCellID0() instead"
46 "TRACKERHIT_DEPRECATED_GETDEDX",
47 "used DEPRECATED method TrackerHitImpl::getdEdx()\n"
48 "please change your code to use TrackerHitImpl::getEDep()"
52 "TRACKERHIT_DEPRECATED_SETDEDX",
53 "used DEPRECATED method TrackerHitImpl::setdEdx()\n"
54 "please change your code to use TrackerHitImpl::setEDep() instead."
62 "SIMCALORIMETERHIT_DEPRECATED_GETNMCPARTICLES",
63 "used DEPRECATED method SimCalorimeterHitImpl::getNMCParticles()\n"
64 "please change your code to use SimCalorimeterHitImpl::getNMCContributions() instead"
72 "MCPARTICLE_DEPRECATED_GETNUMBEROFPARENTS",
73 "used DEPRECATED method MCParticleImpl::getNumberOfParents()\n"
74 "please change your code to use MCParticleImpl::getParents().size() instead."
78 "MCPARTICLE_DEPRECATED_GETPARENT",
79 "used DEPRECATED method MCParticleImpl::getParent(i)\n"
80 "please change your code to use MCParticleImpl::getParents()[i] instead."
84 "MCPARTICLE_DEPRECATED_GETNUMBEROFDAUGHTERS",
85 "used DEPRECATED method MCParticleImpl::getNumberOfDaughters()\n"
86 "please change your code to use MCParticleImpl::getDaughters().size() instead."
90 "MCPARTICLE_DEPRECATED_GETDAUGHTER",
91 "used DEPRECATED method MCParticleImpl::getDaughter(i)\n"
92 "please change your code to use MCParticleImpl::getDaughters()[i] instead."
123 <<
endl <<
"=========== WARNING ========================================================="
127 _outstream <<
endl <<
"*** this warning will be printed (at most) "
133 _outstream <<
endl <<
"*** the maximum amount of times for printing this warning has been reached."
134 <<
endl <<
"*** this warning will be printed one last time before the application exits." ;
138 _outstream <<
endl <<
"============================================================================="
150 bool first_warning =
true;
153 if( (*_warning_cfg_it).second.max != (*_warning_cfg_it).second.counter ){
156 <<
endl <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
157 <<
endl <<
"+++ FOLLOWING WARNINGS WERE FOUND:"
158 <<
endl <<
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
160 first_warning = false ;
Base exception class for LCIO - all other exceptions extend this.
std::ostream & _outstream
static LCWarning & instance
std::map< std::string, _warning_cfg_struct >::iterator _warning_cfg_it
std::map< std::string, _warning_cfg_struct > _warning_cfg
void printWarning(const std::string &id)
print the warning text associated to the given id
void registerWarning(const std::string &id, const std::string &txt, int max=10)
register a new warning
static LCWarning & getInstance()
Utility class to show warnings in LCIO.