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 98 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 101 of file ParameterDescription.h.

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

104  :
105  // WARNING: the toEnum function is intentionally undefined if the template
106  // parameter is ParameterSet or vector<ParameterSet>. Both of these cases
107  // are handled by full template specializations below. In the first case.
108  // ParameterSetDescription should be used instead of ParameterSet.
109  // In the second case the function arguments are completely different.
110  // Note that this template parameter is most often passed through from
111  // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
112  // use the addVPSet* versions of those functions.
113  ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true, iComment),
114  value_(value) {
115  }
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 117 of file ParameterDescription.h.

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

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

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

Member Function Documentation

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

Implements edm::ParameterDescriptionNode.

Definition at line 165 of file ParameterDescription.h.

165  {
166  return new ParameterDescription(*this);
167  }
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
template<typename T>
bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset,
bool  isTracked 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 190 of file ParameterDescription.h.

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

Definition at line 169 of file ParameterDescription.h.

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

Implements edm::ParameterDescriptionBase.

Definition at line 194 of file ParameterDescription.h.

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

194  {
195  if (isTracked()) {
196  pset.addParameter(label(), value_);
197  }
198  else {
199  pset.addUntrackedParameter(label(), value_);
200  }
201  }
std::string const & label() const
template<typename T>
void edm::ParameterDescription< T >::writeCfi_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual
template<typename T>
void edm::ParameterDescription< T >::writeDoc_ ( std::ostream &  os,
int  indentation 
) const
inlineoverrideprivatevirtual

Member Data Documentation

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

Definition at line 203 of file ParameterDescription.h.

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