CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
edm::service::MessageServicePSetValidation Class Reference

#include <MessageServicePSetValidation.h>

Public Member Functions

std::string operator() (ParameterSet const &pset)
 

Private Types

typedef std::string String
 
typedef std::vector< StringvString
 

Private Member Functions

bool allowedVstring (std::string const &s)
 
void catBoolRestriction (ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
 
void categoryPSet (ParameterSet const &pset, std::string const &OuterPsetName, std::string const &categoryName)
 
void categoryPSets (ParameterSet const &pset, std::string const &psetName)
 
void catInts (ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
 
template<typename T >
void catNone (ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
 
void catNoPSets (ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
 
template<typename T >
T check (ParameterSet const &pset, std::string const &psetName, std::string const &parameterLabel)
 
bool checkThreshold (std::string const &thresh)
 
void defaultPSet (ParameterSet const &main_pset)
 
void destinationPSet (ParameterSet const &pset, std::string const &psetName)
 
void destinationPSets (ParameterSet const &pset)
 
template<typename T >
void disallowedParam (ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const &parameterLabel, std::string const &type)
 
void fwkJobReportPSet (ParameterSet const &pset, std::string const &psetName)
 
void fwkJobReportPSets (ParameterSet const &pset)
 
bool keywordCheck (std::string const &word)
 
bool lookForMatch (vString const &v, std::string const &s)
 
void messageLoggerPSet (ParameterSet const &pset)
 
void noBadParams (vString const &v, vString const &params, std::string const &psetName, std::string const &parameterLabel, std::string const &type)
 
void noCoutCerrClash (vString const &v, std::string const &psetName, std::string const &parameterLabel)
 
void noDuplicates (vString const &v, std::string const &psetName, std::string const &parameterLabel)
 
void noDuplicates (vString const &v1, vString const &v2, std::string const &psetName, std::string const &p1, std::string const &p2)
 
void noKeywords (vString const &v, std::string const &psetName, std::string const &parameterLabel)
 
template<typename T >
void noneExcept (ParameterSet const &pset, std::string const &psetName, std::string const &type)
 
template<typename T >
void noneExcept (ParameterSet const &pset, std::string const &psetName, std::string const &type, std::string const &ok)
 
template<typename T >
void noneExcept (ParameterSet const &pset, std::string const &psetName, std::string const &type, T const &ok1, T const &ok2)
 
template<typename T >
void noneExcept (ParameterSet const &pset, std::string const &psetName, std::string const &type, vString const &vok)
 
void noNoncategoryPsets (ParameterSet const &pset, std::string const &psetName)
 
void noNonPSetUsage (ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const &parameterLabel)
 
void noOtherPsets (ParameterSet const &pset)
 
void psetLists (ParameterSet const &pset)
 
void statisticsPSet (ParameterSet const &pset, std::string const &psetName)
 
void statisticsPSets (ParameterSet const &pset)
 
void suppressionLists (ParameterSet const &pset)
 
bool validateThreshold (std::string const &thresh, std::string const &psetName)
 
void vStringsCheck (ParameterSet const &pset, std::string const &psetName)
 
bool wildcard (vString const &v)
 

Private Attributes

std::vector< std::string > categories
 
std::vector< std::string > debugModules
 
std::vector< std::string > destinations
 
std::ostringstream flaws
 
std::vector< std::string > fwkJobReports
 
std::vector< std::string > messageIDs
 
std::vector< std::string > statistics
 
std::vector< std::string > suppressDebug
 
std::vector< std::string > suppressError
 
std::vector< std::string > suppressInfo
 
std::vector< std::string > suppressWarning
 

Detailed Description

Definition at line 42 of file MessageServicePSetValidation.h.

Member Typedef Documentation

◆ String

Definition at line 47 of file MessageServicePSetValidation.h.

◆ vString

Definition at line 48 of file MessageServicePSetValidation.h.

Member Function Documentation

◆ allowedVstring()

bool edm::service::MessageServicePSetValidation::allowedVstring ( std::string const &  s)
private

Definition at line 201 of file MessageServicePSetValidation.cc.

201  {
202  if (s == "destinations")
203  return true;
204  if (s == "statistics")
205  return true;
206  if (s == "destinations")
207  return true;
208  if (s == "fwkJobReports")
209  return true;
210  if (s == "categories")
211  return true;
212  if (s == "messageIDs")
213  return true;
214  if (s == "debugModules")
215  return true;
216  if (s == "suppressInfo")
217  return true;
218  if (s == "suppressDebug")
219  return true;
220  if (s == "suppressWarning")
221  return true;
222  if (s == "suppressError")
223  return true;
224  return false;
225  } // allowedVstring

References alignCSCRings::s.

◆ catBoolRestriction()

void edm::service::MessageServicePSetValidation::catBoolRestriction ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  categoryName,
std::string const &  type 
)
private

Definition at line 797 of file MessageServicePSetValidation.cc.

800  {
801  vString x = pset.getParameterNamesForType<bool>(false);
802  vString::const_iterator end = x.end();
803  for (vString::const_iterator i = x.begin(); i != end; ++i) {
804  if (((*i) == "placeholder") || ((*i) == "optionalPSet"))
805  continue;
806  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
807  << (*i) << " is used as a " << type << "\n"
808  << "Usage of " << type << " is not recognized here\n";
809  }
810  x = pset.getParameterNamesForType<bool>(true);
811  end = x.end();
812  for (vString::const_iterator i = x.begin(); i != end; ++i) {
813  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
814  << (*i) << " is used as a tracked " << type << "\n"
815  << "Tracked parameters not allowed here, "
816  << " and even untracked it would not be recognized\n";
817  }
818  } // catBoolRestriction()

References end, mps_fire::i, and muonDTDigis_cfi::pset.

◆ categoryPSet()

void edm::service::MessageServicePSetValidation::categoryPSet ( ParameterSet const &  pset,
std::string const &  OuterPsetName,
std::string const &  categoryName 
)
private

Definition at line 728 of file MessageServicePSetValidation.cc.

730  {
731  if (pset.existsAs<ParameterSet>(categoryName, true)) {
732  flaws << OuterPsetName << " PSet: \n"
733  << "Category PSet " << categoryName << " is tracked - not allowed\n";
734  return;
735  }
736  ParameterSet empty_PSet;
737  ParameterSet const& c = pset.getUntrackedParameterSet(categoryName, empty_PSet);
738  std::string const& psetName(OuterPsetName);
739  catInts(c, psetName, categoryName);
740  catNone<unsigned int>(c, psetName, categoryName, "unsigned int");
741  catBoolRestriction(c, psetName, categoryName, "bool");
742  catNone<float>(c, psetName, categoryName, "float");
743  catNone<double>(c, psetName, categoryName, "double");
744  catNone<std::string>(c, psetName, categoryName, "string");
745  catNone<vString>(c, psetName, categoryName, "vSting");
746  catNoPSets(c, psetName, categoryName);
747  } // categoryPSet

References HltBtagPostValidation_cff::c, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ categoryPSets()

void edm::service::MessageServicePSetValidation::categoryPSets ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 712 of file MessageServicePSetValidation.cc.

713  {
714  categoryPSet(pset, psetName, "ERROR");
715  categoryPSet(pset, psetName, "WARNING");
716  categoryPSet(pset, psetName, "INFO");
717  categoryPSet(pset, psetName, "DEBUG");
718  if (psetName != "MessageLogger")
719  categoryPSet(pset, psetName, "default");
720  // The above conditional is because default in the main level is treated
721  // as a set of defaults differnt from those of a simple category.
722  std::vector<std::string>::const_iterator end = categories.end();
723  for (std::vector<std::string>::const_iterator i = categories.begin(); i != end; ++i) {
724  categoryPSet(pset, psetName, *i);
725  }
726  } // categoryPSets

References myMessageLogger_cff::categories, end, mps_fire::i, and muonDTDigis_cfi::pset.

◆ catInts()

void edm::service::MessageServicePSetValidation::catInts ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  categoryName 
)
private

Definition at line 749 of file MessageServicePSetValidation.cc.

751  {
752  vString x = pset.getParameterNamesForType<int>(false);
753  vString::const_iterator end = x.end();
754  for (vString::const_iterator i = x.begin(); i != end; ++i) {
755  if (*i == "limit")
756  continue;
757  if (*i == "reportEvery")
758  continue;
759  if (*i == "timespan")
760  continue;
761  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
762  << (*i) << " is not an allowed parameter within a category PSet \n";
763  }
764  x = pset.getParameterNamesForType<int>(true);
765  end = x.end();
766  for (vString::const_iterator i = x.begin(); i != end; ++i) {
767  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
768  << (*i) << " is used as a tracked int \n"
769  << "Tracked parameters not allowed here \n";
770  }
771  } // catInts()

References end, mps_fire::i, and muonDTDigis_cfi::pset.

◆ catNone()

template<typename T >
void edm::service::MessageServicePSetValidation::catNone ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  categoryName,
std::string const &  type 
)
inlineprivate

Definition at line 235 of file MessageServicePSetValidation.h.

238  {
239  vString x = pset.template getParameterNamesForType<T>(false);
240  vString::const_iterator end = x.end();
241  for (vString::const_iterator i = x.begin(); i != end; ++i) {
242  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
243  << (*i) << " is used as a " << type << "\n"
244  << "Usage of " << type << " is not recognized here\n";
245  }
246  x = pset.template getParameterNamesForType<T>(true);
247  end = x.end();
248  for (vString::const_iterator i = x.begin(); i != end; ++i) {
249  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
250  << (*i) << " is used as a tracked " << type << "\n"
251  << "Tracked parameters not allowed here, "
252  << " and even untracked it would not be recognized\n";
253  }
254  } // catNone()

References end, flaws, mps_fire::i, and muonDTDigis_cfi::pset.

◆ catNoPSets()

void edm::service::MessageServicePSetValidation::catNoPSets ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  categoryName 
)
private

