|
|
Go to the documentation of this file. 1 #ifndef FWCore_MessageService_MessageServicePSetValidation_h
2 #define FWCore_MessageService_MessageServicePSetValidation_h
99 if (!
pset.exists(parameterLabel))
101 if (
pset.existsAs<
T>(parameterLabel,
false)) {
102 val =
pset.getUntrackedParameter<
T>(parameterLabel,
val);
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);
109 flaws << psetName <<
" PSet: \n" << parameterLabel <<
" is declared with incorrect type \n";
113 flaws << psetName <<
" PSet: \n"
114 << parameterLabel <<
" is declared but causes an exception when processed: \n"
120 template <
typename T>
132 template <
typename T>
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";
141 x =
pset.template getParameterNamesForType<T>(
true);
143 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
144 if ((*
i) ==
"@service_type")
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";
153 template <
typename T>
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) {
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";
168 x =
pset.template getParameterNamesForType<T>(
true);
170 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
171 if ((*
i) ==
"@service_type")
173 flaws << psetName <<
" PSet: \n"
174 << (*i) <<
" is used as a tracked " <<
type <<
"\n"
175 <<
"Tracked parameters not allowed here\n";
179 template <
typename T>
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) {
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";
192 x =
pset.template getParameterNamesForType<T>(
true);
194 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
195 if ((*
i) ==
"@service_type")
197 flaws << psetName <<
" PSet: \n"
198 << (*i) <<
" is used as a tracked " <<
type <<
"\n"
199 <<
"Tracked parameters not allowed here\n";
203 template <
typename T>
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) {
213 for (vString::const_iterator vit = vok.begin(); vit !=
vend; ++vit) {
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";
223 x =
pset.template getParameterNamesForType<T>(
true);
225 for (vString::const_iterator
i = x.begin();
i !=
end; ++
i) {
226 if ((*
i) ==
"@service_type")
228 flaws << psetName <<
" PSet: \n"
229 << (*i) <<
" is used as a tracked " <<
type <<
"\n"
230 <<
"Tracked parameters not allowed here\n";
234 template <
typename T>
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";
246 x =
pset.template getParameterNamesForType<T>(
true);
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";
275 #endif // FWCore_MessageService_MessageServicePSetValidation_h
void catNoPSets(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
void noBadParams(vString const &v, vString const ¶ms, std::string const &psetName, std::string const ¶meterLabel, std::string const &type)
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, vString const &vok)
std::vector< std::string > suppressError
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)
void noKeywords(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
bool checkThreshold(std::string const &thresh)
void catNone(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
void statisticsPSets(ParameterSet const &pset)
void noOtherPsets(ParameterSet const &pset)
bool keywordCheck(std::string const &word)
std::vector< std::string > destinations
void catBoolRestriction(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
std::string operator()(ParameterSet const &pset)
std::vector< std::string > categories
void destinationPSets(ParameterSet const &pset)
void defaultPSet(ParameterSet const &main_pset)
bool allowedVstring(std::string const &s)
void categoryPSet(ParameterSet const &pset, std::string const &OuterPsetName, std::string const &categoryName)
void messageLoggerPSet(ParameterSet const &pset)
void psetLists(ParameterSet const &pset)
void fwkJobReportPSets(ParameterSet const &pset)
bool validateThreshold(std::string const &thresh, std::string const &psetName)
void suppressionLists(ParameterSet const &pset)
void noNoncategoryPsets(ParameterSet const &pset, std::string const &psetName)
std::vector< std::string > debugModules
std::vector< std::string > messageIDs
void catInts(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
std::vector< std::string > suppressInfo
bool lookForMatch(vString const &v, std::string const &s)
void vStringsCheck(ParameterSet const &pset, std::string const &psetName)
void statisticsPSet(ParameterSet const &pset, std::string const &psetName)
void categoryPSets(ParameterSet const &pset, std::string const &psetName)
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, std::string const &ok)
std::vector< std::string > suppressWarning
void disallowedParam(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const ¶meterLabel, std::string const &type)
std::vector< String > vString
bool wildcard(vString const &v)
void destinationPSet(ParameterSet const &pset, std::string const &psetName)
T check(ParameterSet const &pset, std::string const &psetName, std::string const ¶meterLabel)
std::vector< std::string > fwkJobReports
std::vector< std::string > suppressDebug
void noneExcept(ParameterSet const &pset, std::string const &psetName, std::string const &type, T const &ok1, T const &ok2)
void noNonPSetUsage(ParameterSet const &pset, vString const &v, std::string const &psetName, std::string const ¶meterLabel)
std::vector< std::string > statistics
void noCoutCerrClash(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
void fwkJobReportPSet(ParameterSet const &pset, std::string const &psetName)