CMS 3D CMS Logo

ModuleDescription.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_ModuleDescription_h
2 #define DataFormats_Provenance_ModuleDescription_h
3 
4 /*----------------------------------------------------------------------
5 
6 ModuleDescription: The description of a producer module.
7 
8 ----------------------------------------------------------------------*/
11 
12 #include <iosfwd>
13 #include <limits>
14 #include <string>
15 
16 namespace edm {
17 
18  // once a module is born, these parts of the module's product provenance
19  // are constant (change to ModuleDescription)
20 
22  public:
24 
25  ModuleDescription(std::string const& modName, std::string const& modLabel);
26 
27  ModuleDescription(std::string const& modName, std::string const& modLabel, ProcessConfiguration const* procConfig);
28 
29  ModuleDescription(ParameterSetID const& pid, std::string const& modName, std::string const& modLabel);
30 
32  std::string const& modName,
33  std::string const& modLabel,
34  ProcessConfiguration const* procConfig,
35  unsigned int modID);
36 
38 
39  void write(std::ostream& os) const;
40 
41  ParameterSetID const& parameterSetID() const { return parameterSetID_; }
42  std::string const& moduleName() const { return moduleName_; }
43  std::string const& moduleLabel() const { return moduleLabel_; }
46  unsigned int id() const { return id_; }
48 
49  std::string const& processName() const;
50  std::string const& releaseVersion() const;
51  std::string const& passID() const;
52  ParameterSetID const& mainParameterSetID() const;
53 
54  // compiler-written copy c'tor, assignment, and d'tor are correct.
55 
56  bool operator<(ModuleDescription const& rh) const;
57 
58  bool operator==(ModuleDescription const& rh) const;
59 
60  bool operator!=(ModuleDescription const& rh) const;
61 
63  static unsigned int getUniqueID();
64 
66  static constexpr unsigned int invalidID() { return std::numeric_limits<unsigned int>::max(); }
67 
68  private:
69  // ID of parameter set of the creator
71 
72  // The class name of the creator
74 
75  // A human friendly string that uniquely identifies the EDProducer
76  // and becomes part of the identity of a product that it produces
78 
79  // The process configuration.
81 
82  unsigned int id_;
83  };
84 
85  inline std::ostream& operator<<(std::ostream& os, ModuleDescription const& p) {
86  p.write(os);
87  return os;
88  }
89 
90 } // namespace edm
91 #endif
ParameterSetID const & mainParameterSetID() const
std::string const & processName() const
std::string const & moduleName() const
std::string const & passID() const
std::string const & moduleLabel() const
static unsigned int getUniqueID()
Returns a unique id each time called. Intended to be passed to ModuleDescription&#39;s constructor&#39;s modI...
ProcessConfiguration const * processConfigurationPtr_
std::string const & releaseVersion() const
bool operator!=(ModuleDescription const &rh) const
bool operator==(ModuleDescription const &rh) const
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
ParameterSetID parameterSetID_
HLT enums.
ParameterSetID const & parameterSetID() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
void write(std::ostream &os) const
#define constexpr
ProcessConfiguration const & processConfiguration() const
unsigned int id() const
bool operator<(ModuleDescription const &rh) const