CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
virtual ParameterDescriptionNodeclone () const
 
- Public Member Functions inherited from edm::AllowedLabelsDescriptionBase
bool isTracked () const
 
ParameterTypes type () const
 
virtual ~AllowedLabelsDescriptionBase ()
 
- 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 ()
 
int howManyXORSubNodesExist (ParameterSet const &pset) const
 
bool partiallyExists (ParameterSet const &pset) const
 
void print (std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh)
 
void printNestedContent (std::ostream &os, bool optional, DocFormatHelper &dfh)
 
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 void printNestedContent_ (std::ostream &os, bool optional, DocFormatHelper &helper)
 
virtual void validateAllowedLabel_ (std::string const &allowedLabel, ParameterSet &pset, std::set< std::string > &validatedLabels) const
 

Private Attributes

value_ptr
< ParameterSetDescription
psetDesc_
 

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)
 
- Protected Attributes inherited from edm::ParameterDescriptionNode
std::string comment_
 

Detailed Description

template<>
class edm::AllowedLabelsDescription< ParameterSetDescription >

Definition at line 53 of file AllowedLabelsDescription.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file AllowedLabelsDescription.cc.

12  :
14  psetDesc_()
15  {
16  }
AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
edm::AllowedLabelsDescription< ParameterSetDescription >::AllowedLabelsDescription ( char const *  label,
bool  isTracked 
)

Definition at line 19 of file AllowedLabelsDescription.cc.

20  :
22  psetDesc_()
23  {
24  }
AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
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 
)

Member Function Documentation

Implements edm::ParameterDescriptionNode.

Definition at line 46 of file AllowedLabelsDescription.cc.

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

46  {
47  return new AllowedLabelsDescription(*this);
48  }
AllowedLabelsDescription(std::string const &label, bool isTracked)
void edm::AllowedLabelsDescription< ParameterSetDescription >::printNestedContent_ ( std::ostream &  os,
bool  optional,
DocFormatHelper helper 
)
privatevirtual

Reimplemented from edm::AllowedLabelsDescriptionBase.

Definition at line 52 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(), and edm::DocFormatHelper::TOP.

54  {
55 
56  printNestedContentBase_(os, optional, dfh);
57 
58  int indentation = dfh.indentation();
59  if (dfh.parent() != DocFormatHelper::TOP) {
61  }
62 
63  std::stringstream ss;
64  ss << dfh.section() << "." << dfh.counter() << ".1";
65  std::string newSection = ss.str();
66 
67  if (dfh.brief()) {
69  }
70  else {
71  dfh.indent2(os);
72  }
73  os << "see Section " << newSection << "\n";
74  if (!dfh.brief()) os << "\n";
75 
76  printSpaces(os, indentation);
77  os << "Section " << newSection
78  << " PSet description:\n";
79  if (!dfh.brief()) os << "\n";
80 
81  DocFormatHelper new_dfh(dfh);
82  new_dfh.setSection(newSection);
83  new_dfh.setIndentation(indentation + DocFormatHelper::offsetSectionContent());
84  new_dfh.setParent(DocFormatHelper::OTHER);
85 
86  psetDesc_->print(os, new_dfh);
87  }
void printNestedContentBase_(std::ostream &os, bool optional, DocFormatHelper &dfh)
static int offsetSectionContent()
static void printSpaces(std::ostream &os, int n)
void edm::AllowedLabelsDescription< ParameterSetDescription >::validateAllowedLabel_ ( std::string const &  allowedLabel,
ParameterSet pset,
std::set< std::string > &  validatedLabels 
) const
privatevirtual

Implements edm::AllowedLabelsDescriptionBase.

Definition at line 91 of file AllowedLabelsDescription.cc.

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

93  {
94  if (pset.existsAs<ParameterSet>(allowedLabel, isTracked())) {
95  validatedLabels.insert(allowedLabel);
96  if (psetDesc_) {
97  ParameterSet * containedPSet = pset.getPSetForUpdate(allowedLabel);
98  psetDesc_->validate(*containedPSet);
99  }
100  }
101  }

Member Data Documentation

Definition at line 82 of file AllowedLabelsDescription.h.