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)
 
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 > statistics_
 
std::vector< std::string > suppressDebug_
 
std::vector< std::string > suppressError_
 
std::vector< std::string > suppressFwkInfo_
 
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 194 of file MessageServicePSetValidation.cc.

References alignCSCRings::s.

194  {
195  if (s == "destinations")
196  return true;
197  if (s == "statistics")
198  return true;
199  if (s == "destinations")
200  return true;
201  if (s == "categories")
202  return true;
203  if (s == "debugModules")
204  return true;
205  if (s == "suppressInfo")
206  return true;
207  if (s == "suppressFwkInfo")
208  return true;
209  if (s == "suppressDebug")
210  return true;
211  if (s == "suppressWarning")
212  return true;
213  if (s == "suppressError")
214  return true;
215  return false;
216  } // allowedVstring

◆ 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 755 of file MessageServicePSetValidation.cc.

References mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, and x.

758  {
759  vString x = pset.getParameterNamesForType<bool>(false);
760  vString::const_iterator end = x.end();
761  for (vString::const_iterator i = x.begin(); i != end; ++i) {
762  if (((*i) == "placeholder") || ((*i) == "optionalPSet"))
763  continue;
764  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
765  << (*i) << " is used as a " << type << "\n"
766  << "Usage of " << type << " is not recognized here\n";
767  }
768  x = pset.getParameterNamesForType<bool>(true);
769  end = x.end();
770  for (vString::const_iterator i = x.begin(); i != end; ++i) {
771  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
772  << (*i) << " is used as a tracked " << type << "\n"
773  << "Tracked parameters not allowed here, "
774  << " and even untracked it would not be recognized\n";
775  }
776  } // catBoolRestriction()
float x

◆ categoryPSet()

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

Definition at line 686 of file MessageServicePSetValidation.cc.

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

688  {
689  if (pset.existsAs<ParameterSet>(categoryName, true)) {
690  flaws_ << OuterPsetName << " PSet: \n"
691  << "Category PSet " << categoryName << " is tracked - not allowed\n";
692  return;
693  }
694  ParameterSet empty_PSet;
695  ParameterSet const& c = pset.getUntrackedParameterSet(categoryName, empty_PSet);
696  std::string const& psetName(OuterPsetName);
697  catInts(c, psetName, categoryName);
698  catNone<unsigned int>(c, psetName, categoryName, "unsigned int");
699  catBoolRestriction(c, psetName, categoryName, "bool");
700  catNone<float>(c, psetName, categoryName, "float");
701  catNone<double>(c, psetName, categoryName, "double");
702  catNone<std::string>(c, psetName, categoryName, "string");
703  catNone<vString>(c, psetName, categoryName, "vSting");
704  catNoPSets(c, psetName, categoryName);
705  } // categoryPSet
void catNoPSets(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
void catBoolRestriction(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
void catInts(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)

◆ categoryPSets()

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

Definition at line 669 of file MessageServicePSetValidation.cc.

References mps_fire::i, muonDTDigis_cfi::pset, and crabTemplate::psetName.

670  {
671  categoryPSet(pset, psetName, "ERROR");
672  categoryPSet(pset, psetName, "WARNING");
673  categoryPSet(pset, psetName, "FWKINFO");
674  categoryPSet(pset, psetName, "INFO");
675  categoryPSet(pset, psetName, "DEBUG");
676  if (psetName != "MessageLogger")
677  categoryPSet(pset, psetName, "default");
678  // The above conditional is because default in the main level is treated
679  // as a set of defaults differnt from those of a simple category.
680  std::vector<std::string>::const_iterator end = categories_.end();
681  for (std::vector<std::string>::const_iterator i = categories_.begin(); i != end; ++i) {
683  }
684  } // categoryPSets
void categoryPSet(ParameterSet const &pset, std::string const &OuterPsetName, std::string const &categoryName)

◆ catInts()

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

Definition at line 707 of file MessageServicePSetValidation.cc.

References mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, and x.

709  {
710  vString x = pset.getParameterNamesForType<int>(false);
711  vString::const_iterator end = x.end();
712  for (vString::const_iterator i = x.begin(); i != end; ++i) {
713  if (*i == "limit")
714  continue;
715  if (*i == "reportEvery")
716  continue;
717  if (*i == "timespan")
718  continue;
719  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
720  << (*i) << " is not an allowed parameter within a category PSet \n";
721  }
722  x = pset.getParameterNamesForType<int>(true);
723  end = x.end();
724  for (vString::const_iterator i = x.begin(); i != end; ++i) {
725  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
726  << (*i) << " is used as a tracked int \n"
727  << "Tracked parameters not allowed here \n";
728  }
729  } // catInts()
float x

◆ 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 233 of file MessageServicePSetValidation.h.

References flaws_, mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, and x.

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

◆ catNoPSets()

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

Definition at line 731 of file MessageServicePSetValidation.cc.

References mps_fire::i, dqmiodumpmetadata::n, muonDTDigis_cfi::pset, and crabTemplate::psetName.

733  {
734  vString psnames;
735  pset.getParameterSetNames(psnames, false);
736  vString::const_iterator end = psnames.end();
737  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
738  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
739  << *i << " is used as a PSet\n"
740  << "PSets not allowed within a category PSet\n";
741  }
742  psnames.clear();
743  unsigned int n = pset.getParameterSetNames(psnames, true);
744  if (n > 0) {
745  end = psnames.end();
746  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
747  flaws_ << categoryName << " category PSet nested in " << psetName << " PSet: \n"
748  << *i << " is used as a tracked PSet\n"
749  << "tracked parameters not permitted, and "
750  << "PSets not allowed within a category PSet\n";
751  }
752  }
753  } // catNoPSets

