CMS 3D CMS Logo

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

#include <ParameterWildcard.h>

Inheritance diagram for edm::ParameterWildcard< T >:
edm::ParameterWildcardBase edm::ParameterDescriptionNode

Public Member Functions

ParameterDescriptionNodeclone () const override
 
 ParameterWildcard (std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)
 
 ParameterWildcard (char const *pattern, WildcardValidationCriteria criteria, bool isTracked)
 
 ~ParameterWildcard () override
 
- Public Member Functions inherited from edm::ParameterWildcardBase
WildcardValidationCriteria criteria () const
 
bool isTracked () const
 
ParameterTypes type () const
 
 ~ParameterWildcardBase () 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 optional, bool &startWithComma, int indentation, bool &wroteSomething) const
 
virtual ~ParameterDescriptionNode ()
 

Private Member Functions

bool exists_ (ParameterSet const &pset) const override
 
void validate_ (ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
 

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::ParameterWildcardBase
 ParameterWildcardBase (ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
 
void throwIfInvalidPattern (char const *pattern) const
 
void throwIfInvalidPattern (std::string const &pattern) const
 
void validateMatchingNames (std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
 
- Protected Member Functions inherited from edm::ParameterDescriptionNode
virtual bool hasNestedContent_ () const
 
virtual void printNestedContent_ (std::ostream &, bool, DocFormatHelper &) const
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<class T>
class edm::ParameterWildcard< T >

Definition at line 23 of file ParameterWildcard.h.

Constructor & Destructor Documentation

◆ ParameterWildcard() [1/2]

template<class T>
edm::ParameterWildcard< T >::ParameterWildcard ( std::string const &  pattern,
WildcardValidationCriteria  criteria,
bool  isTracked 
)
inline

Definition at line 25 of file ParameterWildcard.h.

References topSingleLeptonDQM_PU_cfi::pattern, and edm::ParameterWildcardBase::throwIfInvalidPattern().

Referenced by edm::ParameterWildcard< T >::clone(), and edm::ParameterWildcard< ParameterSetDescription >::clone().

26  : ParameterWildcardBase(ParameterTypeToEnum::toEnum<T>(), isTracked, criteria) {
28  }
void throwIfInvalidPattern(char const *pattern) const
WildcardValidationCriteria criteria() const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)

◆ ParameterWildcard() [2/2]

template<class T>
edm::ParameterWildcard< T >::ParameterWildcard ( char const *  pattern,
WildcardValidationCriteria  criteria,
bool  isTracked 
)
inline

Definition at line 30 of file ParameterWildcard.h.

References topSingleLeptonDQM_PU_cfi::pattern, and edm::ParameterWildcardBase::throwIfInvalidPattern().

31  : ParameterWildcardBase(ParameterTypeToEnum::toEnum<T>(), isTracked, criteria) {
33  }
void throwIfInvalidPattern(char const *pattern) const
WildcardValidationCriteria criteria() const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)

◆ ~ParameterWildcard()

template<class T>
edm::ParameterWildcard< T >::~ParameterWildcard ( )
inlineoverride

Definition at line 35 of file ParameterWildcard.h.

35 {}

Member Function Documentation

◆ clone()

template<class T>
ParameterDescriptionNode* edm::ParameterWildcard< T >::clone ( void  ) const
inlineoverridevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 37 of file ParameterWildcard.h.

References edm::ParameterWildcard< T >::ParameterWildcard().

37 { return new ParameterWildcard(*this); }
ParameterWildcard(std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)

◆ exists_()

template<class T>
bool edm::ParameterWildcard< T >::exists_ ( ParameterSet const &  pset) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 45 of file ParameterWildcard.h.

References edm::ParameterWildcardBase::criteria(), edm::ParameterWildcardBase::isTracked(), muonDTDigis_cfi::pset, edm::RequireAtLeastOne, edm::RequireZeroOrMore, and mitigatedMETSequence_cff::U.

45  {
46  if (criteria() == RequireZeroOrMore)
47  return true;
48 
49  std::vector<std::string> parameterNames = pset.getParameterNamesForType<T>(isTracked());
50 
51  if (criteria() == RequireAtLeastOne)
52  return !parameterNames.empty();
53  return parameterNames.size() == 1U;
54  }
WildcardValidationCriteria criteria() const
long double T

◆ validate_()

template<class T>
void edm::ParameterWildcard< T >::validate_ ( ParameterSet pset,
std::set< std::string > &  validatedLabels,
bool  optional 
) const
inlineoverrideprivatevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 40 of file ParameterWildcard.h.

References edm::ParameterWildcardBase::isTracked(), Types::optional, muonDTDigis_cfi::pset, and edm::ParameterWildcardBase::validateMatchingNames().

40  {
41  std::vector<std::string> parameterNames = pset.getParameterNamesForType<T>(isTracked());
42  validateMatchingNames(parameterNames, validatedLabels, optional);
43  }
optional
Definition: Types.py:198
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
long double T