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 "boost/shared_ptr.hpp"
13 
14 #include <iosfwd>
15 #include <string>
16 
17 namespace edm {
18 
19  // once a module is born, these parts of the module's product provenance
20  // are constant (change to ModuleDescription)
21 
22 
24  public:
25 
27 
28  ModuleDescription(std::string const& modName,
29  std::string const& modLabel);
30 
31  ModuleDescription(std::string const& modName,
32  std::string const& modLabel,
33  ProcessConfiguration const* procConfig);
34 
36  std::string const& modName,
37  std::string const& modLabel);
38 
40  std::string const& modName,
41  std::string const& modLabel,
42  ProcessConfiguration const* procConfig,
43  unsigned int modID);
44 
46 
47  void write(std::ostream& os) const;
48 
50  std::string const& moduleName() const {return moduleName_;}
51  std::string const& moduleLabel() const {return moduleLabel_;}
54  unsigned int id() const {return id_;}
56 
57  std::string const& processName() const;
58  std::string const& releaseVersion() const;
59  std::string const& passID() const;
60  ParameterSetID const& mainParameterSetID() const;
61 
62  // compiler-written copy c'tor, assignment, and d'tor are correct.
63 
64  bool operator<(ModuleDescription const& rh) const;
65 
66  bool operator==(ModuleDescription const& rh) const;
67 
68  bool operator!=(ModuleDescription const& rh) const;
69 
71  static unsigned int getUniqueID();
72 
74 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
75  static constexpr unsigned int invalidID() {
77  }
78 #else
79  static unsigned int invalidID();
80 #endif
81 
82  private:
83 
84  // ID of parameter set of the creator
86 
87  // The class name of the creator
89 
90  // A human friendly string that uniquely identifies the EDProducer
91  // and becomes part of the identity of a product that it produces
93 
94  // The process configuration.
96 
97  unsigned int id_;
98  };
99 
100  inline
101  std::ostream&
102  operator<<(std::ostream& os, ModuleDescription const& p) {
103  p.write(os);
104  return os;
105  }
106 
107 }
108 #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_
const T & max(const T &a, const T &b)
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
#define constexpr
ProcessConfiguration const & processConfiguration() const
unsigned int id() const
bool operator<(ModuleDescription const &rh) const