13 : node_left_(node_left.
clone()), node_right_(node_right.
clone()) {}
17 : node_left_(
std::
move(node_left)), node_right_(node_right.
clone()) {}
20 std::unique_ptr<ParameterDescriptionNode> node_right)
21 : node_left_(node_left.
clone()), node_right_(
std::
move(node_right)) {}
24 std::unique_ptr<ParameterDescriptionNode> node_right)
25 : node_left_(
std::
move(node_left)), node_right_(
std::
move(node_right)) {}
28 std::set<ParameterTypes>& parameterTypes,
29 std::set<ParameterTypes>& wildcardTypes)
const {
30 std::set<std::string> labelsLeft;
31 std::set<ParameterTypes> parameterTypesLeft;
32 std::set<ParameterTypes> wildcardTypesLeft;
33 node_left_->checkAndGetLabelsAndTypes(labelsLeft, parameterTypesLeft, wildcardTypesLeft);
35 std::set<std::string> labelsRight;
36 std::set<ParameterTypes> parameterTypesRight;
37 std::set<ParameterTypes> wildcardTypesRight;
38 node_right_->checkAndGetLabelsAndTypes(labelsRight, parameterTypesRight, wildcardTypesRight);
40 usedLabels.insert(labelsLeft.begin(), labelsLeft.end());
41 usedLabels.insert(labelsRight.begin(), labelsRight.end());
43 parameterTypes.insert(parameterTypesRight.begin(), parameterTypesRight.end());
44 parameterTypes.insert(parameterTypesLeft.begin(), parameterTypesLeft.end());
46 wildcardTypes.insert(wildcardTypesRight.begin(), wildcardTypesRight.end());
47 wildcardTypes.insert(wildcardTypesLeft.begin(), wildcardTypesLeft.end());
53 int nTotal = nExistLeft + nExistRight;
62 if (nExistLeft == 1) {
64 }
else if (nExistRight == 1) {
66 }
else if (nTotal == 0) {
73 nTotal = nExistLeft + nExistRight;
86 bool& wroteSomething)
const {
98 if (dfh.
pass() == 1) {
107 os <<
" (do not write to cfi)";
119 os <<
" (do not write to cfi)";
148 std::stringstream
ss;
153 os <<
"Section " << newSection <<
" XOR group description:\n";
156 os <<
"This optional XOR group requires exactly one or none of the following to be in the PSet\n";
158 os <<
"This XOR group requires exactly one of the following to be in the PSet\n";
201 <<
"Exactly one parameter can exist in a ParameterSet from a list of\n" 202 <<
"parameters described by an \"xor\" operator in a ParameterSetDescription.\n" 203 <<
"This rule also applies in a more general sense to the other types\n" 204 <<
"of nodes that can appear within a ParameterSetDescription. Only one\n" 205 <<
"can pass validation as \"existing\".\n";
213 <<
"Exactly one parameter can exist in a ParameterSet from a list of\n" 214 <<
"parameters described by an \"xor\" operator in a ParameterSetDescription.\n" 215 <<
"This rule also applies in a more general sense to the other types\n" 216 <<
"of nodes that can appear within a ParameterSetDescription. Only one\n" 217 <<
"can pass validation as \"existing\". This error has occurred after an\n" 218 <<
"attempt to insert missing parameters to fix the problem.\n";
bool exists_(ParameterSet const &pset) const override
void throwAfterValidation() const
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
bool partiallyExists_(ParameterSet const &pset) const override
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, CfiOptions &, bool &wroteSomething) const override
static void printSpaces(std::ostream &os, int n)
XORGroupDescription(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
std::string const & comment() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
bool exists(ParameterSet const &pset) const
edm::value_ptr< ParameterDescriptionNode > node_left_
void throwMoreThanOneParameter() const
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
cfi::CfiOptions CfiOptions
edm::value_ptr< ParameterDescriptionNode > node_right_