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
edm::ModuleDescription::moduleLabel
std::string const & moduleLabel() const
Definition: ModuleDescription.h:43
edm::ModuleDescription::~ModuleDescription
~ModuleDescription()
Definition: ModuleDescription.cc:43
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ModuleDescription::invalidID
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
Definition: ModuleDescription.h:66
edm::ModuleDescription::moduleName
std::string const & moduleName() const
Definition: ModuleDescription.h:42
edm::ModuleDescription::processConfigurationPtr_
ProcessConfiguration const * processConfigurationPtr_
Definition: ModuleDescription.h:80
edm::ModuleDescription::getUniqueID
static unsigned int getUniqueID()
Returns a unique id each time called. Intended to be passed to ModuleDescription's constructor's modI...
Definition: ModuleDescription.cc:87
edm::ModuleDescription::processName
std::string const & processName() const
Definition: ModuleDescription.cc:47
edm::ModuleDescription::parameterSetID_
ParameterSetID parameterSetID_
Definition: ModuleDescription.h:70
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
edm::ModuleDescription::processConfiguration
ProcessConfiguration const & processConfiguration() const
Definition: ModuleDescription.cc:45
edm::ModuleDescription::operator==
bool operator==(ModuleDescription const &rh) const
Definition: ModuleDescription.cc:83
ProcessConfiguration.h
edm::Hash< ParameterSetType >
edm::ModuleDescription::moduleLabel_
std::string moduleLabel_
Definition: ModuleDescription.h:77
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ModuleDescription::releaseVersion
std::string const & releaseVersion() const
Definition: ModuleDescription.cc:49
edm::ModuleDescription::operator!=
bool operator!=(ModuleDescription const &rh) const
Definition: ModuleDescription.cc:85
edm::ModuleDescription::id_
unsigned int id_
Definition: ModuleDescription.h:82
edm::ModuleDescription::mainParameterSetID
ParameterSetID const & mainParameterSetID() const
Definition: ModuleDescription.cc:53
edm::ModuleDescription::ModuleDescription
ModuleDescription()
Definition: ModuleDescription.cc:16
ParameterSetID.h
edm::ModuleDescription::operator<
bool operator<(ModuleDescription const &rh) const
Definition: ModuleDescription.cc:57
edm::ModuleDescription::moduleName_
std::string moduleName_
Definition: ModuleDescription.h:73
edm::ModuleDescription::parameterSetID
ParameterSetID const & parameterSetID() const
Definition: ModuleDescription.h:41
edm::ModuleDescription::passID
std::string const & passID() const
Definition: ModuleDescription.cc:51
edm::ModuleDescription::write
void write(std::ostream &os) const
Definition: ModuleDescription.cc:89
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::ModuleDescription::id
unsigned int id() const
Definition: ModuleDescription.h:46