CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::ModuleDescription Class Reference

#include <ModuleDescription.h>

Public Member Functions

unsigned int id () const
 
ParameterSetID const & mainParameterSetID () const
 
 ModuleDescription ()
 
 ModuleDescription (std::string const &modName, std::string const &modLabel)
 
 ModuleDescription (std::string const &modName, std::string const &modLabel, ProcessConfiguration const *procConfig)
 
 ModuleDescription (ParameterSetID const &pid, std::string const &modName, std::string const &modLabel)
 
 ModuleDescription (ParameterSetID const &pid, std::string const &modName, std::string const &modLabel, ProcessConfiguration const *procConfig, unsigned int modID)
 
std::string const & moduleLabel () const
 
std::string const & moduleName () const
 
bool operator!= (ModuleDescription const &rh) const
 
bool operator< (ModuleDescription const &rh) const
 
bool operator== (ModuleDescription const &rh) const
 
ParameterSetID const & parameterSetID () const
 
std::string const & passID () const
 
ProcessConfiguration const & processConfiguration () const
 
std::string const & processName () const
 
std::string const & releaseVersion () const
 
void write (std::ostream &os) const
 
 ~ModuleDescription ()
 

Static Public Member Functions

static unsigned int getUniqueID ()
 Returns a unique id each time called. Intended to be passed to ModuleDescription's constructor's modID argument. Thread safe. More...
 
static constexpr unsigned int invalidID ()
 Returns a value identifying an invalid id (the max unsigned int value) More...
 

Private Attributes

unsigned int id_
 
std::string moduleLabel_
 
std::string moduleName_
 
ParameterSetID parameterSetID_
 
ProcessConfiguration const * processConfigurationPtr_
 

Detailed Description

Definition at line 23 of file ModuleDescription.h.

Constructor & Destructor Documentation

edm::ModuleDescription::ModuleDescription ( )

Definition at line 16 of file ModuleDescription.cc.

16  :
18  moduleName_(),
19  moduleLabel_(),
20  processConfigurationPtr_(nullptr),
21  id_(invalidID()){}
ProcessConfiguration const * processConfigurationPtr_
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
ParameterSetID parameterSetID_
edm::ModuleDescription::ModuleDescription ( std::string const &  modName,
std::string const &  modLabel 
)

Definition at line 40 of file ModuleDescription.cc.

References invalidID().

42  : ModuleDescription{ParameterSetID(), modName, modLabel, nullptr, invalidID()} {}
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
Hash< ParameterSetType > ParameterSetID
edm::ModuleDescription::ModuleDescription ( std::string const &  modName,
std::string const &  modLabel,
ProcessConfiguration const *  procConfig 
)

Definition at line 44 of file ModuleDescription.cc.

References invalidID().

47  : ModuleDescription{ParameterSetID(), modName, modLabel, procConfig, invalidID()} {}
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
Hash< ParameterSetType > ParameterSetID
edm::ModuleDescription::ModuleDescription ( ParameterSetID const &  pid,
std::string const &  modName,
std::string const &  modLabel 
)

Definition at line 23 of file ModuleDescription.cc.

References invalidID(), and sysUtil::pid.

26  : ModuleDescription{pid, modName, modLabel, nullptr, invalidID()} {}
static constexpr unsigned int invalidID()
Returns a value identifying an invalid id (the max unsigned int value)
tuple pid
Definition: sysUtil.py:22
edm::ModuleDescription::ModuleDescription ( ParameterSetID const &  pid,
std::string const &  modName,
std::string const &  modLabel,
ProcessConfiguration const *  procConfig,
unsigned int  modID 
)

Definition at line 28 of file ModuleDescription.cc.

33  :
35  moduleName_(modName),
36  moduleLabel_(modLabel),
37  processConfigurationPtr_(procConfig),
38  id_(iID){}
ProcessConfiguration const * processConfigurationPtr_
ParameterSetID parameterSetID_
tuple pid
Definition: sysUtil.py:22
edm::ModuleDescription::~ModuleDescription ( )

Definition at line 49 of file ModuleDescription.cc.

49 {}

Member Function Documentation

unsigned int edm::ModuleDescription::getUniqueID ( )
static

Returns a unique id each time called. Intended to be passed to ModuleDescription's constructor's modID argument. Thread safe.

Definition at line 103 of file ModuleDescription.cc.

