1 #ifndef FWCore_MessageService_MessageServicePSetValidation_h
2 #define FWCore_MessageService_MessageServicePSetValidation_h
97 if (!pset.
exists(parameterLabel))
99 if (pset.
existsAs<
T>(parameterLabel,
false)) {
103 if (pset.
existsAs<
T>(parameterLabel,
true)) {
104 flaws_ << psetName <<
" PSet: \n" << parameterLabel <<
" is declared as tracked - needs to be untracked \n";
107 flaws_ << psetName <<
" PSet: \n" << parameterLabel <<
" is declared with incorrect type \n";
111 flaws_ << psetName <<
" PSet: \n"
112 << parameterLabel <<
" is declared but causes an exception when processed: \n"
118 template <
typename T>
125 noBadParams(v, params, psetName, parameterLabel, type);
127 noBadParams(v, params, psetName, parameterLabel, type);
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) {
135 flaws_ << psetName <<
" PSet: \n"
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")
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";
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) {
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";
166 x = pset.template getParameterNamesForType<T>(
true);
168 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
169 if ((*
i) ==
"@service_type")
171 flaws_ << psetName <<
" PSet: \n"
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)) {
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";
190 x = pset.template getParameterNamesForType<T>(
true);
192 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
193 if ((*
i) ==
"@service_type")
195 flaws_ << psetName <<
" PSet: \n"
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) {
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";
221 x = pset.template getParameterNamesForType<T>(
true);
223 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
224 if ((*
i) ==
"@service_type")
226 flaws_ << psetName <<
" PSet: \n"
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)
T getUntrackedParameter(std::string const &, T const &) const
void statisticsPSet(ParameterSet const &pset, std::string const &psetName)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
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)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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 > getParameterNamesForType(bool trackiness=true) const
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)
char const * what() const noexceptoverride
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)
T getParameter(std::string const &) const
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)