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 (char const *pattern, WildcardValidationCriteria criteria, bool isTracked)
 
 ParameterWildcard (std::string 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 (char const *value)
 
void setComment (std::string 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

◆ ParameterWildcard() [2/2]

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

◆ ~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.

37 { return new ParameterWildcard(*this); }

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

◆ 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.

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  }

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

◆ 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.

40  {
41  std::vector<std::string> parameterNames = pset.getParameterNamesForType<T>(isTracked());
42  validateMatchingNames(parameterNames, validatedLabels, optional);
43  }

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

edm::ParameterWildcardBase::throwIfInvalidPattern
void throwIfInvalidPattern(char const *pattern) const
Definition: ParameterWildcardBase.cc:20
Types.optional
optional
Definition: Types.py:167
edm::RequireAtLeastOne
Definition: ParameterWildcardBase.h:17
edm::ParameterWildcardBase::isTracked
bool isTracked() const
Definition: ParameterWildcardBase.h:24
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
edm::ParameterWildcard::ParameterWildcard
ParameterWildcard(std::string const &pattern, WildcardValidationCriteria criteria, bool isTracked)
Definition: ParameterWildcard.h:25
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::ParameterWildcardBase::validateMatchingNames
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
Definition: ParameterWildcardBase.cc:36
T
long double T
Definition: Basic3DVectorLD.h:48
edm::ParameterWildcardBase::ParameterWildcardBase
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
Definition: ParameterWildcardBase.cc:15
edm::ParameterWildcardBase::criteria
WildcardValidationCriteria criteria() const
Definition: ParameterWildcardBase.h:25
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27