|
|
Go to the documentation of this file. 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";
111 flaws_ << psetName <<
" PSet: \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) {
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 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)
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)
std::vector< std::string > suppressFwkInfo_
bool keywordCheck(std::string const &word)
void catBoolRestriction(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName, std::string const &type)
std::string operator()(ParameterSet const &pset)
void destinationPSets(ParameterSet const &pset)
std::vector< std::string > destinations_
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)
bool validateThreshold(std::string const &thresh, std::string const &psetName)
std::vector< std::string > suppressError_
void suppressionLists(ParameterSet const &pset)
void noNoncategoryPsets(ParameterSet const &pset, std::string const &psetName)
std::vector< std::string > suppressInfo_
void catInts(ParameterSet const &pset, std::string const &psetName, std::string const &categoryName)
std::vector< std::string > debugModules_
std::ostringstream flaws_
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)
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 > categories_
std::vector< std::string > statistics_
std::vector< std::string > suppressWarning_
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)
void noCoutCerrClash(vString const &v, std::string const &psetName, std::string const ¶meterLabel)
std::vector< std::string > suppressDebug_