References s_id.

Referenced by edm::Maker::createModuleDescription(), edm::makeInput(), and FastTimerService::preallocate().

103  {
104  return s_id++;
105  }
static std::atomic< unsigned int > s_id
unsigned int edm::ModuleDescription::id ( void  ) const
inline

A unique ID for a module declared in the Process. The id is only unique for the Process and not across different Processes. If the id is invalid, will return the max unsigned int value.

Definition at line 54 of file ModuleDescription.h.

References id_.

Referenced by DQMEDAnalyzer::beginRun(), DQMEDAnalyzer::endLuminosityBlockSummary(), DQMEDAnalyzer::endRunSummary(), edm::service::MessageLogger::establishModule(), edm::service::SimpleMemoryCheck::postModule(), edm::service::Tracer::postModuleBeginJob(), edm::service::Tracer::postModuleBeginStream(), edm::service::Tracer::postModuleConstruction(), edm::service::Tracer::postModuleEndJob(), edm::service::Tracer::postModuleEndStream(), edm::service::Tracer::postModuleEvent(), FastTimerService::postModuleEvent(), edm::service::Tracer::postModuleEventDelayedGet(), FastTimerService::postModuleEventDelayedGet(), edm::service::Tracer::postModuleGlobalBeginLumi(), edm::service::Tracer::postModuleGlobalBeginRun(), edm::service::Tracer::postModuleGlobalEndLumi(), edm::service::Tracer::postModuleGlobalEndRun(), edm::service::Tracer::postModuleStreamBeginLumi(), edm::service::Tracer::postModuleStreamBeginRun(), edm::service::Tracer::postModuleStreamEndLumi(), edm::service::Tracer::postModuleStreamEndRun(), edm::service::SimpleMemoryCheck::preModule(), edm::service::Tracer::preModuleBeginJob(), FastTimerService::preModuleBeginJob(), edm::service::Tracer::preModuleBeginStream(), edm::service::Tracer::preModuleConstruction(), edm::service::Tracer::preModuleEndJob(), edm::service::Tracer::preModuleEndStream(), edm::service::Tracer::preModuleEvent(), FastTimerService::preModuleEvent(), edm::service::Tracer::preModuleEventDelayedGet(), FastTimerService::preModuleEventDelayedGet(), edm::service::Tracer::preModuleGlobalBeginLumi(), edm::service::Tracer::preModuleGlobalBeginRun(), edm::service::Tracer::preModuleGlobalEndLumi(), edm::service::Tracer::preModuleGlobalEndRun(), edm::service::Tracer::preModuleStreamBeginLumi(), edm::service::Tracer::preModuleStreamBeginRun(), edm::service::Tracer::preModuleStreamEndLumi(), edm::service::Tracer::preModuleStreamEndRun(), and FastTimerService::queryModuleTime().

54 {return id_;}
static constexpr unsigned int edm::ModuleDescription::invalidID ( )
inlinestatic

Returns a value identifying an invalid id (the max unsigned int value)

Definition at line 75 of file ModuleDescription.h.

References max().

Referenced by ModuleDescription().

75  {
77  }
const T & max(const T &a, const T &b)
ParameterSetID const & edm::ModuleDescription::mainParameterSetID ( ) const

Definition at line 72 of file ModuleDescription.cc.

References edm::ProcessConfiguration::parameterSetID(), and processConfiguration().

72  {
74  }
ParameterSetID const & parameterSetID() const
ProcessConfiguration const & processConfiguration() const
std::string const& edm::ModuleDescription::moduleLabel ( ) const
inline

Definition at line 51 of file ModuleDescription.h.

References moduleLabel_.

