CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::AllowedLabelsDescription< ParameterSetDescription > Class Template Reference

#include <AllowedLabelsDescription.h>

Inheritance diagram for edm::AllowedLabelsDescription< ParameterSetDescription >:
edm::AllowedLabelsDescriptionBase edm::ParameterDescriptionNode

Public Member Functions

 AllowedLabelsDescription (std::string const &label, bool isTracked)
 
 AllowedLabelsDescription (char const *label, bool isTracked)
 
 AllowedLabelsDescription (std::string const &label, ParameterSetDescription const &value, bool isTracked)
 
 AllowedLabelsDescription (char const *label, ParameterSetDescription const &value, bool isTracked)
 
ParameterDescriptionNodeclone () const override
 
 ~AllowedLabelsDescription () override
 
- Public Member Functions inherited from edm::AllowedLabelsDescriptionBase
bool isTracked () const
 
ParameterTypes type () const
 
 ~AllowedLabelsDescriptionBase () 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

void printNestedContent_ (std::ostream &os, bool optional, DocFormatHelper &helper) const override
 
void validateAllowedLabel_ (std::string const &allowedLabel, ParameterSet &pset, std::set< std::string > &validatedLabels) const override
 

Private Attributes

value_ptr< ParameterSetDescriptionpsetDesc_
 

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::AllowedLabelsDescriptionBase
 AllowedLabelsDescriptionBase (std::string const &label, ParameterTypes iType, bool isTracked)
 
 AllowedLabelsDescriptionBase (char const *label, ParameterTypes iType, bool isTracked)
 
void printNestedContentBase_ (std::ostream &os, bool optional, DocFormatHelper &dfh) const
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<>
class edm::AllowedLabelsDescription< ParameterSetDescription >

Definition at line 46 of file AllowedLabelsDescription.h.

Constructor & Destructor Documentation

edm::AllowedLabelsDescription< ParameterSetDescription >::AllowedLabelsDescription ( std::string const &  label,
bool  isTracked 
)

Definition at line 10 of file AllowedLabelsDescription.cc.

AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
char const * label
edm::AllowedLabelsDescription< ParameterSetDescription >::AllowedLabelsDescription ( char const *  label,
bool  isTracked 
)

Definition at line 13 of file AllowedLabelsDescription.cc.

AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
char const * label
edm::AllowedLabelsDescription< ParameterSetDescription >::AllowedLabelsDescription ( std::string const &  label,
ParameterSetDescription const &  value,
bool  isTracked 
)
edm::AllowedLabelsDescription< ParameterSetDescription >::AllowedLabelsDescription ( char const *  label,
ParameterSetDescription const &  value,
bool  isTracked 
)

Definition at line 26 of file AllowedLabelsDescription.cc.

26 {}

Member Function Documentation

Implements edm::ParameterDescriptionNode.

Definition at line 28 of file AllowedLabelsDescription.cc.

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

28  {
29  return new AllowedLabelsDescription(*this);
30  }
AllowedLabelsDescription(std::string const &label, bool isTracked)
void edm::AllowedLabelsDescription< ParameterSetDescription >::printNestedContent_ ( std::ostream &  os,
bool  optional,
DocFormatHelper helper 
) const
overrideprivatevirtual

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 32 of file AllowedLabelsDescription.cc.

References edm::DocFormatHelper::brief(), edm::DocFormatHelper::counter(), edm::DocFormatHelper::indent2(), edm::DocFormatHelper::indentation(), edm::DocFormatHelper::offsetSectionContent(), edm::DocFormatHelper::OTHER, edm::DocFormatHelper::parent(), edm::AllowedLabelsDescriptionBase::printNestedContentBase_(), edm::ParameterDescriptionNode::printSpaces(), edm::DocFormatHelper::section(), edm::DocFormatHelper::setIndentation(), edm::DocFormatHelper::setParent(), edm::DocFormatHelper::setSection(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::DocFormatHelper::TOP.

34  {
35  printNestedContentBase_(os, optional, dfh);
36 
37  int indentation = dfh.indentation();
38  if (dfh.parent() != DocFormatHelper::TOP) {
40  }
41 
42  std::stringstream ss;
43  ss << dfh.section() << "." << dfh.counter() << ".1";
44  std::string newSection = ss.str();
45 
46  if (dfh.brief()) {
48  } else {
49  dfh.indent2(os);
50  }
51  os << "see Section " << newSection << "\n";
52  if (!dfh.brief())
53  os << "\n";
54 
55  printSpaces(os, indentation);
56  os << "Section " << newSection << " PSet description:\n";
57  if (!dfh.brief())
58  os << "\n";
59 
60  DocFormatHelper new_dfh(dfh);
61  new_dfh.setSection(newSection);
62  new_dfh.setIndentation(indentation + DocFormatHelper::offsetSectionContent());
63  new_dfh.setParent(DocFormatHelper::OTHER);
64 
65  psetDesc_->print(os, new_dfh);
66  }
static int offsetSectionContent()
static void printSpaces(std::ostream &os, int n)
void printNestedContentBase_(std::ostream &os, bool optional, DocFormatHelper &dfh) const
void edm::AllowedLabelsDescription< ParameterSetDescription >::validateAllowedLabel_ ( std::string const &  allowedLabel,
ParameterSet pset,
std::set< std::string > &  validatedLabels 
) const
overrideprivatevirtual

Implements edm::AllowedLabelsDescriptionBase.

Definition at line 68 of file AllowedLabelsDescription.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getPSetForUpdate(), and edm::AllowedLabelsDescriptionBase::isTracked().

69  {
70  if (pset.existsAs<ParameterSet>(allowedLabel, isTracked())) {
71  validatedLabels.insert(allowedLabel);
72  if (psetDesc_) {
73  ParameterSet* containedPSet = pset.getPSetForUpdate(allowedLabel);
74  psetDesc_->validate(*containedPSet);
75  }
76  }
77  }

Member Data Documentation

Definition at line 67 of file AllowedLabelsDescription.h.