Definition at line 773 of file MessageServicePSetValidation.cc.

775  {
776  vString psnames;
777  pset.getParameterSetNames(psnames, false);
778  vString::const_iterator end = psnames.end();
779  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
780  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
781  << *i << " is used as a PSet\n"
782  << "PSets not allowed within a category PSet\n";
783  }
784  psnames.clear();
785  unsigned int n = pset.getParameterSetNames(psnames, true);
786  if (n > 0) {
787  end = psnames.end();
788  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
789  flaws << categoryName << " category PSet nested in " << psetName << " PSet: \n"
790  << *i << " is used as a tracked PSet\n"
791  << "tracked parameters not permitted, and "
792  << "PSets not allowed within a category PSet\n";
793  }
794  }
795  } // catNoPSets

References end, mps_fire::i, dqmiodumpmetadata::n, and muonDTDigis_cfi::pset.

◆ check()

template<typename T >
T edm::service::MessageServicePSetValidation::check ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  parameterLabel 
)
inlineprivate

Definition at line 96 of file MessageServicePSetValidation.h.

96  {
97  T val = T();
98  try {
99  if (!pset.exists(parameterLabel))
100  return val;
101  if (pset.existsAs<T>(parameterLabel, false)) {
102  val = pset.getUntrackedParameter<T>(parameterLabel, val);
103  return val;
104  }
105  if (pset.existsAs<T>(parameterLabel, true)) {
106  flaws << psetName << " PSet: \n" << parameterLabel << " is declared as tracked - needs to be untracked \n";
107  val = pset.getParameter<T>(parameterLabel);
108  } else {
109  flaws << psetName << " PSet: \n" << parameterLabel << " is declared with incorrect type \n";
110  }
111  return val;
112  } catch (cms::Exception& e) {
113  flaws << psetName << " PSet: \n"
114  << parameterLabel << " is declared but causes an exception when processed: \n"
115  << e.what() << "\n";
116  return val;
117  }
118  } // check()

References MillePedeFileConverter_cfg::e, flaws, muonDTDigis_cfi::pset, and heppy_batch::val.

◆ checkThreshold()

bool edm::service::MessageServicePSetValidation::checkThreshold ( std::string const &  thresh)
private

Definition at line 236 of file MessageServicePSetValidation.cc.

236  {
237  if (thresh == "WARNING")
238  return true;
239  if (thresh == "INFO")
240  return true;
241  if (thresh == "ERROR")
242  return true;
243  if (thresh == "DEBUG")
244  return true;
245  return false;
246  }

References GOODCOLL_filter_cfg::thresh.

◆ defaultPSet()

void edm::service::MessageServicePSetValidation::defaultPSet ( ParameterSet const &  main_pset)
private

Definition at line 516 of file MessageServicePSetValidation.cc.

516  {
517  ParameterSet empty_PSet;
518  ParameterSet const& pset = main_pset.getUntrackedParameterSet("default", empty_PSet);
519  std::string psetName = "default (at MessageLogger main level)";
520 
521  // Category PSets
522 
523  categoryPSets(pset, psetName);
524 
525  // No other PSets -- unless they contain optionalPSet or placeholder=True
526 
527  noNoncategoryPsets(pset, psetName);
528 
529  // Parameters applying to the default category
530 
531  catInts(pset, psetName, "default");
532 
533  // General parameters
534 
535  check<bool>(pset, psetName, "placeholder");
536  std::string thresh = check<std::string>(pset, "psetName", "threshold");
537  if (!thresh.empty())
538  validateThreshold(thresh, psetName);
539  check<bool>(pset, psetName, "noLineBreaks");
540  check<int>(pset, psetName, "limit");
541  check<int>(pset, psetName, "reportEvery");
542  check<int>(pset, psetName, "timespan");
543  check<int>(pset, psetName, "lineLength");
544  check<bool>(pset, psetName, "noTimeStamps");
545 
546  // No other parameters
547  vString okint;
548  okint.push_back("limit");
549  okint.push_back("reportEvery");
550  okint.push_back("timespan");
551  okint.push_back("lineLength");
552  noneExcept<int>(pset, psetName, "int", okint);
553  vString okbool;
554  okbool.push_back("placeholder");
555  okbool.push_back("optionalPSet");
556  okbool.push_back("noLineBreaks");
557  okbool.push_back("noTimeStamps");
558  noneExcept<bool>(pset, psetName, "bool", okbool);
559  vString okstring;
560  okstring.push_back("threshold");
561  noneExcept<std::string>(pset, psetName, "string", okstring);
562 
563  } // defaultPSet