Referenced by edm::ProductRegistryHelper::addToRegistry(), edm::UnscheduledCallProducer::addWorker(), edm::ScheduleInfo::availableModuleLabels(), edm::Worker::beginJob(), edm::Worker::beginStream(), edm::Worker::endJob(), edm::Worker::endStream(), edm::service::MessageLogger::establishModule(), edm::Path::exceptionContext(), edm::fillModuleInPathSummary(), edm::fillModuleInPathTimingSummary(), edm::fillWorkerSummaryAux(), edm::fillWorkerTimingSummaryAux(), HLTFilter::moduleLabel(), HLTStreamFilter::moduleLabel(), HLTHighLevel::moduleLabel(), Timer::newTimingMeasurement(), operator<(), edm::ScheduleInfo::parametersForModule(), TriggerResultsFilterFromDB::pathsFromSetup(), edm::service::EnableFloatingPointExceptions::postActions(), edm::service::PathTimerService::postModule(), edm::service::SimpleMemoryCheck::postModule(), edm::service::SimpleMemoryCheck::postModuleBeginJob(), edm::service::RandomNumberGeneratorService::postModuleBeginJob(), edm::service::Tracer::postModuleBeginJob(), edm::service::RandomNumberGeneratorService::postModuleBeginRun(), edm::service::Tracer::postModuleBeginStream(), edm::service::SimpleMemoryCheck::postModuleConstruction(), edm::service::RandomNumberGeneratorService::postModuleConstruction(), edm::service::Tracer::postModuleConstruction(), edm::service::RandomNumberGeneratorService::postModuleEndJob(), edm::service::Tracer::postModuleEndJob(), edm::service::RandomNumberGeneratorService::postModuleEndLumi(), edm::service::RandomNumberGeneratorService::postModuleEndRun(), edm::service::Tracer::postModuleEndStream(), edm::service::Tracer::postModuleEvent(), FastTimerService::postModuleEvent(), edm::service::Tracer::postModuleEventDelayedGet(), FastTimerService::postModuleEventDelayedGet(), edm::service::Tracer::postModuleGlobalBeginLumi(), edm::service::Tracer::postModuleGlobalBeginRun(), edm::service::Tracer::postModuleGlobalEndLumi(), edm::service::Tracer::postModuleGlobalEndRun(), edm::service::Tracer::postModuleStreamBeginLumi(), edm::service::Tracer::postModuleStreamBeginRun(), edm::service::Tracer::postModuleStreamEndLumi(), edm::service::Tracer::postModuleStreamEndRun(), edm::service::SimpleMemoryCheck::postSourceConstruction(), edm::service::EnableFloatingPointExceptions::preActions(), evf::MicroStateServiceClassic::preModule(), InputTagDistributorService::preModule(), VariableHelperService::preModule(), edm::service::RandomNumberGeneratorService::preModule(), edm::service::RandomNumberGeneratorService::preModuleBeginJob(), edm::service::Tracer::preModuleBeginJob(), FastTimerService::preModuleBeginJob(), edm::service::RandomNumberGeneratorService::preModuleBeginLumi(), edm::service::RandomNumberGeneratorService::preModuleBeginRun(), edm::service::Tracer::preModuleBeginStream(), edm::service::RandomNumberGeneratorService::preModuleConstruction(), edm::service::Tracer::preModuleConstruction(), edm::service::RandomNumberGeneratorService::preModuleEndJob(), edm::service::Tracer::preModuleEndJob(), edm::service::RandomNumberGeneratorService::preModuleEndLumi(), edm::service::RandomNumberGeneratorService::preModuleEndRun(), edm::service::Tracer::preModuleEndStream(), edm::service::Tracer::preModuleEvent(), FastTimerService::preModuleEvent(), edm::service::Tracer::preModuleEventDelayedGet(), FastTimerService::preModuleEventDelayedGet(), edm::service::Tracer::preModuleGlobalBeginLumi(), edm::service::Tracer::preModuleGlobalBeginRun(), edm::service::Tracer::preModuleGlobalEndLumi(), edm::service::Tracer::preModuleGlobalEndRun(), edm::service::Tracer::preModuleStreamBeginLumi(), edm::service::Tracer::preModuleStreamBeginRun(), edm::service::Tracer::preModuleStreamEndLumi(), edm::service::Tracer::preModuleStreamEndRun(), edm::service::SimpleMemoryCheck::preSourceConstruction(), FastTimerService::queryModuleTime(), edm::StreamerOutputModuleBase::serializeRegistry(), TFileService::setDirectoryName(), evf::MicroStateServiceClassic::setMicroState(), edm::Maker::throwConfigurationException(), and write().

51 {return moduleLabel_;}
std::string const& edm::ModuleDescription::moduleName ( ) const
inline
bool edm::ModuleDescription::operator!= ( ModuleDescription const &  rh) const

Definition at line 98 of file ModuleDescription.cc.

98  {
99  return !((*this) == rh);
100  }
bool edm::ModuleDescription::operator< ( ModuleDescription const &  rh) const

