CMS 3D CMS Logo

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

#include <AllowedLabelsDescription.h>

Inheritance diagram for edm::AllowedLabelsDescription< std::vector< ParameterSet > >:
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< std::vector< ParameterSet > >

Definition at line 71 of file AllowedLabelsDescription.h.

Constructor & Destructor Documentation

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

Definition at line 81 of file AllowedLabelsDescription.cc.

edm::AllowedLabelsDescription< std::vector< ParameterSet > >::AllowedLabelsDescription ( char const *  label,
bool  isTracked 
)

Definition at line 85 of file AllowedLabelsDescription.cc.

edm::AllowedLabelsDescription< std::vector< ParameterSet > >::AllowedLabelsDescription ( std::string const &  label,
ParameterSetDescription const &  value,
bool  isTracked 
)
edm::AllowedLabelsDescription< std::vector< ParameterSet > >::AllowedLabelsDescription ( char const *  label,
ParameterSetDescription const &  value,
bool  isTracked 
)

Definition at line 98 of file AllowedLabelsDescription.cc.

98 {}

Member Function Documentation

ParameterDescriptionNode * edm::AllowedLabelsDescription< std::vector< ParameterSet > >::clone ( void  ) const
overridevirtual

Implements edm::ParameterDescriptionNode.

Definition at line 100 of file AllowedLabelsDescription.cc.

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

100  {
101  return new AllowedLabelsDescription(*this);
102  }
AllowedLabelsDescription(std::string const &label, bool isTracked)
void edm::AllowedLabelsDescription< std::vector< ParameterSet > >::printNestedContent_ ( std::ostream &  os,
bool  optional,
DocFormatHelper helper 
) const
overrideprivatevirtual

Reimplemented from edm::ParameterDescriptionNode.

Definition at line 104 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.

106  {
107  printNestedContentBase_(os, optional, dfh);
108 
109  int indentation = dfh.indentation();
110  if (dfh.parent() != DocFormatHelper::TOP) {
111  indentation -= DocFormatHelper::offsetSectionContent();
112  }
113 
114  std::stringstream ss;
115  ss << dfh.section() << "." << dfh.counter() << ".1";
116  std::string newSection = ss.str();
117 
118  if (dfh.brief()) {
120  } else {
121  dfh.indent2(os);
122  }
123  os << "see Section " << newSection << "\n";
124  if (!dfh.brief())
125  os << "\n";
126 
127  printSpaces(os, indentation);
128  os << "Section " << newSection << " PSet description used to validate all elements of VPSet's:\n";
129  if (!dfh.brief())
130  os << "\n";
131 
132  DocFormatHelper new_dfh(dfh);
133  new_dfh.setSection(newSection);
134  new_dfh.setIndentation(indentation + DocFormatHelper::offsetSectionContent());
135  new_dfh.setParent(DocFormatHelper::OTHER);
136 
137  psetDesc_->print(os, new_dfh);
138  }
static int offsetSectionContent()
static void printSpaces(std::ostream &os, int n)
void printNestedContentBase_(std::ostream &os, bool optional, DocFormatHelper &dfh) const
void edm::AllowedLabelsDescription< std::vector< ParameterSet > >::validateAllowedLabel_ ( std::string const &  allowedLabel,
ParameterSet pset,
std::set< std::string > &  validatedLabels 
) const
overrideprivatevirtual

Implements edm::AllowedLabelsDescriptionBase.

Definition at line 140 of file AllowedLabelsDescription.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getPSetVectorForUpdate(), mps_fire::i, edm::AllowedLabelsDescriptionBase::isTracked(), edm::VParameterSetEntry::psetInVector(), and edm::VParameterSetEntry::size().

141  {
142  if (pset.existsAs<std::vector<ParameterSet> >(allowedLabel, isTracked())) {
143  validatedLabels.insert(allowedLabel);
144 
145  if (psetDesc_) {
146  VParameterSetEntry* vpsetEntry = pset.getPSetVectorForUpdate(allowedLabel);
147  assert(vpsetEntry);
148  for (unsigned i = 0; i < vpsetEntry->size(); ++i) {
149  psetDesc_->validate(vpsetEntry->psetInVector(i));
150  }
151  }
152  }
153  }

Member Data Documentation

Definition at line 92 of file AllowedLabelsDescription.h.