CMS 3D CMS Logo

AllowedLabelsDescription.h
Go to the documentation of this file.
1 
2 #ifndef FWCore_ParameterSet_AllowedLabelsDescription_h
3 #define FWCore_ParameterSet_AllowedLabelsDescription_h
4 
10 
11 #include <string>
12 #include <set>
13 #include <vector>
14 #include <iosfwd>
15 
16 namespace edm {
17 
18  class VParameterSetEntry;
20  class DocFormatHelper;
21 
22  template <class T>
24  public:
27 
30 
32 
33  ParameterDescriptionNode* clone() const override { return new AllowedLabelsDescription(*this); }
34 
35  private:
36  void validateAllowedLabel_(std::string const& allowedLabel,
38  std::set<std::string>& validatedLabels) const override {
39  if (pset.existsAs<T>(allowedLabel, isTracked())) {
40  validatedLabels.insert(allowedLabel);
41  }
42  }
43  };
44 
45  template <>
47  public:
49 
50  AllowedLabelsDescription(char const* label, bool isTracked);
51 
53 
55 
56  ~AllowedLabelsDescription() override;
57 
58  ParameterDescriptionNode* clone() const override;
59 
60  private:
61  void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& helper) const override;
62 
63  void validateAllowedLabel_(std::string const& allowedLabel,
65  std::set<std::string>& validatedLabels) const override;
66 
68  };
69 
70  template <>
71  class AllowedLabelsDescription<std::vector<ParameterSet> > : public AllowedLabelsDescriptionBase {
72  public:
74 
75  AllowedLabelsDescription(char const* label, bool isTracked);
76 
78 
80 
81  ~AllowedLabelsDescription() override;
82 
83  ParameterDescriptionNode* clone() const override;
84 
85  private:
86  void printNestedContent_(std::ostream& os, bool optional, DocFormatHelper& helper) const override;
87 
88  void validateAllowedLabel_(std::string const& allowedLabel,
90  std::set<std::string>& validatedLabels) const override;
91 
93  };
94 } // namespace edm
95 #endif
edm::AllowedLabelsDescription::validateAllowedLabel_
void validateAllowedLabel_(std::string const &allowedLabel, ParameterSet &pset, std::set< std::string > &validatedLabels) const override
Definition: AllowedLabelsDescription.h:36
ParameterSetDescriptionTraits.h
edm::AllowedLabelsDescriptionBase
Definition: AllowedLabelsDescriptionBase.h:16
edm::AllowedLabelsDescription::AllowedLabelsDescription
AllowedLabelsDescription(char const *label, bool isTracked)
Definition: AllowedLabelsDescription.h:28
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
Types.optional
optional
Definition: Types.py:167
AllowedLabelsDescriptionBase.h
edm::AllowedLabelsDescription::~AllowedLabelsDescription
~AllowedLabelsDescription() override
Definition: AllowedLabelsDescription.h:31
edm::DocFormatHelper
Definition: DocFormatHelper.h:15
edm::AllowedLabelsDescriptionBase::isTracked
bool isTracked() const
Definition: AllowedLabelsDescriptionBase.h:21
edm::AllowedLabelsDescriptionBase::printNestedContent_
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
Definition: AllowedLabelsDescriptionBase.cc:97
ParameterDescriptionNode.h
edm::AllowedLabelsDescription::clone
ParameterDescriptionNode * clone() const override
Definition: AllowedLabelsDescription.h:33
value_ptr.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
edm::value_ptr
Definition: value_ptr.h:63
helper
Definition: helper.py:1
value
Definition: value.py:1
edm::AllowedLabelsDescription
Definition: AllowedLabelsDescription.h:23
edm::AllowedLabelsDescription< ParameterSetDescription >::psetDesc_
value_ptr< ParameterSetDescription > psetDesc_
Definition: AllowedLabelsDescription.h:67
edm::AllowedLabelsDescription::AllowedLabelsDescription
AllowedLabelsDescription(std::string const &label, bool isTracked)
Definition: AllowedLabelsDescription.h:25
std
Definition: JetResolutionObject.h:76
T
long double T
Definition: Basic3DVectorLD.h:48
ParameterSetDescription
ParameterSet.h
edm::ParameterTypeToEnum
Definition: ParameterDescriptionNode.h:66
edm::ParameterDescriptionNode
Definition: ParameterDescriptionNode.h:82
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::AllowedLabelsDescription< std::vector< ParameterSet > >::psetDesc_
value_ptr< ParameterSetDescription > psetDesc_
Definition: AllowedLabelsDescription.h:92
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27