CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::ParameterDescription< T > Class Template Reference

#include <ParameterDescription.h>

Inheritance diagram for edm::ParameterDescription< T >:
edm::ParameterDescriptionBase edm::ParameterDescriptionNode

Public Member Functions

ParameterDescriptionNodeclone () const override
 
T getDefaultValue () const
 
 ParameterDescription (char const *iLabel, bool isTracked, Comment const &iComment=Comment())
 
 ParameterDescription (char const *iLabel, T const &value, bool isTracked, Comment const &iComment=Comment())
 
 ParameterDescription (std::string const &iLabel, bool isTracked, Comment const &iComment=Comment())
 
 ParameterDescription (std::string const &iLabel, T const &value, bool isTracked, Comment const &iComment=Comment())
 
 ~ParameterDescription () override
 
- Public Member Functions inherited from edm::ParameterDescriptionBase
bool hasDefault () const
 
bool isTracked () const
 
std::string const & label () const
 
virtual ParameterSetDescriptionparameterSetDescription ()
 
virtual ParameterSetDescription const * parameterSetDescription () const
 
ParameterTypes type () const
 
 ~ParameterDescriptionBase () override
 
- Public Member Functions inherited from edm::ParameterDescriptionNode
void checkAndGetLabelsAndTypes (std::set< std::string > &usedLabels, std::set< ParameterTypes > &parameterTypes, std::set< ParameterTypes > &wildcardTypes) const
 
std::string const & comment () const
 
bool exists (ParameterSet const &pset) const
 
bool hasNestedContent () const
 
int howManyXORSubNodesExist (ParameterSet const &pset) const
 
 ParameterDescriptionNode ()
 
 ParameterDescriptionNode (Comment const &iComment)
 
bool partiallyExists (ParameterSet const &pset) const
 
