CMS 3D CMS Logo

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

List of all members.

Public Member Functions

virtual ParameterDescriptionNodeclone () const
T getDefaultValue () const
 ParameterDescription (std::string const &iLabel, bool isTracked)
 ParameterDescription (char const *iLabel, T const &value, bool isTracked)
 ParameterDescription (char const *iLabel, bool isTracked)
 ParameterDescription (std::string const &iLabel, T const &value, bool isTracked)
virtual ~ParameterDescription ()

Private Member Functions

virtual bool exists_ (ParameterSet const &pset) const
virtual bool exists_ (ParameterSet const &pset, bool isTracked) const
virtual bool hasNestedContent_ ()
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_

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< std::vector< ParameterSet > >::clone(), edm::ParameterDescription< std::vector< std::string > >::clone(), and edm::ParameterDescription< ParameterSetDescription >::clone().

                                         :
      // WARNING: the toEnum function is intentionally undefined if the template
      // parameter is ParameterSet or vector<ParameterSet>.  Both of these cases
      // are handled by full template specializations below.  In the first case.
      // ParameterSetDescription should be used instead of ParameterSet.
      // In the second case the function arguments are completely different.
      // Note that this template parameter is most often passed through from
      // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
      // use the addVPSet* versions of those functions.
      ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, true),
      value_(value) {
    }
template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
T const &  value,
bool  isTracked 
) [inline]

Definition at line 116 of file ParameterDescription.h.

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

Definition at line 131 of file ParameterDescription.h.

                                         :
      // WARNING: the toEnum function is intentionally undefined if the template
      // parameter is ParameterSet or vector<ParameterSet>.  Both of these cases
      // are handled by full template specializations below.  In the first case.
      // ParameterSetDescription should be used instead of ParameterSet.
      // In the second case the function arguments are completely different.
      // Note that this template parameter is most often passed through from
      // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
      // use the addVPSet* versions of those functions.
      ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false),
      value_() {
    }
template<typename T>
edm::ParameterDescription< T >::ParameterDescription ( char const *  iLabel,
bool  isTracked 
) [inline]

Definition at line 145 of file ParameterDescription.h.

                                         :
      // WARNING: the toEnum function is intentionally undefined if the template
      // parameter is ParameterSet or vector<ParameterSet>.  Both of these cases
      // are handled by full template specializations below.  In the first case.
      // ParameterSetDescription should be used instead of ParameterSet.
      // In the second case the function arguments are completely different.
      // Note that this template parameter is most often passed through from
      // an add*<T> function of class ParameterSetDescription. For vector<ParameterSet>
      // use the addVPSet* versions of those functions.
      ParameterDescriptionBase(iLabel, ParameterTypeToEnum::toEnum<T>(), isTracked, false),
      value_() {
    }
template<typename T>
virtual edm::ParameterDescription< T >::~ParameterDescription ( ) [inline, virtual]

Definition at line 159 of file ParameterDescription.h.

{ }

Member Function Documentation

template<typename T>
virtual ParameterDescriptionNode* edm::ParameterDescription< T >::clone ( void  ) const [inline, virtual]

Implements edm::ParameterDescriptionNode.

Definition at line 161 of file ParameterDescription.h.

                                                    {
      return new ParameterDescription(*this);
    }
template<typename T>
virtual bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset) const [inline, private, virtual]

Implements edm::ParameterDescriptionNode.

Definition at line 169 of file ParameterDescription.h.

                                                         {
      return pset.existsAs<T>(label(), isTracked());
    }
template<typename T>
virtual bool edm::ParameterDescription< T >::exists_ ( ParameterSet const &  pset,
bool  isTracked 
) const [inline, private, virtual]

Implements edm::ParameterDescriptionBase.

Definition at line 186 of file ParameterDescription.h.

                                                                         {
      return pset.existsAs<T>(label(), isTracked);
    }
template<typename T>
T edm::ParameterDescription< T >::getDefaultValue ( ) const [inline]

Definition at line 165 of file ParameterDescription.h.

{ return value_; }
template<typename T>
virtual bool edm::ParameterDescription< T >::hasNestedContent_ ( ) [inline, private, virtual]

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 173 of file ParameterDescription.h.

                                     {
      if (!hasDefault()) return false;
      return writeParameterValue::hasNestedContent(value_);
    }
template<typename T>
virtual void edm::ParameterDescription< T >::insertDefault_ ( ParameterSet pset) const [inline, private, virtual]

Implements edm::ParameterDescriptionBase.

Definition at line 190 of file ParameterDescription.h.

                                                          {
      if (isTracked()) {
        pset.addParameter(label(), value_);
      }
      else {
        pset.addUntrackedParameter(label(), value_);
      }
    }
template<typename T>
virtual void edm::ParameterDescription< T >::writeCfi_ ( std::ostream &  os,
int  indentation 
) const [inline, private, virtual]
template<typename T>
virtual void edm::ParameterDescription< T >::writeDoc_ ( std::ostream &  os,
int  indentation 
) const [inline, private, virtual]

Member Data Documentation

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