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

virtual ParameterDescriptionNodeclone () const
 
T getDefaultValue () const
 
 ParameterDescription (std::string const &iLabel, T const &value, bool isTracked)
 
 ParameterDescription (char const *iLabel, T const &value, bool isTracked)
 
 ParameterDescription (std::string const &iLabel, bool isTracked)
 
 ParameterDescription (char const *iLabel, bool isTracked)
 
virtual ~ParameterDescription ()
 
- 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
 
virtual ~ParameterDescriptionBase ()
 
- 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
 
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

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

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)
 
 ParameterDescriptionBase (char const *iLabel, ParameterTypes iType, bool isTracked, bool hasDefault)
 
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 
)
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().

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

Definition at line 116 of file ParameterDescription.h.

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

Definition at line 131 of file ParameterDescription.h.

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

Definition at line 145 of file ParameterDescription.h.

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

Member Function Documentation

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

Implements edm::ParameterDescriptionNode.

Definition at line 161 of file ParameterDescription.h.

161  {
162  return new ParameterDescription(*this);
163  }
ParameterDescription(std::string const &iLabel, T const &value, bool isTracked)
template<typename T>
virtual bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset) const
inlineprivatevirtual
template<typename T>
virtual bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset,
bool  isTracked 
) const
inlineprivatevirtual

Implements edm::ParameterDescriptionBase.

Definition at line 186 of file ParameterDescription.h.

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

Definition at line 165 of file ParameterDescription.h.

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

Implements edm::ParameterDescriptionBase.

Definition at line 190 of file ParameterDescription.h.

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

190  {
191  if (isTracked()) {
192  pset.addParameter(label(), value_);
193  }
194  else {
195  pset.addUntrackedParameter(label(), value_);
196  }
197  }
std::string const & label() const
template<typename T>
virtual void edm::ParameterDescription< T >::writeCfi_ ( std::ostream &  os,
int  indentation 
) const
inlineprivatevirtual
template<typename T>
virtual void edm::ParameterDescription< T >::writeDoc_ ( std::ostream &  os,
int  indentation 
) const
inlineprivatevirtual

Member Data Documentation

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

Definition at line 199 of file ParameterDescription.h.

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