References edm::ParameterSet::getUntrackedParameterSet(), muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and GOODCOLL_filter_cfg::thresh.

◆ destinationPSet()

void edm::service::MessageServicePSetValidation::destinationPSet ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 468 of file MessageServicePSetValidation.cc.

469  {
470  // Category PSets
471 
472  categoryPSets(pset, psetName);
473 
474  // No other PSets -- unless they contain optionalPSet or placeholder=True
475 
476  noNoncategoryPsets(pset, psetName);
477 
478  // General parameters
479 
480  check<bool>(pset, psetName, "placeholder");
481  std::string thresh = check<std::string>(pset, "psetName", "threshold");
482  if (!thresh.empty())
483  validateThreshold(thresh, psetName);
484  check<bool>(pset, psetName, "noLineBreaks");
485  check<int>(pset, psetName, "lineLength");
486  check<bool>(pset, psetName, "noTimeStamps");
487  std::string s = check<std::string>(pset, "psetName", "filename");
488  if ((s == "cerr") || (s == "cout")) {
489  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of filename \n";
490  }
491  s = check<std::string>(pset, "psetName", "extension");
492  if ((s == "cerr") || (s == "cout")) {
493  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of extension \n";
494  }
495  s = check<std::string>(pset, "psetName", "output");
496 
497  // No other parameters
498 
499  noneExcept<int>(pset, psetName, "int", "lineLength");
500 
501  vString okbool;
502  okbool.push_back("placeholder");
503  okbool.push_back("optionalPSet");
504  okbool.push_back("noLineBreaks");
505  okbool.push_back("noTimeStamps");
506  noneExcept<bool>(pset, psetName, "bool", okbool);
507  vString okstring;
508  okstring.push_back("threshold");
509  okstring.push_back("output");
510  okstring.push_back("filename");
511  okstring.push_back("extension");
512  noneExcept<std::string>(pset, psetName, "string", okstring);
513 
514  } // destinationPSet

References muonDTDigis_cfi::pset, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and GOODCOLL_filter_cfg::thresh.

◆ destinationPSets()

void edm::service::MessageServicePSetValidation::destinationPSets ( ParameterSet const &  pset)
private

Definition at line 459 of file MessageServicePSetValidation.cc.

459  {
460  ParameterSet empty_PSet;
461  std::vector<std::string>::const_iterator end = destinations.end();
462  for (std::vector<std::string>::const_iterator i = destinations.begin(); i != end; ++i) {
463  ParameterSet const& d = pset.getUntrackedParameterSet(*i, empty_PSet);
464  destinationPSet(d, *i);
465  }
466  } // destinationPSets

References ztail::d, myMessageLogger_cff::destinations, end, mps_fire::i, and muonDTDigis_cfi::pset.

◆ disallowedParam()

template<typename T >
void edm::service::MessageServicePSetValidation::disallowedParam ( ParameterSet const &  pset,
vString const &  v,
std::string const &  psetName,
std::string const &  parameterLabel,
std::string const &  type 
)
inlineprivate

Definition at line 121 of file MessageServicePSetValidation.h.

125  {
126  vString params = pset.getParameterNamesForType<T>(true);
127  noBadParams(v, params, psetName, parameterLabel, type);
128  params = pset.getParameterNamesForType<T>(false);
129  noBadParams(v, params, psetName, parameterLabel, type);
130  } // disallowedParam()

References noBadParams(), CalibrationSummaryClient_cfi::params, muonDTDigis_cfi::pset, and findQualityFiles::v.

◆ fwkJobReportPSet()

void edm::service::MessageServicePSetValidation::fwkJobReportPSet ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 630 of file MessageServicePSetValidation.cc.

631  {
632  // Category PSets
633 
634  categoryPSets(pset, psetName);
635 
636  // No other PSets -- unless they contain optionalPSet or placeholder=True
637 
638  noNoncategoryPsets(pset, psetName);
639 
640  // General parameters
641 
642  check<bool>(pset, psetName, "placeholder");
643  std::string s = check<std::string>(pset, "psetName", "filename");
644  if ((s == "cerr") || (s == "cout")) {
645  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of filename \n";
646  }
647  s = check<std::string>(pset, "psetName", "extension");
648  if ((s == "cerr") || (s == "cout")) {
649  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of extension \n";
650  }
651  s = check<std::string>(pset, "psetName", "output");
652 
653  // No other parameters
654 
655  noneExcept<int>(pset, psetName, "int");
656 
657  vString okbool;
658  okbool.push_back("placeholder");
659  okbool.push_back("optionalPSet");
660  noneExcept<bool>(pset, psetName, "bool", okbool);
661  vString okstring;
662  okstring.push_back("output");
663  okstring.push_back("filename");
664  okstring.push_back("extension");
665  noneExcept<std::string>(pset, psetName, "string", okstring);
666 
667  } // fwkJobReportPSet

References muonDTDigis_cfi::pset, alignCSCRings::s, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fwkJobReportPSets()

void edm::service::MessageServicePSetValidation::fwkJobReportPSets ( ParameterSet const &  pset)
private

Definition at line 621 of file MessageServicePSetValidation.cc.

621  {
622  ParameterSet empty_PSet;
623  std::vector<std::string>::const_iterator end = fwkJobReports.end();
624  for (std::vector<std::string>::const_iterator i = fwkJobReports.begin(); i != end; ++i) {
625  ParameterSet const& d = pset.getUntrackedParameterSet(*i, empty_PSet);
626  fwkJobReportPSet(d, *i);
627  }
628  } // fwkJobReportPSets

References ztail::d, end, MessageLogger_cfi::fwkJobReports, mps_fire::i, and muonDTDigis_cfi::pset.

◆ keywordCheck()

bool edm::service::MessageServicePSetValidation::keywordCheck ( std::string const &  word)
private

Definition at line 309 of file MessageServicePSetValidation.cc.

309  {
310  if (word == "default")
311  return false;
312  if (word == "categories")
313  return false;
314  if (word == "messageIDs")
315  return false;
316  if (word == "fwkJobReports")
317  return false;
318  if (word == "destinations")
319  return false;
320  if (word == "statistics")
321  return false;
322  if (word == "debugModules")
323  return false;
324  if (word == "suppressInfo")
325  return false;
326  if (word == "suppressDebug")
327  return false;
328  if (word == "suppressWarning")
329  return false;
330  if (word == "suppressError")
331  return false;
332  if (word == "threshold")
333  return false;
334  if (word == "ERROR")
335  return false;
336  if (word == "WARNING")
337  return false;
338  if (word == "INFO")
339  return false;
340  if (word == "DEBUG")
341  return false;
342  if (word == "placeholder")
343  return false;
344  if (word == "limit")
345  return false;
346  if (word == "reportEvery")
347  return false;
348  if (word == "timespan")
349  return false;
350  if (word == "noLineBreaks")
351  return false;
352  if (word == "lineLength")
353  return false;
354  if (word == "noTimeStamps")
355  return false;
356  if (word == "output")
357  return false;
358  if (word == "filename")
359  return false;
360  if (word == "extension")
361  return false;
362  if (word == "reset")
363  return false;
364  if (word == "optionalPSet")
365  return false;
366  return true;
367  } // keywordCheck