Definition at line 77 of file ModuleDescription.cc.

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

77  {
78  if (moduleLabel() < rh.moduleLabel()) return true;
79  if (rh.moduleLabel() < moduleLabel()) return false;
80  if (processName() < rh.processName()) return true;
81  if (rh.processName() < processName()) return false;
82  if (moduleName() < rh.moduleName()) return true;
83  if (rh.moduleName() < moduleName()) return false;
84  if (parameterSetID() < rh.parameterSetID()) return true;
85  if (rh.parameterSetID() < parameterSetID()) return false;
86  if (releaseVersion() < rh.releaseVersion()) return true;
87  if (rh.releaseVersion() < releaseVersion()) return false;
88  if (passID() < rh.passID()) return true;
89  return false;
90  }
std::string const & processName() const
std::string const & moduleName() const
std::string const & passID() const
std::string const & moduleLabel() const
std::string const & releaseVersion() const
ParameterSetID const & parameterSetID() const
bool edm::ModuleDescription::operator== ( ModuleDescription const &  rh) const

Definition at line 93 of file ModuleDescription.cc.

93  {
94  return !((*this) < rh || rh < (*this));
95  }
ParameterSetID const& edm::ModuleDescription::parameterSetID ( ) const
inline

Definition at line 49 of file ModuleDescription.h.

References parameterSetID_.

Referenced by edm::ProductRegistryHelper::addToRegistry(), operator<(), and write().

49 {return parameterSetID_;}
ParameterSetID parameterSetID_
std::string const & edm::ModuleDescription::passID ( ) const

Definition at line 67 of file ModuleDescription.cc.

References edm::ProcessConfiguration::passID(), and processConfiguration().

Referenced by operator<().

67  {
68  return processConfiguration().passID();
69  }
PassID const & passID() const
ProcessConfiguration const & processConfiguration() const
ProcessConfiguration const & edm::ModuleDescription::processConfiguration ( ) const

Definition at line 52 of file ModuleDescription.cc.

References processConfigurationPtr_.

Referenced by mainParameterSetID(), passID(), edm::InputSource::processConfiguration(), processName(), and releaseVersion().

52  {
54  }
ProcessConfiguration const * processConfigurationPtr_
std::string const & edm::ModuleDescription::processName ( ) const

Definition at line 57 of file ModuleDescription.cc.

References processConfiguration(), and edm::ProcessConfiguration::processName().

Referenced by edm::ProductRegistryHelper::addToRegistry(), and operator<().

57  {
59  }
std::string const & processName() const
ProcessConfiguration const & processConfiguration() const
std::string const & edm::ModuleDescription::releaseVersion ( ) const

Definition at line 62 of file ModuleDescription.cc.

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

Referenced by operator<().

62  {
64  }
ReleaseVersion const & releaseVersion() const
ProcessConfiguration const & processConfiguration() const
void edm::ModuleDescription::write ( std::ostream &  os) const

Definition at line 108 of file ModuleDescription.cc.

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

Referenced by pkg.AbstractPkg::generate(), and edm::operator<<().

108  {
109  os << "Module type=" << moduleName() << ", "
110  << "Module label=" << moduleLabel() << ", "
111  << "Parameter Set ID=" << parameterSetID();
112  //<< "Parameter Set ID=" << parameterSetID() << ", "
113  //<< "Process name=" << processName() << ", "
114  //<< "Release Version=" << releaseVersion() << ", "
115  //<< "Pass ID=" << passID() << ", "
116  //<< "Main Parameter Set ID=" << mainParameterSetID();
117  }
std::string const & moduleName() const
std::string const & moduleLabel() const
ParameterSetID const & parameterSetID() const

Member Data Documentation

unsigned int edm::ModuleDescription::id_
private

Definition at line 97 of file ModuleDescription.h.

Referenced by id().

std::string edm::ModuleDescription::moduleLabel_
private
std::string edm::ModuleDescription::moduleName_
private

Definition at line 88 of file ModuleDescription.h.

Referenced by moduleName().

ParameterSetID edm::ModuleDescription::parameterSetID_
private

Definition at line 85 of file ModuleDescription.h.

Referenced by parameterSetID().

ProcessConfiguration const* edm::ModuleDescription::processConfigurationPtr_
private

Definition at line 95 of file ModuleDescription.h.

Referenced by processConfiguration().