test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21 
23  public:
24 
26 
27  ModuleDescription(std::string const& modName,
28  std::string const& modLabel);
29 
30  ModuleDescription(std::string const& modName,
31  std::string const& modLabel,
32  ProcessConfiguration const* procConfig);
33 
35  std::string const& modName,
36  std::string const& modLabel);
37 
39  std::string const& modName,
40  std::string const& modLabel,
41  ProcessConfiguration const* procConfig,
42  unsigned int modID);
43 
45 
46  void write(std::ostream& os) const;
47 
49  std::string const& moduleName() const {return moduleName_;}
50  std::string const& moduleLabel() const {return moduleLabel_;}
53  unsigned int id() const {return id_;}
55 
56  std::string const& processName() const;
57  std::string const& releaseVersion() const;
58  std::string const& passID() const;
59  ParameterSetID const& mainParameterSetID() const;
60 
61  // compiler-written copy c'tor, assignment, and d'tor are correct.
62 
63  bool operator<(ModuleDescription const& rh) const;
64 
65  bool operator==(ModuleDescription const& rh) const;
66 
67  bool operator!=(ModuleDescription const& rh) const;
68 
70  static unsigned int getUniqueID();
71 
73  static constexpr unsigned int invalidID() {
75  }
76 
77  private:
78 
79  // ID of parameter set of the creator
81 
82  // The class name of the creator
84 
85  // A human friendly string that uniquely identifies the EDProducer
86  // and becomes part of the identity of a product that it produces
88 
89  // The process configuration.
91 
92  unsigned int id_;
93  };
94 
95  inline
96  std::ostream&
97  operator<<(std::ostream& os, ModuleDescription const& p) {
98  p.write(os);
99  return os;
100  }
101 
102 }
103 #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...
#define constexpr
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_
tuple pid
Definition: sysUtil.py:22
ParameterSetID const & parameterSetID() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
void write(std::ostream &os) const
ProcessConfiguration const & processConfiguration() const
unsigned int id() const
bool operator<(ModuleDescription const &rh) const