◆ lookForMatch()

bool edm::service::MessageServicePSetValidation::lookForMatch ( vString const &  v,
std::string const &  s 
)
private

Definition at line 453 of file MessageServicePSetValidation.cc.

453  {
454  vString::const_iterator begin = v.begin();
455  vString::const_iterator end = v.end();
456  return (std::find(begin, end, s) != end);
457  }

References begin, end, spr::find(), alignCSCRings::s, and findQualityFiles::v.

◆ messageLoggerPSet()

void edm::service::MessageServicePSetValidation::messageLoggerPSet ( ParameterSet const &  pset)
private

Definition at line 35 of file MessageServicePSetValidation.cc.

35  {
36  // Four types of material are allowed at the MessageLogger level:
37  // PSet lists (such as destinations or categories
38  // Suppression lists, such as SuppressInfo or debugModules
39  // General parameters, such as threshold or messageSummaryToJobReport
40  // Nested PSets, such as those for each destination
41 
42  // PSet lists
43 
44  psetLists(pset);
45 
46  // Suppression lists
47 
49 
50  // No other vstrings
51 
52  vStringsCheck(pset, "MessageLogger");
53 
54  // General Parameters
55 
56  check<bool>(pset, "MessageLogger", "messageSummaryToJobReport");
57  std::string dumps = check<std::string>(pset, "MessageLogger", "generate_preconfiguration_message");
58  std::string thresh = check<std::string>(pset, "MessageLogger", "threshold");
59  if (!thresh.empty())
60  validateThreshold(thresh, "MessageLogger");
61  check<unsigned int>(pset, "MessageLogger", "waiting_threshold");
62 
63  // Nested PSets
64 
69  categoryPSets(pset, "MessageLogger");
70 
71  // No other PSets -- unless they contain optionalPSet or placeholder=True
72 
74 
75  // Nothing else -- look for int, unsigned int, bool, float, double, string
76 
77  noneExcept<int>(pset, "MessageLogger", "int");
78  noneExcept<unsigned int>(pset, "MessageLogger", "unsigned int", "waiting_threshold");
79  noneExcept<bool>(pset, "MessageLogger", "bool", "messageSummaryToJobReport");
80  // Note - at this, the upper MessageLogger PSet level, the use of
81  // optionalPSet makes no sense, so we are OK letting that be a flaw
82  noneExcept<float>(pset, "MessageLogger", "float");
83  noneExcept<double>(pset, "MessageLogger", "double");
84  noneExcept<std::string>(pset, "MessageLogger", "string", "threshold", "generate_preconfiguration_message");
85 
86  // Append explanatory information if flaws were found
87 
88  if (!flaws.str().empty()) {
89  flaws << "\nThe above are from MessageLogger configuration validation.\n"
90  << "In most cases, these involve lines that the logger configuration code\n"
91  << "would not process, but which the cfg creator obviously meant to have "
92  << "effect.\n";
93  }
94 
95  } // messageLoggerPSet

References muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and GOODCOLL_filter_cfg::thresh.

◆ noBadParams()

void edm::service::MessageServicePSetValidation::noBadParams ( vString const &  v,
vString const &  params,
std::string const &  psetName,
std::string const &  parameterLabel,
std::string const &  type 
)
private

Definition at line 382 of file MessageServicePSetValidation.cc.

386  {
387  vString::const_iterator end1 = v.end();
388  vString::const_iterator end2 = params.end();
389  for (vString::const_iterator i = v.begin(); i != end1; ++i) {
390  for (vString::const_iterator j = params.begin(); j != end2; ++j) {
391  if (*i == *j) {
392  flaws << psetName << " PSet: \n"
393  << *i << " (listed in vstring " << parameterLabel << ")\n"
394  << "is used as a parameter of type " << type << " instead of as a PSet \n";
395  }
396  }
397  }
398 
399  } // noBadParams

References mps_fire::i, dqmiolumiharvest::j, CalibrationSummaryClient_cfi::params, and findQualityFiles::v.

Referenced by disallowedParam().

◆ noCoutCerrClash()

void edm::service::MessageServicePSetValidation::noCoutCerrClash ( vString const &  v,
std::string const &  psetName,
std::string const &  parameterLabel 
)
private

Definition at line 279 of file MessageServicePSetValidation.cc.

281  {
282  vString::const_iterator end = v.end();
283  bool coutPresent = false;
284  bool cerrPresent = false;
285  for (vString::const_iterator i = v.begin(); i != end; ++i) {
286  if (*i == "cout")
287  coutPresent = true;
288  if (*i == "cerr")
289  cerrPresent = true;
290  }
291  if (coutPresent && cerrPresent) {
292  flaws << psetName << " PSet: \n"
293  << "vString " << parameterLabel << " has both cout and cerr \n";
294  }
295  } // noCoutCerrClash(v)

References end, mps_fire::i, and findQualityFiles::v.

◆ noDuplicates() [1/2]

void edm::service::MessageServicePSetValidation::noDuplicates ( vString const &  v,
std::string const &  psetName,
std::string const &  parameterLabel 
)
private

Definition at line 248 of file MessageServicePSetValidation.cc.

250  {
251  vString::const_iterator end = v.end();
252  for (vString::const_iterator i = v.begin(); i != end; ++i) {
253  for (vString::const_iterator j = i + 1; j != end; ++j) {
254  if (*i == *j) {
255  flaws << psetName << " PSet: \n"
256  << "in vString " << parameterLabel << " duplication of the string " << *i << "\n";
257  }
258  }
259  }
260  } // noDuplicates(v)

References end, mps_fire::i, dqmiolumiharvest::j, and findQualityFiles::v.

◆ noDuplicates() [2/2]

void edm::service::MessageServicePSetValidation::noDuplicates ( vString const &  v1,
vString const &  v2,
std::string const &  psetName,
std::string const &  p1,
std::string const &  p2 
)
private

Definition at line 262 of file MessageServicePSetValidation.cc.

266  {
267  vString::const_iterator end1 = v1.end();
268  vString::const_iterator end2 = v2.end();
269  for (vString::const_iterator i = v1.begin(); i != end1; ++i) {
270  for (vString::const_iterator j = v2.begin(); j != end2; ++j) {
271  if (*i == *j) {
272  flaws << psetName << " PSet: \n"
273  << "in vStrings " << p1 << " and " << p2 << " duplication of the string " << *i << "\n";
274  }
275  }
276  }
277  } // noDuplicates(v1,v2)

References mps_fire::i, dqmiolumiharvest::j, p1, and p2.

◆ noKeywords()

void edm::service::MessageServicePSetValidation::noKeywords ( vString const &  v,
std::string const &  psetName,
std::string const &  parameterLabel 
)
private

Definition at line 297 of file MessageServicePSetValidation.cc.

299  {
300  vString::const_iterator end = v.end();
301  for (vString::const_iterator i = v.begin(); i != end; ++i) {
302  if (!keywordCheck(*i)) {
303  flaws << psetName << " PSet: \n"
304  << "vString " << parameterLabel << " should not contain the keyword " << *i << "\n";
305  }
306  }
307  } // noKeywords(v)

