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,
31  bool const parentageEnabled = true,
32  bool const rangesEnabled = true,
33  bool const dbEnabled = true,
35 
36  // Feel free to use move semantics.
37 
38  void write(std::ostream& os) const;
39 
42  {
43  return parameterSetID_;
44  }
45  std::string const&
46  moduleName() const
47  {
48  return moduleName_;
49  }
50  std::string const&
51  moduleLabel() const
52  {
53  return moduleLabel_;
54  }
57  {
58  return processConfiguration_;
59  }
62  {
63  return processConfiguration().id();
64  }
65  bool
67  {
68  return parentageEnabled_;
69  }
70  bool
71  rangesEnabled() const
72  {
73  return rangesEnabled_;
74  }
75  bool
76  dbEnabled() const
77  {
78  return dbEnabled_;
79  }
80  std::string const&
81  processName() const
82  {
84  }
85  std::string const&
87  {
89  }
92  {
94  }
95 
96  bool operator<(ModuleDescription const& rh) const;
97  bool operator==(ModuleDescription const& rh) const;
98  bool operator!=(ModuleDescription const& rh) const;
99 
101  id() const
102  {
103  return id_;
104  } // Unique only within a process.
105 
107 
108  static constexpr ModuleDescriptionID
110  {
112  }
113 
114  private:
115  // ID of parameter set of the creator
117 
118  // The class name of the creator
120 
121  // A human friendly string that uniquely identifies the EDProducer
122  // and becomes part of the identity of a product that it produces
124 
125  // The process configuration.
127 
128  bool parentageEnabled_{true};
129 
130  bool rangesEnabled_{true};
131 
132  bool dbEnabled_{true};
133 
134  // Unique ID.
136  };
137 
138  inline std::ostream&
139  operator<<(std::ostream& os, ModuleDescription const& p)
140  {
141  p.write(os);
142  return os;
143  }
144 
145 } // art
146 
147 // ======================================================================
148 
149 #endif /* canvas_Persistency_Provenance_ModuleDescription_h */
150 
151 // Local Variables:
152 // mode: c++
153 // End:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
fhicl::ParameterSetID const & mainParameterSetID() const
TH2 * rh
Definition: drawXsec.C:5
static constexpr ModuleDescriptionID invalidID()
bool parentageEnabled() const
const char * p
Definition: xmltok.h:285
bool operator<(ModuleDescription const &rh) const
ReleaseVersion const & releaseVersion() const
bool operator==(ModuleDescription const &rh) const
ProcessConfigurationID id() const
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_
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
static ModuleDescriptionID getUniqueID()
unsigned int ModuleDescriptionID
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
ProcessConfiguration processConfiguration_
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
ProcessConfigurationID const processConfigurationID() const
fhicl::ParameterSetID parameterSetID_
void write(std::ostream &os) const
bool operator!=(ModuleDescription const &rh) const
ProcessConfiguration const & processConfiguration() const
Definition: Hash.h:32
fhicl::ParameterSetID const & parameterSetID() const