◆ check()

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

Definition at line 94 of file MessageServicePSetValidation.h.

References MillePedeFileConverter_cfg::e, flaws_, muonDTDigis_cfi::pset, crabTemplate::psetName, and heppy_batch::val.

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

◆ checkThreshold()

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

Definition at line 227 of file MessageServicePSetValidation.cc.

References DMR_cfg::thresh.

227  {
228  if (thresh == "WARNING")
229  return true;
230  if (thresh == "INFO")
231  return true;
232  if (thresh == "FWKINFO")
233  return true;
234  if (thresh == "ERROR")
235  return true;
236  if (thresh == "DEBUG")
237  return true;
238  return false;
239  }

◆ defaultPSet()

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

Definition at line 521 of file MessageServicePSetValidation.cc.

References edm::ParameterSet::getUntrackedParameterSet(), muonDTDigis_cfi::pset, crabTemplate::psetName, AlCaHLTBitMon_QueryRunRegistry::string, and DMR_cfg::thresh.

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

◆ destinationPSet()

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

Definition at line 463 of file MessageServicePSetValidation.cc.

References muonDTDigis_cfi::pset, crabTemplate::psetName, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and DMR_cfg::thresh.

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

◆ destinationPSets()

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

Definition at line 454 of file MessageServicePSetValidation.cc.

References ztail::d, mps_fire::i, and muonDTDigis_cfi::pset.

454  {
455  ParameterSet empty_PSet;
456  std::vector<std::string>::const_iterator end = destinations_.end();
457  for (std::vector<std::string>::const_iterator i = destinations_.begin(); i != end; ++i) {
458  ParameterSet const& d = pset.getUntrackedParameterSet(*i, empty_PSet);
459  destinationPSet(d, *i);
460  }
461  } // destinationPSets
void destinationPSet(ParameterSet const &pset, std::string const &psetName)
d
Definition: ztail.py:151

◆ 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 119 of file MessageServicePSetValidation.h.

References noBadParams(), submitPVValidationJobs::params, muonDTDigis_cfi::pset, crabTemplate::psetName, and findQualityFiles::v.

123  {
124  vString params = pset.getParameterNamesForType<T>(true);
125  noBadParams(v, params, psetName, parameterLabel, type);
126  params = pset.getParameterNamesForType<T>(false);
127  noBadParams(v, params, psetName, parameterLabel, type);
128  } // disallowedParam()
void noBadParams(vString const &v, vString const &params, std::string const &psetName, std::string const &parameterLabel, std::string const &type)
long double T

◆ keywordCheck()

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

Definition at line 302 of file MessageServicePSetValidation.cc.

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