References end, mps_fire::i, and findQualityFiles::v.

◆ noneExcept() [1/4]

template<typename T >
void edm::service::MessageServicePSetValidation::noneExcept ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  type 
)
inlineprivate

Definition at line 133 of file MessageServicePSetValidation.h.

133  {
134  vString x = pset.template getParameterNamesForType<T>(false);
135  vString::const_iterator end = x.end();
136  for (vString::const_iterator i = x.begin(); i != end; ++i) {
137  flaws << psetName << " PSet: \n"
138  << (*i) << " is used as a " << type << "\n"
139  << "Usage of " << type << " is not recognized here\n";
140  }
141  x = pset.template getParameterNamesForType<T>(true);
142  end = x.end();
143  for (vString::const_iterator i = x.begin(); i != end; ++i) {
144  if ((*i) == "@service_type")
145  continue;
146  flaws << psetName << " PSet: \n"
147  << (*i) << " is used as a tracked " << type << "\n"
148  << "Tracked parameters not allowed here, "
149  << " and even untracked it would not be recognized\n";
150  }
151  } // noneExcept()

References end, flaws, mps_fire::i, and muonDTDigis_cfi::pset.

◆ noneExcept() [2/4]

template<typename T >
void edm::service::MessageServicePSetValidation::noneExcept ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  type,
std::string const &  ok 
)
inlineprivate

Definition at line 154 of file MessageServicePSetValidation.h.

157  {
158  vString x = pset.template getParameterNamesForType<T>(false);
159  vString::const_iterator end = x.end();
160  for (vString::const_iterator i = x.begin(); i != end; ++i) {
161  std::string val = (*i);
162  if (val != ok) {
163  flaws << psetName << " PSet: \n"
164  << val << " is used as a " << type << "\n"
165  << "This usage is not recognized in this type of PSet\n";
166  }
167  }
168  x = pset.template getParameterNamesForType<T>(true);
169  end = x.end();
170  for (vString::const_iterator i = x.begin(); i != end; ++i) {
171  if ((*i) == "@service_type")
172  continue;
173  flaws << psetName << " PSet: \n"
174  << (*i) << " is used as a tracked " << type << "\n"
175  << "Tracked parameters not allowed here\n";
176  }
177  } // noneExcept(okValue)

References end, flaws, mps_fire::i, convertSQLiteXML::ok, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

◆ noneExcept() [3/4]

template<typename T >
void edm::service::MessageServicePSetValidation::noneExcept ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  type,
T const &  ok1,
T const &  ok2 
)
inlineprivate

Definition at line 180 of file MessageServicePSetValidation.h.

181  {
182  vString x = pset.template getParameterNamesForType<T>(false);
183  vString::const_iterator end = x.end();
184  for (vString::const_iterator i = x.begin(); i != end; ++i) {
185  std::string val = (*i);
186  if ((val != ok1) && (val != ok2)) {
187  flaws << psetName << " PSet: \n"
188  << val << " is used as a " << type << "\n"
189  << "This usage is not recognized in this type of PSet\n";
190  }
191  }
192  x = pset.template getParameterNamesForType<T>(true);
193  end = x.end();
194  for (vString::const_iterator i = x.begin(); i != end; ++i) {
195  if ((*i) == "@service_type")
196  continue;
197  flaws << psetName << " PSet: \n"
198  << (*i) << " is used as a tracked " << type << "\n"
199  << "Tracked parameters not allowed here\n";
200  }
201  } // noneExcept(okValue1, okValue2)

References end, flaws, mps_fire::i, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

◆ noneExcept() [4/4]

template<typename T >
void edm::service::MessageServicePSetValidation::noneExcept ( ParameterSet const &  pset,
std::string const &  psetName,
std::string const &  type,
vString const &  vok 
)
inlineprivate

Definition at line 204 of file MessageServicePSetValidation.h.

207  {
208  vString x = pset.template getParameterNamesForType<T>(false);
209  vString::const_iterator end = x.end();
210  vString::const_iterator vend = vok.end();
211  for (vString::const_iterator i = x.begin(); i != end; ++i) {
212  bool found = false;
213  for (vString::const_iterator vit = vok.begin(); vit != vend; ++vit) {
214  if (*i == *vit)
215  found = true;
216  }
217  if (!found) {
218  flaws << psetName << " PSet: \n"
219  << *i << " is used as a " << type << "\n"
220  << "This usage is not recognized in this type of PSet\n";
221  }
222  }
223  x = pset.template getParameterNamesForType<T>(true);
224  end = x.end();
225  for (vString::const_iterator i = x.begin(); i != end; ++i) {
226  if ((*i) == "@service_type")
227  continue;
228  flaws << psetName << " PSet: \n"
229  << (*i) << " is used as a tracked " << type << "\n"
230  << "Tracked parameters not allowed here\n";
231  }
232  } // noneExcept(vok)

References end, flaws, newFWLiteAna::found, mps_fire::i, muonDTDigis_cfi::pset, and vend.

◆ noNoncategoryPsets()

void edm::service::MessageServicePSetValidation::noNoncategoryPsets ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 669 of file MessageServicePSetValidation.cc.

670  {
671  vString psnames;
672  pset.getParameterSetNames(psnames, false);
673  vString::const_iterator end = psnames.end();
674  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
675  if (lookForMatch(categories, *i))
676  continue;
677  if (lookForMatch(messageIDs, *i))
678  continue;
679  if ((*i) == "default")
680  continue;
681  if ((*i) == "ERROR")
682  continue;
683  if ((*i) == "WARNING")
684  continue;
685  if ((*i) == "INFO")
686  continue;
687  if ((*i) == "DEBUG")
688  continue;
689  ParameterSet empty_PSet;
690  bool ok_optionalPSet = false;
691  try {
692  ParameterSet const& culprit = pset.getUntrackedParameterSet((*i), empty_PSet);
693  ok_optionalPSet = culprit.getUntrackedParameter<bool>("placeholder", ok_optionalPSet);
694  ok_optionalPSet = culprit.getUntrackedParameter<bool>("optionalPSet", ok_optionalPSet);
695  } catch (cms::Exception& e) {
696  }
697  if (ok_optionalPSet)
698  continue;
699  flaws << psetName << " PSet: \n" << *i << " is an unrecognized name for a PSet in this context \n";
700  }
701  psnames.clear();
702  unsigned int n = pset.getParameterSetNames(psnames, true);
703  if (n > 0) {
704  end = psnames.end();
705  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
706  flaws << psetName << " PSet: \n"
707  << "PSet " << *i << " is tracked - not allowed\n";
708  }
709  }
710  } // noNoncategoryPsets

References myMessageLogger_cff::categories, MillePedeFileConverter_cfg::e, end, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, dqmiodumpmetadata::n, and muonDTDigis_cfi::pset.

◆ noNonPSetUsage()

void edm::service::MessageServicePSetValidation::noNonPSetUsage ( ParameterSet const &  pset,
vString const &  v,
std::string const &  psetName,
std::string const &  parameterLabel 
)
private

