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

#include "PathContext.h"

Public Member Functions

 PathContext (ScheduleContext const &scheduleContext, PathSpec const &pathSpec, std::vector< std::string > sortedModuleNames)
 
auto scheduleID () const
 
auto const & pathSpec () const
 
auto const & pathName () const
 
PathID pathID () const noexcept
 
bool contains (std::string const &module_label) const
 

Static Public Member Functions

static std::string end_path ()
 
static auto end_path_spec ()
 
static std::string art_path ()
 
static auto art_path_spec ()
 
static PathContext invalid ()
 

Private Member Functions

 PathContext ()=default
 

Private Attributes

ScheduleContext scheduleContext_ {ScheduleContext::invalid()}
 
PathSpec pathSpec_ {"", PathID::invalid()}
 
std::vector< std::string > sortedModuleLabels_ {}
 

Detailed Description

Definition at line 9 of file PathContext.h.

Constructor & Destructor Documentation

art::PathContext::PathContext ( )
explicitprivatedefault
art::PathContext::PathContext ( ScheduleContext const &  scheduleContext,
PathSpec const &  pathSpec,
std::vector< std::string >  sortedModuleNames 
)
inlineexplicit

Definition at line 37 of file PathContext.h.

References pathSpec(), pathSpec_, and sortedModuleLabels_.

40  : scheduleContext_{scheduleContext}
42  , sortedModuleLabels_{std::move(sortedModuleNames)}
43  {}
auto const & pathSpec() const
Definition: PathContext.h:57
std::vector< std::string > sortedModuleLabels_
Definition: PathContext.h:82
ScheduleContext scheduleContext_
Definition: PathContext.h:80
PathSpec pathSpec_
Definition: PathContext.h:81

Member Function Documentation

static std::string art::PathContext::art_path ( )
inlinestatic

Definition at line 26 of file PathContext.h.

Referenced by art_path_spec(), and art::ModuleContext::onTriggerPath().

27  {
28  return "[art]";
29  }
static auto art::PathContext::art_path_spec ( )
inlinestatic

Definition at line 32 of file PathContext.h.

References art_path(), and art::PathID::invalid().

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

33  {
34  return PathSpec{art_path(), PathID::invalid()};
35  }
static std::string art_path()
Definition: PathContext.h:26
constexpr static auto invalid() noexcept
Definition: PathSpec.h:20
bool art::PathContext::contains ( std::string const &  module_label) const
inline

Definition at line 74 of file PathContext.h.

References sortedModuleLabels_.

Referenced by art::ModuleContext::onSamePathAs().

75  {
76  return cet::binary_search_all(sortedModuleLabels_, module_label);
77  }
std::vector< std::string > sortedModuleLabels_
Definition: PathContext.h:82
static std::string art::PathContext::end_path ( )
inlinestatic
static auto art::PathContext::end_path_spec ( )
inlinestatic

Definition at line 20 of file PathContext.h.

References end_path().

Referenced by art::PathManager::createModulesAndWorkers(), and art::EndPathExecutor::writeEvent().

21  {
22  return PathSpec{end_path(), PathID{0}};
23  }
static std::string end_path()
Definition: PathContext.h:14
static PathContext art::PathContext::invalid ( )
inlinestatic

Definition at line 46 of file PathContext.h.

47  {
48  return PathContext{};
49  }
PathContext()=default
PathID art::PathContext::pathID ( ) const
inlinenoexcept

Definition at line 68 of file PathContext.h.

References art::PathSpec::path_id, and pathSpec_.

Referenced by art::PathsInfo::add_path(), and art::PathManager::fillWorkers_().

69  {
70  return pathSpec_.path_id;
71  }
PathID path_id
Definition: PathSpec.h:49
PathSpec pathSpec_
Definition: PathContext.h:81
auto const& art::PathContext::pathName ( ) const
inline

Definition at line 63 of file PathContext.h.

References art::PathSpec::name, and pathSpec_.

Referenced by art::PathsInfo::add_path(), art::ModuleContext::pathName(), art::Tracer::postPathEvent(), and art::Tracer::prePathEvent().

64  {
65  return pathSpec_.name;
66  }
std::string name
Definition: PathSpec.h:48
PathSpec pathSpec_
Definition: PathContext.h:81
auto const& art::PathContext::pathSpec ( ) const
inline

Definition at line 57 of file PathContext.h.

References pathSpec_.

Referenced by PathContext().

58  {
59  return pathSpec_;
60  }
PathSpec pathSpec_
Definition: PathContext.h:81
auto art::PathContext::scheduleID ( ) const
inline

Definition at line 52 of file PathContext.h.

References art::ScheduleContext::id(), and scheduleContext_.

Referenced by art::PathsInfo::add_path(), art::PathManager::fillWorkers_(), and art::ModuleContext::scheduleID().

53  {
54  return scheduleContext_.id();
55  }
ScheduleContext scheduleContext_
Definition: PathContext.h:80

Member Data Documentation

PathSpec art::PathContext::pathSpec_ {"", PathID::invalid()}
private

Definition at line 81 of file PathContext.h.

Referenced by PathContext(), pathID(), pathName(), and pathSpec().

ScheduleContext art::PathContext::scheduleContext_ {ScheduleContext::invalid()}
private

Definition at line 80 of file PathContext.h.

Referenced by scheduleID().

std::vector<std::string> art::PathContext::sortedModuleLabels_ {}
private

Definition at line 82 of file PathContext.h.

Referenced by contains(), and PathContext().


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