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< 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)
 
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< std::vector< ParameterSet > >

Definition at line 86 of file AllowedLabelsDescription.h.

Constructor & Destructor Documentation

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

Definition at line 106 of file AllowedLabelsDescription.cc.

107  :
109  psetDesc_()
110  {
111  }
AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
edm::AllowedLabelsDescription< std::vector< ParameterSet > >::AllowedLabelsDescription ( char const *  label,
bool  isTracked 
)

Definition at line 114 of file AllowedLabelsDescription.cc.

115  :
117  psetDesc_()
118  {
119  }
AllowedLabelsDescriptionBase(std::string const &label, ParameterTypes iType, bool isTracked)
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 
)

Member Function Documentation

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

Implements edm::ParameterDescriptionNode.

Definition at line 141 of file AllowedLabelsDescription.cc.

141  {
142  return new AllowedLabelsDescription(*this);
143  }
AllowedLabelsDescription(std::string const &label, bool isTracked)
void edm::AllowedLabelsDescription< std::vector< ParameterSet > >::printNestedContent_ ( std::ostream &  os,
bool  optional,
DocFormatHelper helper 
)
privatevirtual

Reimplemented from edm::AllowedLabelsDescriptionBase.

Definition at line 147 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::DocFormatHelper::section(), edm::DocFormatHelper::setIndentation(), edm::DocFormatHelper::setParent(), edm::DocFormatHelper::setSection(), and edm::DocFormatHelper::TOP.

149  {
150 
151  printNestedContentBase_(os, optional, dfh);
152 
153  int indentation = dfh.indentation();
154  if (dfh.parent() != DocFormatHelper::TOP) {
155  indentation -= DocFormatHelper::offsetSectionContent();
156  }
157 
158  std::stringstream ss;
159  ss << dfh.section() << "." << dfh.counter() << ".1";
160  std::string newSection = ss.str();
161 
162  if (dfh.brief()) {
164  }
165  else {
166  dfh.indent2(os);
167  }
168  os << "see Section " << newSection << "\n";
169  if (!dfh.brief()) os << "\n";
170 
171  printSpaces(os, indentation);
172  os << "Section " << newSection
173  << " PSet description used to validate all elements of VPSet's:\n";
174  if (!dfh.brief()) os << "\n";
175 
176  DocFormatHelper new_dfh(dfh);
177  new_dfh.setSection(newSection);
178  new_dfh.setIndentation(indentation + DocFormatHelper::offsetSectionContent());
179  new_dfh.setParent(DocFormatHelper::OTHER);
180 
181  psetDesc_->print(os, new_dfh);
182  }
void printNestedContentBase_(std::ostream &os, bool optional, DocFormatHelper &dfh)
static int offsetSectionContent()
static void printSpaces(std::ostream &os, int n)
void edm::AllowedLabelsDescription< std::vector< ParameterSet > >::validateAllowedLabel_ ( std::string const &  allowedLabel,
ParameterSet pset,
std::set< std::string > &  validatedLabels 
) const
privatevirtual

Implements edm::AllowedLabelsDescriptionBase.

Definition at line 186 of file AllowedLabelsDescription.cc.

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

188  {
189  if (pset.existsAs<std::vector<ParameterSet> >(allowedLabel, isTracked())) {
190  validatedLabels.insert(allowedLabel);
191 
192  if (psetDesc_) {
193  VParameterSetEntry * vpsetEntry = pset.getPSetVectorForUpdate(allowedLabel);
194  assert(vpsetEntry);
195  for (unsigned i = 0; i < vpsetEntry->size(); ++i) {
196  psetDesc_->validate(vpsetEntry->psetInVector(i));
197  }
198  }
199  }
200  }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

Definition at line 115 of file AllowedLabelsDescription.h.