Definition at line 369 of file MessageServicePSetValidation.cc.

372  {
373  disallowedParam<int>(pset, v, psetName, parameterLabel, "int");
374  disallowedParam<unsigned int>(pset, v, psetName, parameterLabel, "uint");
375  disallowedParam<bool>(pset, v, psetName, parameterLabel, "bool");
376  disallowedParam<float>(pset, v, psetName, parameterLabel, "float");
377  disallowedParam<double>(pset, v, psetName, parameterLabel, "double");
378  disallowedParam<std::string>(pset, v, psetName, parameterLabel, "string");
379  disallowedParam<std::vector<std::string> >(pset, v, psetName, parameterLabel, "vstring");
380  } // noNonPSetUsage

References muonDTDigis_cfi::pset, and findQualityFiles::v.

◆ noOtherPsets()

void edm::service::MessageServicePSetValidation::noOtherPsets ( ParameterSet const &  pset)
private

Definition at line 410 of file MessageServicePSetValidation.cc.

410  {
411  vString psnames;
412  pset.getParameterSetNames(psnames, false);
413  vString::const_iterator end = psnames.end();
414  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
415  if (lookForMatch(destinations, *i))
416  continue;
417  if (lookForMatch(statistics, *i))
418  continue;
420  continue;
421  if (lookForMatch(categories, *i))
422  continue;
423  if (lookForMatch(messageIDs, *i))
424  continue;
425  if ((*i) == "default")
426  continue;
427  ParameterSet empty_PSet;
428  bool ok_optionalPSet = false;
429  try {
430  ParameterSet const& culprit = pset.getUntrackedParameterSet((*i), empty_PSet);
431  ok_optionalPSet = culprit.getUntrackedParameter<bool>("placeholder", ok_optionalPSet);
432  ok_optionalPSet = culprit.getUntrackedParameter<bool>("optionalPSet", ok_optionalPSet);
433  } catch (cms::Exception& e) {
434  }
435  if (ok_optionalPSet)
436  continue;
437  flaws << "MessageLogger "
438  << " PSet: \n"
439  << *i << " is an unrecognized name for a PSet\n";
440  }
441  psnames.clear();
442  unsigned int n = pset.getParameterSetNames(psnames, true);
443  if (n > 0) {
444  end = psnames.end();
445  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
446  flaws << "MessageLogger "
447  << " PSet: \n"
448  << "PSet " << *i << " is tracked - not allowed\n";
449  }
450  }
451  }

References myMessageLogger_cff::categories, myMessageLogger_cff::destinations, MillePedeFileConverter_cfg::e, end, MessageLogger_cfi::fwkJobReports, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, dqmiodumpmetadata::n, muonDTDigis_cfi::pset, and myMessageLogger_cff::statistics.

◆ operator()()

std::string edm::service::MessageServicePSetValidation::operator() ( ParameterSet const &  pset)

Definition at line 30 of file MessageServicePSetValidation.cc.

30  {
32  return flaws.str();
33  } // operator() to validate the PSet passed in

References muonDTDigis_cfi::pset.

◆ psetLists()

void edm::service::MessageServicePSetValidation::psetLists ( ParameterSet const &  pset)
private

Definition at line 97 of file MessageServicePSetValidation.cc.

97  {
98  destinations = check<vString>(pset, "MessageLogger", "destinations");
99  noDuplicates(destinations, "MessageLogger", "destinations");
100  noKeywords(destinations, "MessageLogger", "destinations");
101  noNonPSetUsage(pset, destinations, "MessageLogger", "destinations");
102  // REMOVED: noCoutCerrClash(destinations,"MessageLogger", "destinations");
103 
104  statistics = check<vString>(pset, "MessageLogger", "statistics");
105  noDuplicates(statistics, "MessageLogger", "statistics");
106  noKeywords(statistics, "MessageLogger", "statistics");
107  noNonPSetUsage(pset, statistics, "MessageLogger", "statistics");
108 
109  fwkJobReports = check<vString>(pset, "MessageLogger", "fwkJobReports");
110  noDuplicates(fwkJobReports, "MessageLogger", "fwkJobReports");
111  noKeywords(fwkJobReports, "MessageLogger", "fwkJobReports");
112  noNonPSetUsage(pset, fwkJobReports, "MessageLogger", "fwkJobReports");
113  noDuplicates(fwkJobReports, destinations, "MessageLogger", "fwkJobReports", "destinations");
114  noDuplicates(fwkJobReports, statistics, "MessageLogger", "fwkJobReports", "statistics");
115 
116  categories = check<vString>(pset, "MessageLogger", "categories");
117  noDuplicates(categories, "MessageLogger", "categories");
118  noKeywords(categories, "MessageLogger", "categories");
119  noNonPSetUsage(pset, categories, "MessageLogger", "categories");
120  noDuplicates(categories, destinations, "MessageLogger", "categories", "destinations");
121  noDuplicates(categories, statistics, "MessageLogger", "categories", "statistics");
122  noDuplicates(categories, fwkJobReports, "MessageLogger", "categories", "fwkJobReports");
123 
124  messageIDs = check<vString>(pset, "MessageLogger", "messageIDs");
125  noDuplicates(messageIDs, "MessageLogger", "messageIDs");
126  noKeywords(messageIDs, "MessageLogger", "messageIDs");
127  noNonPSetUsage(pset, messageIDs, "MessageLogger", "messageIDs");
128  noDuplicates(messageIDs, destinations, "MessageLogger", "messageIDs", "destinations");
129  noDuplicates(messageIDs, statistics, "MessageLogger", "messageIDs", "statistics");
130  noDuplicates(messageIDs, fwkJobReports, "MessageLogger", "messageIDs", "fwkJobReports");
131  noDuplicates(messageIDs, fwkJobReports, "MessageLogger", "messageIDs", "categories");
132 
133  } // psetLists

References myMessageLogger_cff::categories, myMessageLogger_cff::destinations, MessageLogger_cfi::fwkJobReports, muonDTDigis_cfi::pset, and myMessageLogger_cff::statistics.

◆ statisticsPSet()

void edm::service::MessageServicePSetValidation::statisticsPSet ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 576 of file MessageServicePSetValidation.cc.

577  {
578  // Category PSets
579 
580  categoryPSets(pset, psetName);
581 
582  // No other PSets -- unless they contain optionalPSet or placeholder=True
583 
584  noNoncategoryPsets(pset, psetName);
585 
586  // General parameters
587 
588  std::string thresh = check<std::string>(pset, "psetName", "threshold");
589  if (!thresh.empty())
590  validateThreshold(thresh, psetName);
591  check<bool>(pset, psetName, "placeholder");
592  check<bool>(pset, psetName, "reset");
593  std::string s = check<std::string>(pset, "psetName", "filename");
594  if ((s == "cerr") || (s == "cout")) {
595  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of filename \n";
596  }
597  s = check<std::string>(pset, "psetName", "extension");
598  if ((s == "cerr") || (s == "cout")) {
599  flaws << psetName << " PSet: \n" << s << " is not allowed as a value of extension \n";
600  }
601  s = check<std::string>(pset, "psetName", "output");
602 
603  // No other parameters
604 
605  noneExcept<int>(pset, psetName, "int");
606 
607  vString okbool;
608  okbool.push_back("placeholder");
609  okbool.push_back("optionalPSet");
610  okbool.push_back("reset");
611  noneExcept<bool>(pset, psetName, "bool", okbool);
612  vString okstring;
613  okstring.push_back("output");
614  okstring.push_back("filename");
615  okstring.push_back("extension");
616  okstring.push_back("threshold");
617  noneExcept<std::string>(pset, psetName, "string", okstring);
618 
619  } // statisticsPSet

