CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConfigurationDescriptions.h
Go to the documentation of this file.
1 #ifndef FWCore_ParameterSet_ConfigurationDescriptions_h
2 #define FWCore_ParameterSet_ConfigurationDescriptions_h
3 // -*- C++ -*-
4 //
5 // Package: ParameterSet
6 // Class : ConfigurationDescriptions
7 //
13 //
14 // Original Author: W. David Dagenhart
15 // Created: 17 December 2008
16 //
17 
19 
20 #include <vector>
21 #include <string>
22 #include <utility>
23 #include <iosfwd>
24 
25 namespace edm {
26 
28  public:
29 
30  ConfigurationDescriptions(std::string const& baseType);
31 
33 
34  // ---------------------------------------------------------
35  // These functions are used by module developers to create
36  // a description for a module.
37  // ---------------------------------------------------------
38 
39  std::string const& comment() const { return comment_; }
40  void setComment(std::string const & value);
41  void setComment(char const* value);
42 
43  void add(std::string const& label, ParameterSetDescription const& psetDescription);
44  void add(char const* label, ParameterSetDescription const& psetDescription);
45 
46  void addDefault(ParameterSetDescription const& psetDescription);
47 
48  // ---------------------------------------------------------
49  // These functions use the information in the descriptions
50  // ---------------------------------------------------------
51 
52  void validate(ParameterSet & pset, std::string const& moduleLabel) const;
53 
54  void writeCfis(std::string const& baseType,
55  std::string const& pluginName) const;
56 
57  void print(std::ostream & os,
58  std::string const& moduleLabel,
59  bool brief,
60  bool printOnlyLabels,
61  size_t lineWidth,
62  int indentation,
63  int iPlugin) const;
64 
65  // ---------------------------------------------------------
66 
67  private:
68 
70  public:
71  int iPlugin;
73  int iModule;
74  };
75 
76  static void writeCfiForLabel(std::pair<std::string, ParameterSetDescription> const& labelAndDesc,
77  std::string const& baseType,
78  std::string const& pluginName);
79 
80  void printForLabel(std::pair<std::string, ParameterSetDescription> const& labelAndDesc,
81  std::ostream & os,
82  std::string const& moduleLabel,
83  bool brief,
84  bool printOnlyLabels,
85  size_t lineWidth,
86  int indentationn,
87  DescriptionCounter & counter) const;
88 
89  void printForLabel(std::ostream & os,
90  std::string const& label,
92  std::string const& moduleLabel,
93  bool brief,
94  bool printOnlyLabels,
95  size_t lineWidth,
96  int indentationn,
97  DescriptionCounter & counter) const;
98 
99  std::string baseType_;
100 
101  std::vector<std::pair<std::string, ParameterSetDescription> > descriptions_;
102 
105 
106  std::string comment_;
107  };
108 }
109 
110 #endif
void writeCfis(std::string const &baseType, std::string const &pluginName) const
const std::string & label
Definition: MVAComputer.cc:186
void printForLabel(std::pair< std::string, ParameterSetDescription > const &labelAndDesc, std::ostream &os, std::string const &moduleLabel, bool brief, bool printOnlyLabels, size_t lineWidth, int indentationn, DescriptionCounter &counter) const
static void writeCfiForLabel(std::pair< std::string, ParameterSetDescription > const &labelAndDesc, std::string const &baseType, std::string const &pluginName)
ConfigurationDescriptions(std::string const &baseType)
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< std::pair< std::string, ParameterSetDescription > > descriptions_
tuple pset
Definition: CrabTask.py:85
void setComment(std::string const &value)
tuple description
Definition: idDealer.py:66
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void print(std::ostream &os, std::string const &moduleLabel, bool brief, bool printOnlyLabels, size_t lineWidth, int indentation, int iPlugin) const
void validate(ParameterSet &pset, std::string const &moduleLabel) const
std::string const & comment() const
const std::string * moduleLabel() const
Definition: HLTadd.h:40