LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::ModuleDescription Class Reference

#include "ModuleDescription.h"

Public Member Functions

 ModuleDescription ()=default
 
 ModuleDescription (fhicl::ParameterSetID parameterSetID, std::string const &modName, std::string const &modLabel, ProcessConfiguration pc, ModuleDescriptionID id=getUniqueID())
 
void write (std::ostream &os) const
 
fhicl::ParameterSetID const & parameterSetID () const
 
std::string const & moduleName () const
 
std::string const & moduleLabel () const
 
ProcessConfiguration const & processConfiguration () const
 
ProcessConfigurationID const processConfigurationID () const
 
std::string const & processName () const
 
std::string const & releaseVersion () const
 
fhicl::ParameterSetID const & mainParameterSetID () const
 
bool operator< (ModuleDescription const &rh) const
 
bool operator== (ModuleDescription const &rh) const
 
bool operator!= (ModuleDescription const &rh) const
 
ModuleDescriptionID id () const
 

Static Public Member Functions

static ModuleDescriptionID getUniqueID ()
 
static constexpr ModuleDescriptionID invalidID ()
 

Private Attributes

fhicl::ParameterSetID parameterSetID_ {}
 
std::string moduleName_ {}
 
std::string moduleLabel_ {}
 
ProcessConfiguration processConfiguration_ {}
 
ModuleDescriptionID id_ {invalidID()}
 

Detailed Description

Definition at line 24 of file ModuleDescription.h.

Constructor & Destructor Documentation

art::ModuleDescription::ModuleDescription ( )
explicitdefault
art::ModuleDescription::ModuleDescription ( fhicl::ParameterSetID  parameterSetID,
std::string const &  modName,
std::string const &  modLabel,
ProcessConfiguration  pc,
ModuleDescriptionID  id = getUniqueID() 
)
explicit

Definition at line 7 of file ModuleDescription.cc.

References id_, moduleLabel_, moduleName_, and processConfiguration_.

13  : parameterSetID_{parameterSetID}
14  , moduleName_{modName}
15  , moduleLabel_{modLabel}
16  , processConfiguration_{std::move(pc)}
17  , id_{id}
18 {}
ModuleDescriptionID id_
ProcessConfiguration processConfiguration_
fhicl::ParameterSetID parameterSetID_

Member Function Documentation

art::ModuleDescriptionID art::ModuleDescription::getUniqueID ( )
static

Definition at line 70 of file ModuleDescription.cc.

References s_id.

Referenced by id().

71 {
72  return ++s_id;
73 }
static std::atomic< art::ModuleDescriptionID > s_id
ModuleDescriptionID art::ModuleDescription::id ( ) const
inline

Definition at line 83 of file ModuleDescription.h.

References getUniqueID(), and id_.

Referenced by art::Source< T >::finishProductRegistration_(), art::PathsInfo::makeWorker_(), and art::ServicesManager::registerProducts().

84  {
85  return id_;
86  } // Unique only within a process.
ModuleDescriptionID id_
static constexpr ModuleDescriptionID art::ModuleDescription::invalidID ( )
inlinestatic

Definition at line 91 of file ModuleDescription.h.

References max.

Referenced by art::RootOutput::doRegisterProducts(), and art::Source< T >::finishProductRegistration_().

92  {
94  }
Int_t max
Definition: plot.C:27
fhicl::ParameterSetID const& art::ModuleDescription::mainParameterSetID ( ) const
inline
bool art::ModuleDescription::operator!= ( ModuleDescription const &  rh) const

Definition at line 51 of file ModuleDescription.cc.

References operator==().

Referenced by mainParameterSetID().

52 {
53  return !operator==(rh);
54 }
bool operator==(ModuleDescription const &rh) const
bool art::ModuleDescription::operator< ( ModuleDescription const &  rh) const

Definition at line 21 of file ModuleDescription.cc.

References moduleLabel(), moduleName(), parameterSetID(), processName(), and releaseVersion().

Referenced by mainParameterSetID().

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 }
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
bool art::ModuleDescription::operator== ( ModuleDescription const &  rh) const

Definition at line 45 of file ModuleDescription.cc.

Referenced by mainParameterSetID(), and operator!=().

46 {
47  return !((*this) < rh || rh < (*this));
48 }
fhicl::ParameterSetID const& art::ModuleDescription::parameterSetID ( ) const
inline

Definition at line 38 of file ModuleDescription.h.

References parameterSetID_.

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), operator<(), and write().

39  {
40  return parameterSetID_;
41  }
fhicl::ParameterSetID parameterSetID_
ProcessConfigurationID const art::ModuleDescription::processConfigurationID ( ) const
inline

Definition at line 58 of file ModuleDescription.h.

References art::ProcessConfiguration::id(), and processConfiguration().

59  {
60  return processConfiguration().id();
61  }
ProcessConfigurationID id() const
ProcessConfiguration const & processConfiguration() const
std::string const& art::ModuleDescription::processName ( ) const
inline
std::string const& art::ModuleDescription::releaseVersion ( ) const
inline

Definition at line 68 of file ModuleDescription.h.

References processConfiguration(), and art::ProcessConfiguration::releaseVersion().

Referenced by operator<(), and write().

69  {
71  }
ReleaseVersion const & releaseVersion() const
ProcessConfiguration const & processConfiguration() const
void art::ModuleDescription::write ( std::ostream &  os) const

Definition at line 57 of file ModuleDescription.cc.

References mainParameterSetID(), moduleLabel(), moduleName(), parameterSetID(), processName(), and releaseVersion().

Referenced by art::operator<<().

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 }
fhicl::ParameterSetID const & mainParameterSetID() 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

Member Data Documentation

ModuleDescriptionID art::ModuleDescription::id_ {invalidID()}
private

Definition at line 111 of file ModuleDescription.h.

Referenced by id(), and ModuleDescription().

std::string art::ModuleDescription::moduleLabel_ {}
private

Definition at line 105 of file ModuleDescription.h.

Referenced by ModuleDescription(), and moduleLabel().

std::string art::ModuleDescription::moduleName_ {}
private

Definition at line 101 of file ModuleDescription.h.

Referenced by ModuleDescription(), and moduleName().

fhicl::ParameterSetID art::ModuleDescription::parameterSetID_ {}
private

Definition at line 98 of file ModuleDescription.h.

Referenced by parameterSetID().

ProcessConfiguration art::ModuleDescription::processConfiguration_ {}
private

Definition at line 108 of file ModuleDescription.h.

Referenced by ModuleDescription(), and processConfiguration().


The documentation for this class was generated from the following files: