LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::detail::ModuleConfigInfo Class Reference

#include "ModuleConfigInfo.h"

Public Member Functions

 ModuleConfigInfo (fhicl::ParameterSet const &procPS, std::string const &label, std::string const &configPath)
 
std::string const & label () const
 
std::string const & configPath () const
 
ModuleType moduleType () const
 
fhicl::ParameterSet const & modPS () const
 
std::string const & libSpec () const
 

Static Public Member Functions

static std::vector< std::string > const & allModulePathRoots ()
 

Private Member Functions

ModuleType calcConfigType_ () const
 

Private Attributes

std::string const label_
 
std::string const configPath_
 
ModuleType const moduleType_
 
fhicl::ParameterSet const modPS_
 
std::string const libSpec_
 

Detailed Description

Definition at line 27 of file ModuleConfigInfo.h.

Constructor & Destructor Documentation

art::detail::ModuleConfigInfo::ModuleConfigInfo ( fhicl::ParameterSet const &  procPS,
std::string const &  label,
std::string const &  configPath 
)

Definition at line 8 of file ModuleConfigInfo.cc.

12  : label_(label)
15  , modPS_(procPS.get<fhicl::ParameterSet>(configPath_ + '.' + label_))
16  , libSpec_(modPS_.get<std::string>("module_type"))
17 {}
std::string const & configPath() const
T get(std::string const &key) const
Definition: ParameterSet.h:231
fhicl::ParameterSet const modPS_
ModuleType calcConfigType_() const
std::string const & label() const

Member Function Documentation

std::vector< std::string > const & art::detail::ModuleConfigInfo::allModulePathRoots ( )
static

Definition at line 20 of file ModuleConfigInfo.cc.

Referenced by calcConfigType_(), and art::PathManager::fillAllModules_().

21 {
22  static const std::vector<std::string> s_allModulePathRoots = {
23  "physics.analyzers", "physics.filters", "outputs", "physics.producers"};
24  return s_allModulePathRoots;
25 }
art::ModuleType art::detail::ModuleConfigInfo::calcConfigType_ ( ) const
private

Definition at line 30 of file ModuleConfigInfo.cc.

References allModulePathRoots(), art::ANALYZER, configPath_, art::FILTER, art::errors::LogicError, art::OUTPUT, and art::PRODUCER.

31 {
32  auto const& paths = allModulePathRoots();
33  switch (std::find(paths.cbegin(), paths.cend(), configPath_) -
34  paths.cbegin()) {
35  case 0:
36  return ModuleType::ANALYZER;
37  case 1:
38  return ModuleType::FILTER;
39  case 2:
40  return ModuleType::OUTPUT;
41  case 3:
42  return ModuleType::PRODUCER;
43  default:
45  << "Unrecognized module path " << configPath_ << ".\n";
46  };
47 }
static std::vector< std::string > const & allModulePathRoots()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string const & art::detail::ModuleConfigInfo::configPath ( ) const
inline

Definition at line 52 of file ModuleConfigInfo.h.

References configPath_.

Referenced by art::PathsInfo::makeWorker_().

53 {
54  return configPath_;
55 }
std::string const & art::detail::ModuleConfigInfo::label ( ) const
inline

Definition at line 58 of file ModuleConfigInfo.h.

References label_.

Referenced by art::PathsInfo::makeWorker_().

59 {
60  return label_;
61 }
std::string const & art::detail::ModuleConfigInfo::libSpec ( ) const
inline

Definition at line 76 of file ModuleConfigInfo.h.

References libSpec_.

77 {
78  return libSpec_;
79 }
fhicl::ParameterSet const & art::detail::ModuleConfigInfo::modPS ( ) const
inline

Definition at line 70 of file ModuleConfigInfo.h.

References modPS_.

71 {
72  return modPS_;
73 }
fhicl::ParameterSet const modPS_
art::ModuleType art::detail::ModuleConfigInfo::moduleType ( ) const
inline

Definition at line 64 of file ModuleConfigInfo.h.

References moduleType_.

65 {
66  return moduleType_;
67 }

Member Data Documentation

std::string const art::detail::ModuleConfigInfo::configPath_
private

Definition at line 45 of file ModuleConfigInfo.h.

Referenced by calcConfigType_(), and configPath().

std::string const art::detail::ModuleConfigInfo::label_
private

Definition at line 44 of file ModuleConfigInfo.h.

Referenced by label().

std::string const art::detail::ModuleConfigInfo::libSpec_
private

Definition at line 48 of file ModuleConfigInfo.h.

Referenced by libSpec().

fhicl::ParameterSet const art::detail::ModuleConfigInfo::modPS_
private

Definition at line 47 of file ModuleConfigInfo.h.

Referenced by modPS().

ModuleType const art::detail::ModuleConfigInfo::moduleType_
private

Definition at line 46 of file ModuleConfigInfo.h.

Referenced by moduleType().


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