LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ModuleDescription.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_ModuleDescription_h
2 #define canvas_Persistency_Provenance_ModuleDescription_h
3 
4 /*----------------------------------------------------------------------
5 
6 ModuleDescription: The description of a producer module.
7 
8 ----------------------------------------------------------------------*/
9 
14 #include <iosfwd>
15 #include <string>
16 
17 // ----------------------------------------------------------------------
18 
19 namespace art {
20 
21  // once a module is born, these parts of the module's product provenance
22  // are constant (change to ModuleDescription)
23 
25  public:
26  explicit ModuleDescription() = default;
28  std::string const& modName,
29  std::string const& modLabel,
32 
33  // Feel free to use move semantics.
34 
35  void write(std::ostream& os) const;
36 
39  {
40  return parameterSetID_;
41  }
42  std::string const&
43  moduleName() const
44  {
45  return moduleName_;
46  }
47  std::string const&
48  moduleLabel() const
49  {
50  return moduleLabel_;
51  }
54  {
55  return processConfiguration_;
56  }
59  {
60  return processConfiguration().id();
61  }
62  std::string const&
63  processName() const
64  {
66  }
67  std::string const&
69  {
71  }
74  {
76  }
77 
78  bool operator<(ModuleDescription const& rh) const;
79  bool operator==(ModuleDescription const& rh) const;
80  bool operator!=(ModuleDescription const& rh) const;
81 
83  id() const
84  {
85  return id_;
86  } // Unique only within a process.
87 
89 
90  static constexpr ModuleDescriptionID
92  {
94  }
95 
96  private:
97  // ID of parameter set of the creator
99 
100  // The class name of the creator
101  std::string moduleName_{};
102 
103  // A human friendly string that uniquely identifies the EDProducer
104  // and becomes part of the identity of a product that it produces
105  std::string moduleLabel_{};
106 
107  // The process configuration.
109 
110  // Unique ID.
112  };
113 
114  inline std::ostream&
115  operator<<(std::ostream& os, ModuleDescription const& p)
116  {
117  p.write(os);
118  return os;
119  }
120 
121 } // art
122 
123  // ======================================================================
124 
125 #endif /* canvas_Persistency_Provenance_ModuleDescription_h */
126 
127 // Local Variables:
128 // mode: c++
129 // End:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
fhicl::ParameterSetID const & mainParameterSetID() const
static constexpr ModuleDescriptionID invalidID()
bool operator<(ModuleDescription const &rh) const
ReleaseVersion const & releaseVersion() const
bool operator==(ModuleDescription const &rh) const
ProcessConfigurationID id() const
Int_t max
Definition: plot.C:27
std::string const & releaseVersion() const
std::string const & moduleName() const
fhicl::ParameterSetID const & parameterSetID() const
std::string const & processName() const
std::string const & processName() const
ModuleDescriptionID id() const
std::string const & moduleLabel() const
ModuleDescriptionID id_
unsigned int ModuleDescriptionID
HLT enums.
ProcessConfiguration processConfiguration_
ProcessConfigurationID const processConfigurationID() const
fhicl::ParameterSetID parameterSetID_
void write(std::ostream &os) const
static ModuleDescriptionID getUniqueID()
bool operator!=(ModuleDescription const &rh) const
ProcessConfiguration const & processConfiguration() const
Definition: Hash.h:32
fhicl::ParameterSetID const & parameterSetID() const