CMS 3D CMS Logo

IfExistsDescription.h
Go to the documentation of this file.
1 #ifndef FWCore_ParameterSet_IfExistsDescription_h
2 #define FWCore_ParameterSet_IfExistsDescription_h
3 
5 
7 
8 #include <memory>
9 #include <iosfwd>
10 #include <set>
11 #include <string>
12 
13 namespace edm {
14 
15  class ParameterSet;
16  class DocFormatHelper;
17 
19  public:
20  IfExistsDescription(ParameterDescriptionNode const& node_left, ParameterDescriptionNode const& node_right);
21 
22  IfExistsDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
23  ParameterDescriptionNode const& node_right);
24 
26  std::unique_ptr<ParameterDescriptionNode> node_right);
27 
28  IfExistsDescription(std::unique_ptr<ParameterDescriptionNode> node_left,
29  std::unique_ptr<ParameterDescriptionNode> node_right);
30 
31  ParameterDescriptionNode* clone() const override { return new IfExistsDescription(*this); }
32 
33  private:
34  void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
35  std::set<ParameterTypes>& parameterTypes,
36  std::set<ParameterTypes>& wildcardTypes) const override;
37 
38  void validate_(ParameterSet& pset, std::set<std::string>& validatedLabels, bool optional) const override;
39 
40  void writeCfi_(
41  std::ostream& os, bool optional, bool& startWithComma, int indentation, bool& wroteSomething) const override;
42 
43  void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
44 
45  bool hasNestedContent_() const override { return true; }
46 
47  void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& dfh) const override;
48 
49  bool exists_(ParameterSet const& pset) const override;
50 
51  bool partiallyExists_(ParameterSet const& pset) const override;
52 
53  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
54 
55  void throwIfDuplicateLabels(std::set<std::string> const& labelsLeft,
56  std::set<std::string> const& labelsRight) const;
57 
58  void throwIfDuplicateTypes(std::set<ParameterTypes> const& types1, std::set<ParameterTypes> const& types2) const;
59 
62  };
63 } // namespace edm
64 #endif
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::IfExistsDescription::clone
ParameterDescriptionNode * clone() const override
Definition: IfExistsDescription.h:31
Types.optional
optional
Definition: Types.py:199
edm::IfExistsDescription::exists_
bool exists_(ParameterSet const &pset) const override
Definition: IfExistsDescription.cc:165
edm::IfExistsDescription::node_left_
edm::value_ptr< ParameterDescriptionNode > node_left_
Definition: IfExistsDescription.h:60
edm::IfExistsDescription::hasNestedContent_
bool hasNestedContent_() const override
Definition: IfExistsDescription.h:45
edm::IfExistsDescription::throwIfDuplicateTypes
void throwIfDuplicateTypes(std::set< ParameterTypes > const &types1, std::set< ParameterTypes > const &types2) const
Definition: IfExistsDescription.cc:200
edm::DocFormatHelper
Definition: DocFormatHelper.h:15
edm::IfExistsDescription::validate_
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
Definition: IfExistsDescription.cc:56
ParameterDescriptionNode.h
edm::IfExistsDescription::howManyXORSubNodesExist_
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
Definition: IfExistsDescription.cc:178
edm::IfExistsDescription::throwIfDuplicateLabels
void throwIfDuplicateLabels(std::set< std::string > const &labelsLeft, std::set< std::string > const &labelsRight) const
Definition: IfExistsDescription.cc:180
value_ptr.h
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
edm::IfExistsDescription::partiallyExists_
bool partiallyExists_(ParameterSet const &pset) const override
Definition: IfExistsDescription.cc:176
edm::IfExistsDescription::printNestedContent_
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
Definition: IfExistsDescription.cc:119
edm::value_ptr
Definition: value_ptr.h:63
edm::IfExistsDescription::writeCfi_
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const override
Definition: IfExistsDescription.cc:75
edm::IfExistsDescription::print_
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
Definition: IfExistsDescription.cc:81
edm::IfExistsDescription::node_right_
edm::value_ptr< ParameterDescriptionNode > node_right_
Definition: IfExistsDescription.h:61
edm::IfExistsDescription::IfExistsDescription
IfExistsDescription(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
Definition: IfExistsDescription.cc:13
printContent_cfi.indentation
indentation
Definition: printContent_cfi.py:10
edm::IfExistsDescription::checkAndGetLabelsAndTypes_
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const override
Definition: IfExistsDescription.cc:29
edm::ParameterDescriptionNode
Definition: ParameterDescriptionNode.h:82
edm::IfExistsDescription
Definition: IfExistsDescription.h:18
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27