29 isTracked_(isTracked),
30 hasDefault_(hasDefault) {
42 isTracked_(isTracked),
43 hasDefault_(hasDefault) {
64 <<
"It should be " << shouldBe <<
".\n";
73 <<
"\" should be defined "
76 <<
"The type in the configuration is incorrect.\n";
85 <<
"Missing required parameter. It should have label \"" <<
label() <<
"\" and have type \"" << tr <<
" "
87 <<
"The description has no default. The parameter must be defined "
88 "in the configuration\n";
92 std::set<ParameterTypes>& parameterTypes,
93 std::set<ParameterTypes>& )
const {
94 usedLabels.insert(
label());
95 parameterTypes.insert(
type());
99 std::set<std::string>& validatedLabels,
104 validatedLabels.insert(
label());
111 if (!exists && !optional) {
114 validatedLabels.insert(
label());
122 std::ostream& os,
bool optional,
bool& startWithComma,
int indentation,
bool& wroteSomething)
const {
123 wroteSomething =
true;
126 startWithComma =
true;
131 os <<
label() <<
" = cms.";
152 if (dfh.
pass() == 0) {
164 std::ios::fmtflags oldFlags = os.flags();
167 os << std::left << std::setw(dfh.
column1()) <<
label() <<
" ";
172 std::stringstream
ss;
175 os << std::setw(dfh.
column2()) << ss.str();
179 os << std::setw(dfh.
column3());
191 os <<
label() <<
"\n";
228 }
else if (!writeToCfi) {
229 os <<
"none (do not write to cfi)";
243 os <<
"Section " << dfh.
section() <<
"." << dfh.
counter() <<
" " <<
label() <<
" default contents: ";
253 return exists(pset) ? 1 : 0;
bool partiallyExists_(ParameterSet const &pset) const override
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
virtual void printDefault_(std::ostream &os, bool writeToCfi, DocFormatHelper &dfh) const
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const override
~ParameterDescriptionBase() override
std::string parameterTypeEnumToString(ParameterTypes iType)
void throwMissingRequiredNoDefault() const
std::string const & comment() const
void throwParameterWrongType() const
static void printSpaces(std::ostream &os, int n)
bool exists(ParameterSet const &pset) const
ParameterTypes type() const
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
bool hasNestedContent() const
void throwParameterWrongTrackiness() const
virtual bool exists_(ParameterSet const &pset, bool isTracked) const =0
virtual void insertDefault_(ParameterSet &pset) const =0
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
virtual void writeDoc_(std::ostream &os, int indentation) const =0
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
tuple size
Write out results.
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
std::string const & label() const