References muonDTDigis_cfi::pset, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and GOODCOLL_filter_cfg::thresh.

◆ statisticsPSets()

void edm::service::MessageServicePSetValidation::statisticsPSets ( ParameterSet const &  pset)
private

Definition at line 565 of file MessageServicePSetValidation.cc.

565  {
566  ParameterSet empty_PSet;
567  std::vector<std::string>::const_iterator end = statistics.end();
568  for (std::vector<std::string>::const_iterator i = statistics.begin(); i != end; ++i) {
569  if (lookForMatch(destinations, *i))
570  continue;
571  ParameterSet const& d = pset.getUntrackedParameterSet(*i, empty_PSet);
572  statisticsPSet(d, *i);
573  }
574  } // statisticsPSets

References ztail::d, myMessageLogger_cff::destinations, end, mps_fire::i, muonDTDigis_cfi::pset, and myMessageLogger_cff::statistics.

◆ suppressionLists()

void edm::service::MessageServicePSetValidation::suppressionLists ( ParameterSet const &  pset)
private

Definition at line 135 of file MessageServicePSetValidation.cc.

135  {
136  debugModules = check<vString>(pset, "MessageLogger", "debugModules");
137  bool dmStar = wildcard(debugModules);
138  if (dmStar && debugModules.size() != 1) {
139  flaws << "MessageLogger"
140  << " PSet: \n"
141  << "debugModules contains wildcard character *"
142  << " and also " << debugModules.size() - 1 << " other entries - * must be alone\n";
143  }
144  suppressDebug = check<vString>(pset, "MessageLogger", "suppressDebug");
145  if ((!suppressDebug.empty()) && (!dmStar)) {
146  flaws << "MessageLogger"
147  << " PSet: \n"
148  << "suppressDebug contains modules, but debugModules is not *\n"
149  << "Unless all the debugModules are enabled,\n"
150  << "suppressing specific modules is meaningless\n";
151  }
152  if (wildcard(suppressDebug)) {
153  flaws << "MessageLogger"
154  << " PSet: \n"
155  << "Use of wildcard (*) in suppressDebug is not supported\n"
156  << "By default, LogDebug is suppressed for all modules\n";
157  }
158  suppressInfo = check<vString>(pset, "MessageLogger", "suppressInfo");
159  if (wildcard(suppressInfo)) {
160  flaws << "MessageLogger"
161  << " PSet: \n"
162  << "Use of wildcard (*) in suppressInfo is not supported\n";
163  }
164  suppressWarning = check<vString>(pset, "MessageLogger", "suppressWarning");
165  if (wildcard(suppressWarning)) {
166  flaws << "MessageLogger"
167  << " PSet: \n"
168  << "Use of wildcard (*) in suppressWarning is not supported\n";
169  }
170  suppressError = check<vString>(pset, "MessageLogger", "suppressError");
171  if (wildcard(suppressError)) {
172  flaws << "MessageLogger"
173  << " PSet: \n"
174  << "Use of wildcard (*) in suppressError is not supported\n";
175  }
176 
177  } // suppressionLists

References remoteMonitoring_LED_IterMethod_cfg::debugModules, muonDTDigis_cfi::pset, Log4cplus_cff::suppressDebug, MessageLogger_cfi::suppressError, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::suppressInfo, and Log4cplus_cff::suppressWarning.

◆ validateThreshold()

bool edm::service::MessageServicePSetValidation::validateThreshold ( std::string const &  thresh,
std::string const &  psetName 
)
private

Definition at line 227 of file MessageServicePSetValidation.cc.

228  {
229  if (checkThreshold(thresh))
230  return true;
231  flaws << psetName << " PSet: \n"
232  << "threshold has value " << thresh << " which is not among {DEBUG, INFO, WARNING, ERROR}\n";
233  return false;
234  } // validateThreshold

References GOODCOLL_filter_cfg::thresh.

◆ vStringsCheck()

void edm::service::MessageServicePSetValidation::vStringsCheck ( ParameterSet const &  pset,
std::string const &  psetName 
)
private

Definition at line 179 of file MessageServicePSetValidation.cc.

180  {
181  vString vStrings = pset.getParameterNamesForType<vString>(false);
182  vString::const_iterator end = vStrings.end();
183  for (vString::const_iterator i = vStrings.begin(); i != end; ++i) {
184  if (!allowedVstring(*i)) {
185  flaws << "MessageLogger"
186  << " PSet: \n"
187  << (*i) << " is used as a vstring, "
188  << "but no such vstring is recognized\n";
189  }
190  }
191  vStrings = pset.getParameterNamesForType<vString>(true);
192  end = vStrings.end();
193  for (vString::const_iterator i = vStrings.begin(); i != end; ++i) {
194  flaws << "MessageLogger"
195  << " PSet: \n"
196  << (*i) << " is used as a tracked vstring: "
197  << "tracked parameters not allowed here\n";
198  }
199  } // vStringsCheck

References end, mps_fire::i, and muonDTDigis_cfi::pset.

◆ wildcard()

bool edm::service::MessageServicePSetValidation::wildcard ( vString const &  v)
private

Definition at line 401 of file MessageServicePSetValidation.cc.

401  {
402  vString::const_iterator end = v.end();
403  for (vString::const_iterator i = v.begin(); i != end; ++i) {
404  if ((*i) == "*")
405  return true;
406  }
407  return false;
408  }

References end, mps_fire::i, and findQualityFiles::v.

Member Data Documentation

◆ categories

std::vector<std::string> edm::service::MessageServicePSetValidation::categories
private

Definition at line 261 of file MessageServicePSetValidation.h.

◆ debugModules

std::vector<std::string> edm::service::MessageServicePSetValidation::debugModules
private

Definition at line 263 of file MessageServicePSetValidation.h.

◆ destinations

std::vector<std::string> edm::service::MessageServicePSetValidation::destinations
private

Definition at line 258 of file MessageServicePSetValidation.h.

◆ flaws

std::ostringstream edm::service::MessageServicePSetValidation::flaws
private

Definition at line 257 of file MessageServicePSetValidation.h.

Referenced by catNone(), check(), and noneExcept().

◆ fwkJobReports

std::vector<std::string> edm::service::MessageServicePSetValidation::fwkJobReports
private

Definition at line 260 of file MessageServicePSetValidation.h.

◆ messageIDs

std::vector<std::string> edm::service::MessageServicePSetValidation::messageIDs
private

Definition at line 262 of file MessageServicePSetValidation.h.

◆ statistics

std::vector<std::string> edm::service::MessageServicePSetValidation::statistics
private

Definition at line 259 of file MessageServicePSetValidation.h.

◆ suppressDebug