◆ lookForMatch()

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

Definition at line 448 of file MessageServicePSetValidation.cc.

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

448  {
449  vString::const_iterator begin = v.begin();
450  vString::const_iterator end = v.end();
451  return (std::find(begin, end, s) != end);
452  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19

◆ messageLoggerPSet()

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

Definition at line 33 of file MessageServicePSetValidation.cc.

References or, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and DMR_cfg::thresh.

33  {
34  // See if new config API is being used
35  if (pset.exists("files") or
36  (not(pset.exists("destinations") or pset.existsAs<std::vector<std::string>>("statistics", true) or
37  pset.existsAs<std::vector<std::string>>("statistics", false) or pset.exists("categories")))) {
38  return;
39  }
40 
41  // Four types of material are allowed at the MessageLogger level:
42  // PSet lists (such as destinations or categories
43  // Suppression lists, such as SuppressInfo or debugModules
44  // General parameters, such as threshold or messageSummaryToJobReport
45  // Nested PSets, such as those for each destination
46 
47  // PSet lists
48 
49  psetLists(pset);
50 
51  // Suppression lists
52 
54 
55  // No other vstrings
56 
57  vStringsCheck(pset, "MessageLogger");
58 
59  // General Parameters
60 
61  check<bool>(pset, "MessageLogger", "messageSummaryToJobReport");
62  std::string dumps = check<std::string>(pset, "MessageLogger", "generate_preconfiguration_message");
63  std::string thresh = check<std::string>(pset, "MessageLogger", "threshold");
64  if (!thresh.empty())
65  validateThreshold(thresh, "MessageLogger");
66  check<unsigned int>(pset, "MessageLogger", "waiting_threshold");
67 
68  // Nested PSets
69 
73  categoryPSets(pset, "MessageLogger");
74 
75  // No other PSets -- unless they contain optionalPSet or placeholder=True
76 
78 
79  // Nothing else -- look for int, unsigned int, bool, float, double, string
80 
81  noneExcept<int>(pset, "MessageLogger", "int");
82  noneExcept<unsigned int>(pset, "MessageLogger", "unsigned int", "waiting_threshold");
83  noneExcept<bool>(pset, "MessageLogger", "bool", "messageSummaryToJobReport");
84  // Note - at this, the upper MessageLogger PSet level, the use of
85  // optionalPSet makes no sense, so we are OK letting that be a flaw
86  noneExcept<float>(pset, "MessageLogger", "float");
87  noneExcept<double>(pset, "MessageLogger", "double");
88  noneExcept<std::string>(pset, "MessageLogger", "string", "threshold", "generate_preconfiguration_message");
89 
90  // Append explanatory information if flaws were found
91 
92  if (!flaws_.str().empty()) {
93  flaws_ << "\nThe above are from MessageLogger configuration validation.\n"
94  << "In most cases, these involve lines that the logger configuration code\n"
95  << "would not process, but which the cfg creator obviously meant to have "
96  << "effect.\n";
97  }
98 
99  } // messageLoggerPSet
void categoryPSets(ParameterSet const &pset, std::string const &psetName)
void vStringsCheck(ParameterSet const &pset, std::string const &psetName)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool validateThreshold(std::string const &thresh, std::string const &psetName)

◆ 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 381 of file MessageServicePSetValidation.cc.

References mps_fire::i, dqmiolumiharvest::j, submitPVValidationJobs::params, crabTemplate::psetName, and findQualityFiles::v.

Referenced by disallowedParam().

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

◆ noCoutCerrClash()

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

Definition at line 272 of file MessageServicePSetValidation.cc.

References mps_fire::i, crabTemplate::psetName, and findQualityFiles::v.

274  {
275  vString::const_iterator end = v.end();
276  bool coutPresent = false;
277  bool cerrPresent = false;
278  for (vString::const_iterator i = v.begin(); i != end; ++i) {
279  if (*i == "cout")
280  coutPresent = true;
281  if (*i == "cerr")
282  cerrPresent = true;
283  }
284  if (coutPresent && cerrPresent) {
285  flaws_ << psetName << " PSet: \n"
286  << "vString " << parameterLabel << " has both cout and cerr \n";
287  }
288  } // noCoutCerrClash(v)

◆ noDuplicates() [1/2]

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

Definition at line 241 of file MessageServicePSetValidation.cc.

References mps_fire::i, dqmiolumiharvest::j, crabTemplate::psetName, and findQualityFiles::v.

243  {
244  vString::const_iterator end = v.end();
245  for (vString::const_iterator i = v.begin(); i != end; ++i) {
246  for (vString::const_iterator j = i + 1; j != end; ++j) {
247  if (*i == *j) {
248  flaws_ << psetName << " PSet: \n"
249  << "in vString " << parameterLabel << " duplication of the string " << *i << "\n";
250  }
251  }
252  }
253  } // noDuplicates(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 255 of file MessageServicePSetValidation.cc.

References mps_fire::i, dqmiolumiharvest::j, LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, and crabTemplate::psetName.

259  {
260  vString::const_iterator end1 = v1.end();
261  vString::const_iterator end2 = v2.end();
262  for (vString::const_iterator i = v1.begin(); i != end1; ++i) {
263  for (vString::const_iterator j = v2.begin(); j != end2; ++j) {
264  if (*i == *j) {
265  flaws_ << psetName << " PSet: \n"
266  << "in vStrings " << p1 << " and " << p2 << " duplication of the string " << *i << "\n";
267  }
268  }
269  }
270  } // noDuplicates(v1,v2)

◆ noKeywords()

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

Definition at line 290 of file MessageServicePSetValidation.cc.

References mps_fire::i, crabTemplate::psetName, and findQualityFiles::v.

292  {
293  vString::const_iterator end = v.end();
294  for (vString::const_iterator i = v.begin(); i != end; ++i) {
295  if (!keywordCheck(*i)) {
296  flaws_ << psetName << " PSet: \n"
297  << "vString " << parameterLabel << " should not contain the keyword " << *i << "\n";
298  }
299  }
300  } // noKeywords(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 131 of file MessageServicePSetValidation.h.

References flaws_, mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, and x.

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

◆ 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 152 of file MessageServicePSetValidation.h.

References flaws_, mps_fire::i, convertSQLiteXML::ok, muonDTDigis_cfi::pset, crabTemplate::psetName, AlCaHLTBitMon_QueryRunRegistry::string, heppy_batch::val, and x.

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

◆ 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 178 of file MessageServicePSetValidation.h.

References flaws_, mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, AlCaHLTBitMon_QueryRunRegistry::string, heppy_batch::val, and x.

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

◆ 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 202 of file MessageServicePSetValidation.h.

References flaws_, newFWLiteAna::found, mps_fire::i, muonDTDigis_cfi::pset, crabTemplate::psetName, and x.

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

◆ noNoncategoryPsets()

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

Definition at line 626 of file MessageServicePSetValidation.cc.

References MillePedeFileConverter_cfg::e, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, dqmiodumpmetadata::n, muonDTDigis_cfi::pset, and crabTemplate::psetName.

627  {
628  vString psnames;
629  pset.getParameterSetNames(psnames, false);
630  vString::const_iterator end = psnames.end();
631  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
632  if (lookForMatch(categories_, *i))
633  continue;
634  if ((*i) == "default")
635  continue;
636  if ((*i) == "ERROR")
637  continue;
638  if ((*i) == "WARNING")
639  continue;
640  if ((*i) == "FWKINFO")
641  continue;
642  if ((*i) == "INFO")
643  continue;
644  if ((*i) == "DEBUG")
645  continue;
646  ParameterSet empty_PSet;
647  bool ok_optionalPSet = false;
648  try {
649  ParameterSet const& culprit = pset.getUntrackedParameterSet((*i), empty_PSet);
650  ok_optionalPSet = culprit.getUntrackedParameter<bool>("placeholder", ok_optionalPSet);
651  ok_optionalPSet = culprit.getUntrackedParameter<bool>("optionalPSet", ok_optionalPSet);
652  } catch (cms::Exception& e) {
653  }
654  if (ok_optionalPSet)
655  continue;
656  flaws_ << psetName << " PSet: \n" << *i << " is an unrecognized name for a PSet in this context \n";
657  }
658  psnames.clear();
659  unsigned int n = pset.getParameterSetNames(psnames, true);
660  if (n > 0) {
661  end = psnames.end();
662  for (vString::const_iterator i = psnames.begin(); i != end; ++i) {
663  flaws_ << psetName << " PSet: \n"
664  << "PSet " << *i << " is tracked - not allowed\n";
665  }
666  }
667  } // noNoncategoryPsets
bool lookForMatch(vString const &v, std::string const &s)
T getUntrackedParameter(std::string const &, T const &) const

