LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ModuleContext Class Reference

#include "ModuleContext.h"

Public Member Functions

 ModuleContext (PathContext const &pathContext, ModuleDescription const &md)
 
 ModuleContext (ModuleDescription const &md)
 
auto scheduleID () const
 
auto const & pathName () const
 
auto const & moduleDescription () const
 
auto const & moduleLabel () const
 
auto const & moduleName () const
 
bool onEndPath () const
 
bool onTriggerPath () const
 
bool onSamePathAs (std::string const &module_label) const
 

Static Public Member Functions

static ModuleContext invalid ()
 

Private Member Functions

 ModuleContext ()=default
 

Private Attributes

PathContext pathContext_ {PathContext::invalid()}
 
ModuleDescription md_ {}
 

Detailed Description

Definition at line 8 of file ModuleContext.h.

Constructor & Destructor Documentation

art::ModuleContext::ModuleContext ( )
explicitprivatedefault
art::ModuleContext::ModuleContext ( PathContext const &  pathContext,
ModuleDescription const &  md 
)
inlineexplicit

Definition at line 12 of file ModuleContext.h.

References md_.

14  : pathContext_{pathContext}, md_{md}
15  {}
PathContext pathContext_
Definition: ModuleContext.h:70
ModuleDescription md_
Definition: ModuleContext.h:71
art::ModuleContext::ModuleContext ( ModuleDescription const &  md)
inlineexplicit

Definition at line 19 of file ModuleContext.h.

19 : md_{md} {}
ModuleDescription md_
Definition: ModuleContext.h:71

Member Function Documentation

static ModuleContext art::ModuleContext::invalid ( )
inlinestatic

Definition at line 22 of file ModuleContext.h.

Referenced by art::TriggerPathsExecutor::process_event().

23  {
24  return ModuleContext{};
25  }
ModuleContext()=default
auto const& art::ModuleContext::moduleDescription ( ) const
inline

Definition at line 38 of file ModuleContext.h.

References md_.

Referenced by rndm::NuRandomService::preModule(), rndm::NuRandomService::preModuleBeginRun(), and art::MemoryTracker::recordOtherData().

39  {
40  return md_;
41  }
ModuleDescription md_
Definition: ModuleContext.h:71
auto const& art::ModuleContext::moduleName ( ) const
inline

Definition at line 48 of file ModuleContext.h.

References md_, and art::ModuleDescription::moduleName().

Referenced by art::MemoryTracker::recordModuleData(), and art::TimeTracker::recordTime().

49  {
50  return md_.moduleName();
51  }
std::string const & moduleName() const
ModuleDescription md_
Definition: ModuleContext.h:71
bool art::ModuleContext::onEndPath ( ) const
inline

Definition at line 53 of file ModuleContext.h.

References art::PathContext::end_path(), and pathName().

Referenced by art::Worker::runWorker().

54  {
55  return pathName() == PathContext::end_path();
56  }
static std::string end_path()
Definition: PathContext.h:14
auto const & pathName() const
Definition: ModuleContext.h:33
bool art::ModuleContext::onSamePathAs ( std::string const &  module_label) const
inline

Definition at line 64 of file ModuleContext.h.

References art::PathContext::contains(), and pathContext_.

Referenced by art::Principal::findGroupsForProcess().

65  {
66  return pathContext_.contains(module_label);
67  }
bool contains(std::string const &module_label) const
Definition: PathContext.h:74
PathContext pathContext_
Definition: ModuleContext.h:70
bool art::ModuleContext::onTriggerPath ( ) const
inline

Definition at line 58 of file ModuleContext.h.

References art::PathContext::art_path(), art::PathContext::end_path(), and pathName().

Referenced by art::Principal::findGroupsForProcess().

59  {
60  return pathName() != PathContext::end_path() &&
61  pathName() != PathContext::art_path() && !pathName().empty();
62  }
static std::string art_path()
Definition: PathContext.h:26
static std::string end_path()
Definition: PathContext.h:14
auto const & pathName() const
Definition: ModuleContext.h:33
auto const& art::ModuleContext::pathName ( ) const
inline

Definition at line 33 of file ModuleContext.h.

References pathContext_, and art::PathContext::pathName().

Referenced by onEndPath(), onTriggerPath(), art::MemoryTracker::recordModuleData(), and art::TimeTracker::recordTime().

34  {
35  return pathContext_.pathName();
36  }
PathContext pathContext_
Definition: ModuleContext.h:70
auto const & pathName() const
Definition: PathContext.h:63

Member Data Documentation

ModuleDescription art::ModuleContext::md_ {}
private

Definition at line 71 of file ModuleContext.h.

Referenced by ModuleContext(), moduleDescription(), moduleLabel(), and moduleName().

PathContext art::ModuleContext::pathContext_ {PathContext::invalid()}
private

Definition at line 70 of file ModuleContext.h.

Referenced by onSamePathAs(), pathName(), and scheduleID().


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