15 : node_left_(node_left.
clone()), node_right_(node_right.
clone()) {}
22 std::unique_ptr<ParameterDescriptionNode> node_right)
26 std::unique_ptr<ParameterDescriptionNode> node_right)
30 std::set<ParameterTypes>& parameterTypes,
31 std::set<ParameterTypes>& wildcardTypes)
const {
32 std::set<std::string> labelsLeft;
33 std::set<ParameterTypes> parameterTypesLeft;
34 std::set<ParameterTypes> wildcardTypesLeft;
35 node_left_->checkAndGetLabelsAndTypes(labelsLeft, parameterTypesLeft, wildcardTypesLeft);
37 std::set<std::string> labelsRight;
38 std::set<ParameterTypes> parameterTypesRight;
39 std::set<ParameterTypes> wildcardTypesRight;
40 node_right_->checkAndGetLabelsAndTypes(labelsRight, parameterTypesRight, wildcardTypesRight);
46 usedLabels.insert(labelsLeft.begin(), labelsLeft.end());
47 usedLabels.insert(labelsRight.begin(), labelsRight.end());
49 parameterTypes.insert(parameterTypesRight.begin(), parameterTypesRight.end());
50 parameterTypes.insert(parameterTypesLeft.begin(), parameterTypesLeft.end());
52 wildcardTypes.insert(wildcardTypesRight.begin(), wildcardTypesRight.end());
53 wildcardTypes.insert(wildcardTypesLeft.begin(), wildcardTypesLeft.end());
58 node_left_->validate(pset, validatedLabels,
false);
59 node_right_->validate(pset, validatedLabels,
false);
66 bool& wroteSomething)
const {
67 node_left_->writeCfi(os, startWithComma, indentation, wroteSomething);
68 node_right_->writeCfi(os, startWithComma, indentation, wroteSomething);
79 if (dfh.
pass() == 1) {
88 os <<
" (do not write to cfi)";
90 os <<
" see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
100 os <<
" (do not write to cfi)";
101 if (optional || !writeToCfi) {
106 os <<
"see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
119 node_left_->printNestedContent(os,
false, dfh);
129 std::stringstream ss;
134 os <<
"Section " << newSection <<
" AND group description:\n";
137 os <<
"This optional AND group requires all or none of the following to be in the PSet\n";
139 os <<
"This AND group requires all of the following to be in the PSet\n";
162 node_left_->printNestedContent(os,
false, new_dfh);
163 node_right_->printNestedContent(os,
false, new_dfh);
177 std::set<std::string>
const& labelsRight)
const {
178 std::set<std::string> duplicateLabels;
179 std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin());
180 std::set_intersection(labelsLeft.begin(), labelsLeft.end(), labelsRight.begin(), labelsRight.end(), insertIter);
181 if (!duplicateLabels.empty()) {
182 std::stringstream ss;
183 for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(), iEnd = duplicateLabels.end();
186 ss <<
" \"" << *iter <<
"\"\n";
189 <<
"\"and\" expression must be unique. The following duplicate\n" 190 <<
"labels were detected:\n" 196 std::set<ParameterTypes>
const& types2)
const {
197 if (!types1.empty()) {
198 std::set<ParameterTypes> duplicateTypes;
199 std::insert_iterator<std::set<ParameterTypes> > insertIter(duplicateTypes, duplicateTypes.begin());
200 std::set_intersection(types1.begin(), types1.end(), types2.begin(), types2.end(), insertIter);
201 if (!duplicateTypes.empty()) {
202 std::stringstream ss;
203 for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes.begin(), iEnd = duplicateTypes.end();
209 <<
"Types used for wildcards in different nodes of a ParameterSetDescription\n" 210 <<
"\"and\" expression must be different from types used for other parameters.\n" 211 <<
"The following duplicate types were detected:\n"
void throwIfDuplicateTypes(std::set< ParameterTypes > const &types1, std::set< ParameterTypes > const &types2) const
ANDGroupDescription(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const override
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
std::string parameterTypeEnumToString(ParameterTypes iType)
edm::value_ptr< ParameterDescriptionNode > node_right_
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
std::string const & comment() const
edm::value_ptr< ParameterDescriptionNode > node_left_
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
static void printSpaces(std::ostream &os, int n)
bool exists(ParameterSet const &pset) const
bool partiallyExists(ParameterSet const &pset) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
bool partiallyExists_(ParameterSet const &pset) const override
ParameterDescriptionNode * clone() const override
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
void throwIfDuplicateLabels(std::set< std::string > const &labelsLeft, std::set< std::string > const &labelsRight) const
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
bool exists_(ParameterSet const &pset) const override