LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ModuleDescription.cc
Go to the documentation of this file.
2 #include "cetlib/MD5Digest.h"
3 
4 #include <atomic>
5 #include <ostream>
6 
8  fhicl::ParameterSetID const parameterSetID,
9  std::string const& modName,
10  std::string const& modLabel,
12  ModuleDescriptionID const id)
13  : parameterSetID_{parameterSetID}
14  , moduleName_{modName}
15  , moduleLabel_{modLabel}
16  , processConfiguration_{std::move(pc)}
17  , id_{id}
18 {}
19 
20 bool
22 {
23  if (moduleLabel() < rh.moduleLabel())
24  return true;
25  if (rh.moduleLabel() < moduleLabel())
26  return false;
27  if (processName() < rh.processName())
28  return true;
29  if (rh.processName() < processName())
30  return false;
31  if (moduleName() < rh.moduleName())
32  return true;
33  if (rh.moduleName() < moduleName())
34  return false;
35  if (parameterSetID() < rh.parameterSetID())
36  return true;
37  if (rh.parameterSetID() < parameterSetID())
38  return false;
39  if (releaseVersion() < rh.releaseVersion())
40  return true;
41  return false;
42 }
43 
44 bool
46 {
47  return !((*this) < rh || rh < (*this));
48 }
49 
50 bool
52 {
53  return !operator==(rh);
54 }
55 
56 void
57 art::ModuleDescription::write(std::ostream& os) const
58 {
59  os << "Module type=" << moduleName() << ", "
60  << "Module label=" << moduleLabel() << ", "
61  << "Parameter Set ID=" << parameterSetID() << ", "
62  << "Process name=" << processName() << ", "
63  << "Release Version=" << releaseVersion() << ", "
64  << "Main Parameter Set ID=" << mainParameterSetID();
65 }
66 
67 static std::atomic<art::ModuleDescriptionID> s_id{0u};
68 
71 {
72  return ++s_id;
73 }
fhicl::ParameterSetID const & mainParameterSetID() const
static std::atomic< art::ModuleDescriptionID > s_id
bool operator<(ModuleDescription const &rh) const
bool operator==(ModuleDescription const &rh) const
std::string const & releaseVersion() const
std::string const & moduleName() const
fhicl::ParameterSetID const & parameterSetID() const
std::string const & processName() const
std::string const & moduleLabel() const
ModuleDescriptionID id_
unsigned int ModuleDescriptionID
ProcessConfiguration processConfiguration_
void write(std::ostream &os) const
static ModuleDescriptionID getUniqueID()
bool operator!=(ModuleDescription const &rh) const