15 : node_left_(node_left.
clone()), node_right_(node_right.
clone()) {}
19 : node_left_(
std::
move(node_left)), node_right_(node_right.
clone()) {}
22 std::unique_ptr<ParameterDescriptionNode> node_right)
23 : node_left_(node_left.
clone()), node_right_(
std::
move(node_right)) {}
26 std::unique_ptr<ParameterDescriptionNode> node_right)
27 : node_left_(
std::
move(node_left)), node_right_(
std::
move(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());
68 bool& wroteSomething)
const {
81 if (dfh.
pass() == 1) {
90 os <<
" (do not write to cfi)";
102 os <<
" (do not write to cfi)";
131 std::stringstream
ss;
136 os <<
"Section " << newSection <<
" AND group description:\n";
139 os <<
"This optional AND group requires all or none of the following to be in the PSet\n";
141 os <<
"This AND group requires all of the following to be in the PSet\n";
179 std::set<std::string>
const& labelsRight)
const {
180 std::set<std::string> duplicateLabels;
181 std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin());
182 std::set_intersection(labelsLeft.begin(), labelsLeft.end(), labelsRight.begin(), labelsRight.end(), insertIter);
183 if (!duplicateLabels.empty()) {
184 std::stringstream
ss;
185 for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(), iEnd = duplicateLabels.end();
188 ss <<
" \"" << *iter <<
"\"\n";
191 <<
"\"and\" expression must be unique. The following duplicate\n" 192 <<
"labels were detected:\n" 198 std::set<ParameterTypes>
const& types2)
const {
199 if (!types1.empty()) {
200 std::set<ParameterTypes> duplicateTypes;
201 std::insert_iterator<std::set<ParameterTypes> > insertIter(duplicateTypes, duplicateTypes.begin());
203 if (!duplicateTypes.empty()) {
204 std::stringstream
ss;
205 for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes.begin(), iEnd = duplicateTypes.end();
211 <<
"Types used for wildcards in different nodes of a ParameterSetDescription\n" 212 <<
"\"and\" expression must be different from types used for other parameters.\n" 213 <<
"The following duplicate types were detected:\n"
void throwIfDuplicateLabels(std::set< std::string > const &labelsLeft, std::set< std::string > const &labelsRight) const
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
void throwIfDuplicateTypes(std::set< ParameterTypes > const &types1, std::set< ParameterTypes > const &types2) const
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
ANDGroupDescription(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
std::string parameterTypeEnumToString(ParameterTypes iType)
edm::value_ptr< ParameterDescriptionNode > node_right_
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
bool partiallyExists_(ParameterSet const &pset) const override
edm::value_ptr< ParameterDescriptionNode > node_left_
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
bool exists_(ParameterSet const &pset) const override
static void printSpaces(std::ostream &os, int n)
bool partiallyExists(ParameterSet const &pset) const
std::string const & comment() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
bool exists(ParameterSet const &pset) const
cfi::CfiOptions CfiOptions
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, CfiOptions &, bool &wroteSomething) const override