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 (std::string const &iLabel, T const &value, 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 (char const *iLabel, 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 ParameterSetDescription const * parameterSetDescription () const
 
virtual ParameterSetDescriptionparameterSetDescription ()
 
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 (std::string const &value)
 
void setComment (char const *value)
 
void validate (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
 
void writeCfi (std::ostream &os, 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 (std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
 
 ParameterDescriptionBase (char 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 105 of file ParameterDescription.h.

Constructor & Destructor Documentation

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

Definition at line 107 of file ParameterDescription.h.

108  : // WARNING: the toEnum function is intentionally undefined if the template
109  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
110  // are handled by full template specializations below. In the first case.
111  // ParameterSetDescription should be used instead of ParameterSet.
112  // In the second case the function arguments are completely different.
113  // Note that this template parameter is most often passed through from
114  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
115  // use the addVPSet* versions of those functions.
116  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true, iComment),
117  value_(value) {}
Definition: value.py:1
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
T const &  value,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 119 of file ParameterDescription.h.

120  : // WARNING: the toEnum function is intentionally undefined if the template
121  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
122  // are handled by full template specializations below. In the first case.
123  // ParameterSetDescription should be used instead of ParameterSet.
124  // In the second case the function arguments are completely different.
125  // Note that this template parameter is most often passed through from
126  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
127  // use the addVPSet* versions of those functions.
128  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true, iComment),
129  value_(value) {}
Definition: value.py:1
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( std::string const &  iLabel,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 131 of file ParameterDescription.h.

132  : // WARNING: the toEnum function is intentionally undefined if the template
133  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
134  // are handled by full template specializations below. In the first case.
135  // ParameterSetDescription should be used instead of ParameterSet.
136  // In the second case the function arguments are completely different.
137  // Note that this template parameter is most often passed through from
138  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
139  // use the addVPSet* versions of those functions.
140  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false, iComment),
141  value_() {}
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
bool  isTracked,
Comment const &  iComment = Comment() 
)
inline

Definition at line 143 of file ParameterDescription.h.

144  : // WARNING: the toEnum function is intentionally undefined if the template
145  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
146  // are handled by full template specializations below. In the first case.
147  // ParameterSetDescription should be used instead of ParameterSet.
148  // In the second case the function arguments are completely different.
149  // Note that this template parameter is most often passed through from
150  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
151  // use the addVPSet* versions of those functions.
152  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false, iComment),
153  value_() {}
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
template<typename T>
edm::ParameterDescription< T >::~ParameterDescription ( )
inlineoverride

Definition at line 155 of file ParameterDescription.h.

155 {}

Member Function Documentation

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

Implements edm::ParameterDescriptionNode.

Definition at line 157 of file ParameterDescription.h.

157 { return new ParameterDescription(*this); }
ParameterDescription(std::string const &iLabel, T const &value, bool isTracked, Comment const &iComment=Comment())
template<typename T>
bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 162 of file ParameterDescription.h.

162 { return pset.existsAs<T>(label(), isTracked()); }
long double T
std::string const & label() const
template<typename T>
bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset,
bool  isTracked 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 178 of file ParameterDescription.h.

178  {
179  return pset.existsAs<T>(label(), isTracked);
180  }
long double T
std::string const & label() const
template<typename T>
T edm::ParameterDescription< T >::getDefaultValue ( ) const
inline

Definition at line 159 of file ParameterDescription.h.

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

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 164 of file ParameterDescription.h.

164  {
165  if (!hasDefault())
166  return false;
168  }
bool hasNestedContent(int const &value)
template<typename T>
void edm::ParameterDescription< T >::insertDefault_ ( ParameterSet pset) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 182 of file ParameterDescription.h.

182  {
183  if (isTracked()) {
184  pset.addParameter(label(), value_);
185  } else {
186  pset.addUntrackedParameter(label(), value_);
187  }
188  }
std::string const & label() const
template<typename T>
void edm::ParameterDescription< T >::writeCfi_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 170 of file ParameterDescription.h.

170  {
172  }
void writeValue(std::ostream &os, int indentation, int const &value_, ValueFormat format)
template<typename T>
void edm::ParameterDescription< T >::writeDoc_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 174 of file ParameterDescription.h.

174  {
176  }
void writeValue(std::ostream &os, int indentation, int const &value_, ValueFormat format)

Member Data Documentation

template<typename T>
T edm::ParameterDescription< T >::value_
private

Definition at line 190 of file ParameterDescription.h.

Referenced by edm::writeParameterValue::writeValue().