void print (std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const
 
void printNestedContent (std::ostream &os, bool optional, DocFormatHelper &dfh) const
 
void setComment (char const *value)
 
void setComment (std::string const &value)
 
void validate (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
 
void writeCfi (std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const
 
virtual ~ParameterDescriptionNode ()
 

Private Member Functions

bool exists_ (ParameterSet const &pset) const override
 
bool exists_ (ParameterSet const &pset, bool isTracked) const override
 
bool hasNestedContent_ () const override
 
void insertDefault_ (ParameterSet &pset) const override
 
void writeCfi_ (std::ostream &os, int indentation) const override
 
void writeDoc_ (std::ostream &os, int indentation) const override
 

Private Attributes

T value_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::ParameterDescriptionNode
static void printSpaces (std::ostream &os, int n)
 
- Protected Member Functions inherited from edm::ParameterDescriptionBase
 ParameterDescriptionBase (char const *iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
 
 ParameterDescriptionBase (std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
 
void throwMissingRequiredNoDefault () const
 
void throwParameterWrongTrackiness () const
 
void throwParameterWrongType () const
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<typename T>
class edm::ParameterDescription< T >

Definition at line 110 of file ParameterDescription.h.

Constructor & Destructor Documentation

◆ ParameterDescription() [1/4]

template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( std::string const &  iLabel,
T const &  value,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 112 of file ParameterDescription.h.

113  : // WARNING: the toEnum function is intentionally undefined if the template
114  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
115  // are handled by full template specializations below. In the first case.
116  // ParameterSetDescription should be used instead of ParameterSet.
117  // In the second case the function arguments are completely different.
118  // Note that this template parameter is most often passed through from
119  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
120  // use the addVPSet* versions of those functions.
121  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true, iComment),
122  value_(value) {}

Referenced by edm::ParameterDescription< std::vector< std::string > >::clone(), edm::ParameterDescription< ParameterSetDescription >::clone(), and edm::ParameterDescription< std::vector< ParameterSet > >::clone().

◆ ParameterDescription() [2/4]

template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
T const &  value,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 124 of file ParameterDescription.h.

125  : // WARNING: the toEnum function is intentionally undefined if the template
126  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
127  // are handled by full template specializations below. In the first case.
128  // ParameterSetDescription should be used instead of ParameterSet.
129  // In the second case the function arguments are completely different.
130  // Note that this template parameter is most often passed through from
131  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
132  // use the addVPSet* versions of those functions.
133  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true, iComment),
134  value_(value) {}

◆ ParameterDescription() [3/4]

template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( std::string const &  iLabel,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 136 of file ParameterDescription.h.

137  : // WARNING: the toEnum function is intentionally undefined if the template
138  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
139  // are handled by full template specializations below. In the first case.
140  // ParameterSetDescription should be used instead of ParameterSet.
141  // In the second case the function arguments are completely different.
142  // Note that this template parameter is most often passed through from
143  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
144  // use the addVPSet* versions of those functions.
145  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false, iComment),
146  value_() {}

◆ ParameterDescription() [4/4]

template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 148 of file ParameterDescription.h.

149  : // WARNING: the toEnum function is intentionally undefined if the template
150  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
151  // are handled by full template specializations below. In the first case.
152  // ParameterSetDescription should be used instead of ParameterSet.
153  // In the second case the function arguments are completely different.
154  // Note that this template parameter is most often passed through from
155  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
156  // use the addVPSet* versions of those functions.
157  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false, iComment),
158  value_() {}

◆ ~ParameterDescription()

template<typename T>
edm::ParameterDescription< T >::~ParameterDescription ( )
inlineoverride

Definition at line 160 of file ParameterDescription.h.

160 {}

Member Function Documentation

◆ clone()

template<typename T>
ParameterDescriptionNode* edm::ParameterDescription< T >::clone ( void  ) const
inlineoverridevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 162 of file ParameterDescription.h.

162 { return new ParameterDescription(*this); }

◆ exists_() [1/2]

template<typename T>
bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 167 of file ParameterDescription.h.

167 { return pset.existsAs<T>(label(), isTracked()); }

◆ exists_() [2/2]

template<typename T>
bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset,
bool  isTracked 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 183 of file ParameterDescription.h.

183  {
184  return pset.existsAs<T>(label(), isTracked);
185  }

◆ getDefaultValue()

template<typename T>
T edm::ParameterDescription< T >::getDefaultValue ( ) const
inline

Definition at line 164 of file ParameterDescription.h.

164 { return value_; }

◆ hasNestedContent_()

template<typename T>
bool edm::ParameterDescription< T >::hasNestedContent_ ( ) const
inlineoverrideprivatevirtual

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 169 of file ParameterDescription.h.

169  {
170  if (!hasDefault())
171  return false;
173  }

◆ insertDefault_()

template<typename T>
void edm::ParameterDescription< T >::insertDefault_ ( ParameterSet pset) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 187 of file ParameterDescription.h.

187  {
188  if (isTracked()) {
189  pset.addParameter(label(), value_);
190  } else {
191  pset.addUntrackedParameter(label(), value_);
192  }
193  }

◆ writeCfi_()

template<typename T>
void edm::ParameterDescription< T >::writeCfi_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual

◆ writeDoc_()

template<typename T>
void edm::ParameterDescription< T >::writeDoc_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual

Member Data Documentation

◆ value_

template<typename T>
T edm::ParameterDescription< T >::value_
private
edm::ParameterDescriptionBase::label
std::string const & label() const
Definition: ParameterDescriptionBase.h:37
edm::writeParameterValue::hasNestedContent
bool hasNestedContent(int const &value)
Definition: ParameterDescription.cc:752
edm::writeParameterValue::DOC
Definition: ParameterDescription.h:46
edm::ParameterDescriptionBase::hasDefault
bool hasDefault() const
Definition: ParameterDescriptionBase.h:40
edm::writeParameterValue::CFI
Definition: ParameterDescription.h:46
value
Definition: value.py:1
edm::ParameterDescriptionBase::ParameterDescriptionBase
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
Definition: ParameterDescriptionBase.cc:24
edm::ParameterDescriptionBase::isTracked
bool isTracked() const
Definition: ParameterDescriptionBase.h:39
T
long double T
Definition: Basic3DVectorLD.h:48
printContent_cfi.indentation
indentation
Definition: printContent_cfi.py:10
edm::ParameterDescription::value_
T value_
Definition: ParameterDescription.h:195
edm::ParameterDescription::ParameterDescription
ParameterDescription(std::string const &iLabel, T const &value, bool isTracked, Comment const &iComment=Comment())
Definition: ParameterDescription.h:112
edm::writeParameterValue::writeValue
void writeValue(std::ostream &os, int indentation, int const &value_, ValueFormat format)
Definition: ParameterDescription.cc:639
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27