◆ noNonPSetUsage()

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

Definition at line 368 of file MessageServicePSetValidation.cc.

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

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

◆ noOtherPsets()

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

Definition at line 409 of file MessageServicePSetValidation.cc.

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

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

◆ operator()()

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

Definition at line 28 of file MessageServicePSetValidation.cc.

References muonDTDigis_cfi::pset.

28  {
30  return flaws_.str();
31  } // operator() to validate the PSet passed in

◆ psetLists()

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

Definition at line 101 of file MessageServicePSetValidation.cc.

References muonDTDigis_cfi::pset.

101  {
102  destinations_ = check<vString>(pset, "MessageLogger", "destinations");
103  noDuplicates(destinations_, "MessageLogger", "destinations");
104  noKeywords(destinations_, "MessageLogger", "destinations");
105  noNonPSetUsage(pset, destinations_, "MessageLogger", "destinations");
106  // REMOVED: noCoutCerrClash(destinations_,"MessageLogger", "destinations");
107 
108  statistics_ = check<vString>(pset, "MessageLogger", "statistics");
109  noDuplicates(statistics_, "MessageLogger", "statistics");
110  noKeywords(statistics_, "MessageLogger", "statistics");
111  noNonPSetUsage(pset, statistics_, "MessageLogger", "statistics");
112 
113  categories_ = check<vString>(pset, "MessageLogger", "categories");
114  noDuplicates(categories_, "MessageLogger", "categories");
115  noKeywords(categories_, "MessageLogger", "categories");
116  noNonPSetUsage(pset, categories_, "MessageLogger", "categories");
117  noDuplicates(categories_, destinations_, "MessageLogger", "categories", "destinations");
118  noDuplicates(categories_, statistics_, "MessageLogger", "categories", "statistics");
119 
120  } // psetLists
void noKeywords(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 noNonPSetUsage(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const &parameterLabel)

◆ statisticsPSet()

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

Definition at line 581 of file MessageServicePSetValidation.cc.

References muonDTDigis_cfi::pset, crabTemplate::psetName, alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, and DMR_cfg::thresh.

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

◆ statisticsPSets()

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

Definition at line 570 of file MessageServicePSetValidation.cc.

References ztail::d, mps_fire::i, and muonDTDigis_cfi::pset.

570  {
571  ParameterSet empty_PSet;
572  std::vector<std::string>::const_iterator end = statistics_.end();
573  for (std::vector<std::string>::const_iterator i = statistics_.begin(); i != end; ++i) {
575  continue;
576  ParameterSet const& d = pset.getUntrackedParameterSet(*i, empty_PSet);
577  statisticsPSet(d, *i);
578  }
579  } // statisticsPSets
void statisticsPSet(ParameterSet const &pset, std::string const &psetName)
bool lookForMatch(vString const &v, std::string const &s)
d
Definition: ztail.py:151

◆ suppressionLists()

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

Definition at line 122 of file MessageServicePSetValidation.cc.

References muonDTDigis_cfi::pset.

122  {
123  debugModules_ = check<vString>(pset, "MessageLogger", "debugModules");
124  bool dmStar = wildcard(debugModules_);
125  if (dmStar && debugModules_.size() != 1) {
126  flaws_ << "MessageLogger"
127  << " PSet: \n"
128  << "debugModules contains wildcard character *"
129  << " and also " << debugModules_.size() - 1 << " other entries - * must be alone\n";
130  }
131  suppressDebug_ = check<vString>(pset, "MessageLogger", "suppressDebug");
132  if ((!suppressDebug_.empty()) && (!dmStar)) {
133  flaws_ << "MessageLogger"
134  << " PSet: \n"
135  << "suppressDebug contains modules, but debugModules is not *\n"
136  << "Unless all the debugModules are enabled,\n"
137  << "suppressing specific modules is meaningless\n";
138  }
139  if (wildcard(suppressDebug_)) {
140  flaws_ << "MessageLogger"
141  << " PSet: \n"
142  << "Use of wildcard (*) in suppressDebug is not supported\n"
143  << "By default, LogDebug is suppressed for all modules\n";
144  }
145  suppressInfo_ = check<vString>(pset, "MessageLogger", "suppressInfo");
146  if (wildcard(suppressInfo_)) {
147  flaws_ << "MessageLogger"
148  << " PSet: \n"
149  << "Use of wildcard (*) in suppressInfo is not supported\n";
150  }
151  suppressFwkInfo_ = check<vString>(pset, "MessageLogger", "suppressFwkInfo");
152  if (wildcard(suppressFwkInfo_)) {
153  flaws_ << "MessageLogger"
154  << " PSet: \n"
155  << "Use of wildcard (*) in suppressFwkInfo is not supported\n";
156  }
157  suppressWarning_ = check<vString>(pset, "MessageLogger", "suppressWarning");
158  if (wildcard(suppressWarning_)) {
159  flaws_ << "MessageLogger"
160  << " PSet: \n"
161  << "Use of wildcard (*) in suppressWarning is not supported\n";
162  }
163  suppressError_ = check<vString>(pset, "MessageLogger", "suppressError");
164  if (wildcard(suppressError_)) {
165  flaws_ << "MessageLogger"
166  << " PSet: \n"
167  << "Use of wildcard (*) in suppressError is not supported\n";
168  }
169 
170  } // suppressionLists

◆ validateThreshold()

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

Definition at line 218 of file MessageServicePSetValidation.cc.

References crabTemplate::psetName, and DMR_cfg::thresh.

219  {
220  if (checkThreshold(thresh))
221  return true;
222  flaws_ << psetName << " PSet: \n"
223  << "threshold has value " << thresh << " which is not among {DEBUG, INFO, FWKINFO, WARNING, ERROR}\n";
224  return false;
225  } // validateThreshold

◆ vStringsCheck()

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

Definition at line 172 of file MessageServicePSetValidation.cc.

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

173  {
174  vString vStrings = pset.getParameterNamesForType<vString>(false);
175  vString::const_iterator end = vStrings.end();
176  for (vString::const_iterator i = vStrings.begin(); i != end; ++i) {
177  if (!allowedVstring(*i)) {
178  flaws_ << "MessageLogger"
179  << " PSet: \n"
180  << (*i) << " is used as a vstring, "
181  << "but no such vstring is recognized\n";
182  }
183  }
184  vStrings = pset.getParameterNamesForType<vString>(true);
185  end = vStrings.end();
186  for (vString::const_iterator i = vStrings.begin(); i != end; ++i) {
187  flaws_ << "MessageLogger"
188  << " PSet: \n"
189  << (*i) << " is used as a tracked vstring: "
190  << "tracked parameters not allowed here\n";
191  }
192  } // vStringsCheck

◆ wildcard()

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

Definition at line 400 of file MessageServicePSetValidation.cc.

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

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

Member Data Documentation

◆ categories_

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

Definition at line 258 of file MessageServicePSetValidation.h.

◆ debugModules_

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

Definition at line 259 of file MessageServicePSetValidation.h.

◆ destinations_

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

Definition at line 256 of file MessageServicePSetValidation.h.

◆ flaws_

std::ostringstream edm::service::MessageServicePSetValidation::flaws_
private

Definition at line 255 of file MessageServicePSetValidation.h.

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

◆ statistics_

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

Definition at line 257 of file MessageServicePSetValidation.h.

◆ suppressDebug_

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

Definition at line 262 of file MessageServicePSetValidation.h.

◆ suppressError_

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

Definition at line 264 of file MessageServicePSetValidation.h.

◆ suppressFwkInfo_

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

Definition at line 261 of file MessageServicePSetValidation.h.

◆ suppressInfo_

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

Definition at line 260 of file MessageServicePSetValidation.h.

◆ suppressWarning_

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

Definition at line 263 of file MessageServicePSetValidation.h.