CMS 3D CMS Logo

ParameterWildcardBase.h
Go to the documentation of this file.
1 
2 #ifndef FWCore_ParameterSet_ParameterWildcardBase_h
3 #define FWCore_ParameterSet_ParameterWildcardBase_h
4 
6 
7 #include <set>
8 #include <string>
9 #include <iosfwd>
10 #include <vector>
11 
12 namespace edm {
13 
14  class ParameterSet;
15  class DocFormatHelper;
16 
18 
20  public:
21  ~ParameterWildcardBase() override;
22 
23  ParameterTypes type() const { return type_; }
24  bool isTracked() const { return isTracked_; }
26 
27  protected:
29 
30  void throwIfInvalidPattern(char const* pattern) const;
31  void throwIfInvalidPattern(std::string const& pattern) const;
32 
33  void validateMatchingNames(std::vector<std::string> const& matchingNames,
34  std::set<std::string>& validatedLabels,
35  bool optional) const;
36 
37  private:
38  void checkAndGetLabelsAndTypes_(std::set<std::string>& usedLabels,
39  std::set<ParameterTypes>& parameterTypes,
40  std::set<ParameterTypes>& wildcardTypes) const override;
41 
42  void writeCfi_(
43  std::ostream& os, bool optional, bool& startWithComma, int indentation, bool& wroteSomething) const override;
44 
45  void print_(std::ostream& os, bool optional, bool writeToCfi, DocFormatHelper& dfh) const override;
46 
47  bool partiallyExists_(ParameterSet const& pset) const override;
48 
49  int howManyXORSubNodesExist_(ParameterSet const& pset) const override;
50 
52  bool isTracked_;
54 
55  // In the future we may want to add a string for the label if
56  // default values are added to be inserted into a ParameterSet
57  // when missing.
58 
59  // In the future we may want to add a string for the wildcard
60  // pattern if we implement regular expressions, globbing, or some
61  // other kind of wildcard patterns other than "*".
62  };
63 } // namespace edm
64 #endif
edm::ParameterWildcardBase::throwIfInvalidPattern
void throwIfInvalidPattern(char const *pattern) const
Definition: ParameterWildcardBase.cc:20
edm::ParameterWildcardBase::partiallyExists_
bool partiallyExists_(ParameterSet const &pset) const override
Definition: ParameterWildcardBase.cc:155
edm::ParameterTypes
ParameterTypes
Definition: ParameterDescriptionNode.h:33
edm::ParameterWildcardBase::howManyXORSubNodesExist_
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
Definition: ParameterWildcardBase.cc:157
edm::ParameterWildcardBase::print_
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
Definition: ParameterWildcardBase.cc:64
edm
HLT enums.
Definition: AlignableModifier.h:19
Types.optional
optional
Definition: Types.py:167
edm::ParameterWildcardBase::isTracked_
bool isTracked_
Definition: ParameterWildcardBase.h:52
edm::ParameterWildcardBase
Definition: ParameterWildcardBase.h:19
edm::DocFormatHelper
Definition: DocFormatHelper.h:15
edm::RequireAtLeastOne
Definition: ParameterWildcardBase.h:17
edm::WildcardValidationCriteria
WildcardValidationCriteria
Definition: ParameterWildcardBase.h:17
ParameterDescriptionNode.h
edm::ParameterWildcardBase::isTracked
bool isTracked() const
Definition: ParameterWildcardBase.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::RequireExactlyOne
Definition: ParameterWildcardBase.h:17
edm::ParameterSet
Definition: ParameterSet.h:36
ParameterSet
Definition: Functions.h:16
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::ParameterWildcardBase::validateMatchingNames
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
Definition: ParameterWildcardBase.cc:36
edm::ParameterWildcardBase::checkAndGetLabelsAndTypes_
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const override
Definition: ParameterWildcardBase.cc:58
edm::ParameterWildcardBase::ParameterWildcardBase
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
Definition: ParameterWildcardBase.cc:15
printContent_cfi.indentation
indentation
Definition: printContent_cfi.py:10
edm::ParameterWildcardBase::criteria
WildcardValidationCriteria criteria() const
Definition: ParameterWildcardBase.h:25
edm::ParameterWildcardBase::criteria_
WildcardValidationCriteria criteria_
Definition: ParameterWildcardBase.h:53
edm::ParameterDescriptionNode
Definition: ParameterDescriptionNode.h:82
edm::ParameterWildcardBase::~ParameterWildcardBase
~ParameterWildcardBase() override
Definition: ParameterWildcardBase.cc:13
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
edm::ParameterWildcardBase::type
ParameterTypes type() const
Definition: ParameterWildcardBase.h:23
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::ParameterWildcardBase::type_
ParameterTypes type_
Definition: ParameterWildcardBase.h:51
edm::ParameterWildcardBase::writeCfi_
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const override
Definition: ParameterWildcardBase.cc:149