std::vector<std::string> edm::service::MessageServicePSetValidation::suppressDebug
private

Definition at line 265 of file MessageServicePSetValidation.h.

◆ suppressError

std::vector<std::string> edm::service::MessageServicePSetValidation::suppressError
private

Definition at line 267 of file MessageServicePSetValidation.h.

◆ suppressInfo

std::vector<std::string> edm::service::MessageServicePSetValidation::suppressInfo
private

Definition at line 264 of file MessageServicePSetValidation.h.

◆ suppressWarning

std::vector<std::string> edm::service::MessageServicePSetValidation::suppressWarning
private

Definition at line 266 of file MessageServicePSetValidation.h.

vend
#define vend()
Definition: vmac.h:43
edm::service::MessageServicePSetValidation::catNoPSets
void catNoPSets(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
Definition: MessageServicePSetValidation.cc:773
edm::service::MessageServicePSetValidation::noBadParams
void noBadParams(vString const &v, vString const &params, std::string const &psetName, std::string const &parameterLabel, std::string const &type)
Definition: MessageServicePSetValidation.cc:382
mps_fire.i
i
Definition: mps_fire.py:355
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::service::MessageServicePSetValidation::suppressError
std::vector< std::string > suppressError
Definition: MessageServicePSetValidation.h:267
edm::service::MessageServicePSetValidation::noDuplicates
void noDuplicates(vString const &v, std::string const &psetName, std::string const &parameterLabel)
Definition: MessageServicePSetValidation.cc:248
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::service::MessageServicePSetValidation::noKeywords
void noKeywords(vString const &v, std::string const &psetName, std::string const &parameterLabel)
Definition: MessageServicePSetValidation.cc:297
edm::service::MessageServicePSetValidation::checkThreshold
bool checkThreshold(std::string const &thresh)
Definition: MessageServicePSetValidation.cc:236
edm::service::MessageServicePSetValidation::statisticsPSets
void statisticsPSets(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:565
edm::service::MessageServicePSetValidation::noOtherPsets
void noOtherPsets(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:410
edm::service::MessageServicePSetValidation::keywordCheck
bool keywordCheck(std::string const &word)
Definition: MessageServicePSetValidation.cc:309
edm::service::MessageServicePSetValidation::destinations
std::vector< std::string > destinations
Definition: MessageServicePSetValidation.h:258
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::service::MessageServicePSetValidation::catBoolRestriction
void catBoolRestriction(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
Definition: MessageServicePSetValidation.cc:797
edm::service::MessageServicePSetValidation::categories
std::vector< std::string > categories
Definition: MessageServicePSetValidation.h:261
findQualityFiles.v
v
Definition: findQualityFiles.py:179
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::service::MessageServicePSetValidation::destinationPSets
void destinationPSets(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:459
end
#define end
Definition: vmac.h:39
edm::service::MessageServicePSetValidation::defaultPSet
void defaultPSet(ParameterSet const &main_pset)
Definition: MessageServicePSetValidation.cc:516
edm::service::MessageServicePSetValidation::allowedVstring
bool allowedVstring(std::string const &s)
Definition: MessageServicePSetValidation.cc:201
edm::service::MessageServicePSetValidation::categoryPSet
void categoryPSet(ParameterSet const &pset, std::string const &OuterPsetName, std::string const &categoryName)
Definition: MessageServicePSetValidation.cc:728
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
edm::service::MessageServicePSetValidation::flaws
std::ostringstream flaws
Definition: MessageServicePSetValidation.h:257
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::service::MessageServicePSetValidation::messageLoggerPSet
void messageLoggerPSet(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:35
edm::service::MessageServicePSetValidation::psetLists
void psetLists(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:97
edm::service::MessageServicePSetValidation::fwkJobReportPSets
void fwkJobReportPSets(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:621
edm::service::MessageServicePSetValidation::validateThreshold
bool validateThreshold(std::string const &thresh, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:227
vertices_cff.x
x
Definition: vertices_cff.py:29
p2
double p2[4]
Definition: TauolaWrapper.h:90
edm::service::MessageServicePSetValidation::suppressionLists
void suppressionLists(ParameterSet const &pset)
Definition: MessageServicePSetValidation.cc:135
edm::service::MessageServicePSetValidation::noNoncategoryPsets
void noNoncategoryPsets(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:669
edm::service::MessageServicePSetValidation::debugModules
std::vector< std::string > debugModules
Definition: MessageServicePSetValidation.h:263
edm::service::MessageServicePSetValidation::messageIDs
std::vector< std::string > messageIDs
Definition: MessageServicePSetValidation.h:262
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::service::MessageServicePSetValidation::catInts
void catInts(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
Definition: MessageServicePSetValidation.cc:749
edm::ParameterSet
Definition: ParameterSet.h:36
edm::service::MessageServicePSetValidation::suppressInfo
std::vector< std::string > suppressInfo
Definition: MessageServicePSetValidation.h:264
p1
double p1[4]
Definition: TauolaWrapper.h:89
edm::service::MessageServicePSetValidation::lookForMatch
bool lookForMatch(vString const &v, std::string const &s)
Definition: MessageServicePSetValidation.cc:453
edm::service::MessageServicePSetValidation::vStringsCheck
void vStringsCheck(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:179
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
edm::service::MessageServicePSetValidation::statisticsPSet
void statisticsPSet(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:576
edm::service::MessageServicePSetValidation::categoryPSets
void categoryPSets(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:712
GOODCOLL_filter_cfg.thresh
thresh
Definition: GOODCOLL_filter_cfg.py:74
edm::service::MessageServicePSetValidation::suppressWarning
std::vector< std::string > suppressWarning
Definition: MessageServicePSetValidation.h:266
type
type
Definition: HCALResponse.h:21
heppy_batch.val
val
Definition: heppy_batch.py:351
edm::service::MessageServicePSetValidation::vString
std::vector< String > vString
Definition: MessageServicePSetValidation.h:48
T
long double T
Definition: Basic3DVectorLD.h:48
edm::service::MessageServicePSetValidation::wildcard
bool wildcard(vString const &v)
Definition: MessageServicePSetValidation.cc:401
edm::service::MessageServicePSetValidation::destinationPSet
void destinationPSet(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:468
ztail.d
d
Definition: ztail.py:151
edm::service::MessageServicePSetValidation::fwkJobReports
std::vector< std::string > fwkJobReports
Definition: MessageServicePSetValidation.h:260
cms::Exception
Definition: Exception.h:70
edm::service::MessageServicePSetValidation::suppressDebug
std::vector< std::string > suppressDebug
Definition: MessageServicePSetValidation.h:265
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::service::MessageServicePSetValidation::noNonPSetUsage
void noNonPSetUsage(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const &parameterLabel)
Definition: MessageServicePSetValidation.cc:369
edm::service::MessageServicePSetValidation::statistics
std::vector< std::string > statistics
Definition: MessageServicePSetValidation.h:259
begin
#define begin
Definition: vmac.h:32
edm::service::MessageServicePSetValidation::fwkJobReportPSet
void fwkJobReportPSet(ParameterSet const &pset, std::string const &psetName)
Definition: MessageServicePSetValidation.cc:630
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37