1 #ifndef FWCore_MessageService_MessageServicePSetValidation_h 2 #define FWCore_MessageService_MessageServicePSetValidation_h 97 if (!
pset.exists(parameterLabel))
99 if (
pset.existsAs<
T>(parameterLabel,
false)) {
100 val =
pset.getUntrackedParameter<
T>(parameterLabel,
val);
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);
107 flaws_ <<
psetName <<
" PSet: \n" << parameterLabel <<
" is declared with incorrect type \n";
112 << parameterLabel <<
" is declared but causes an exception when processed: \n" 118 template <
typename T>
130 template <
typename T>
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) {
136 << (*i) <<
" is used as a " <<
type <<
"\n" 137 <<
"Usage of " <<
type <<
" is not recognized here\n";
139 x =
pset.template getParameterNamesForType<T>(
true);
141 for (vString::const_iterator
i =
x.begin();
i !=
end; ++
i) {
142 if ((*
i) ==
"@service_type")
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";
151 template <
typename T>
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) {
162 <<
val <<
" is used as a " <<
type <<
"\n" 163 <<
"This usage is not recognized in this type of PSet\n";
166 x =
pset.template getParameterNamesForType<T>(
true);
168 for (vString::const_iterator
i =
x.begin();
i !=
end; ++
i) {
169 if ((*
i) ==
"@service_type")
172 << (*i) <<
" is used as a tracked " <<
type <<
"\n" 173 <<
"Tracked parameters not allowed here\n";
177 template <
typename T>
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) {
184 if ((
val != ok1) && (
val != ok2)) {
186 <<
val <<
" is used as a " <<
type <<
"\n" 187 <<
"This usage is not recognized in this type of PSet\n";
190 x =
pset.template getParameterNamesForType<T>(
true);
192 for (vString::const_iterator
i =
x.begin();
i !=
end; ++
i) {
193 if ((*
i) ==
"@service_type")
196 << (*i) <<
" is used as a tracked " <<
type <<
"\n" 197 <<
"Tracked parameters not allowed here\n";
201 template <
typename T>
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) {
211 for (vString::const_iterator vit = vok.begin(); vit != vend; ++vit) {
217 << *
i <<
" is used as a " <<
type <<
"\n" 218 <<
"This usage is not recognized in this type of PSet\n";
221 x =
pset.template getParameterNamesForType<T>(
true);
223 for (vString::const_iterator
i =
x.begin();
i !=
end; ++
i) {
224 if ((*
i) ==
"@service_type")
227 << (*i) <<
" is used as a tracked " <<
type <<
"\n" 228 <<
"Tracked parameters not allowed here\n";
232 template <
typename T>
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";
244 x =
pset.template getParameterNamesForType<T>(
true);
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";
272 #endif // FWCore_MessageService_MessageServicePSetValidation_h
void psetLists(ParameterSet const &pset)
void statisticsPSet(ParameterSet const &pset, std::string const &psetName)
bool lookForMatch(vString const &v, std::string const &s)
void categoryPSets(ParameterSet const &pset, std::string const &psetName)
std::vector< std::string > suppressInfo_
bool wildcard(vString const &v)
void destinationPSet(ParameterSet const &pset, std::string const &psetName)
void disallowedParam(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const ¶meterLabel, std::string const &type)
void vStringsCheck(ParameterSet const &pset, std::string const &psetName)
std::vector< std::string > debugModules_
std::vector< String > vString
void noCoutCerrClash(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, std::string const &ok)
std::vector< std::string > suppressDebug_
std::vector< std::string > categories_
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, vString const &vok)
std::vector< std::string > statistics_
T check(ParameterSet const &pset, std::string const &psetName, std::string const ¶meterLabel)
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, T const &ok1, T const &ok2)
void noKeywords(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
void catNone(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type)
void noDuplicates(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
std::vector< std::string > suppressWarning_
void catNoPSets(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
bool keywordCheck(std::string const &word)
void noBadParams(vString const &v, vString const ¶ms, std::string const &psetName, std::string const ¶meterLabel, std::string const &type)
void noNonPSetUsage(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const ¶meterLabel)
void destinationPSets(ParameterSet const &pset)
void noOtherPsets(ParameterSet const &pset)
bool checkThreshold(std::string const &thresh)
std::string operator()(ParameterSet const &pset)
bool validateThreshold(std::string const &thresh, std::string const &psetName)
bool allowedVstring(std::string const &s)
std::vector< std::string > suppressFwkInfo_
void noNoncategoryPsets(ParameterSet const &pset, std::string const &psetName)
void catBoolRestriction(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
void statisticsPSets(ParameterSet const &pset)
void categoryPSet(ParameterSet const &pset, std::string const &OuterPsetName, std::string const &categoryName)
std::vector< std::string > destinations_
std::vector< std::string > suppressError_
void catInts(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
void messageLoggerPSet(ParameterSet const &pset)
void defaultPSet(ParameterSet const &main_pset)
std::ostringstream flaws_
void suppressionLists(ParameterSet const &pset)