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

#include "ModuleGraphInfoMap.h"

Public Member Functions

 ModuleGraphInfoMap (collection_map_t const &paths)
 
auto const & name (std::size_t const i) const
 
auto const & info (std::size_t const i) const
 
auto size () const
 
auto begin () const
 
auto end () const
 
auto info (module_name_t const &name) const -> ModuleGraphInfo const &
 
auto vertex_index (module_name_t const &name) const -> distance_t
 

Private Attributes

collection_t const modules_
 
collection_t::const_iterator const begin_
 
collection_t::const_iterator const end_
 

Detailed Description

Definition at line 9 of file ModuleGraphInfoMap.h.

Constructor & Destructor Documentation

art::detail::ModuleGraphInfoMap::ModuleGraphInfoMap ( collection_map_t const &  paths)
explicit

Definition at line 23 of file ModuleGraphInfoMap.cc.

References begin_, util::cbegin(), util::cend(), end_, and modules_.

25  : modules_{map_to_vec(modules)}
27  , end_{cend(modules_)}
28 {}
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
collection_t::const_iterator const begin_
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
collection_t::const_iterator const end_

Member Function Documentation

auto art::detail::ModuleGraphInfoMap::begin ( ) const
inline

Definition at line 32 of file ModuleGraphInfoMap.h.

References modules_.

33  {
34  return modules_.begin();
35  }
auto art::detail::ModuleGraphInfoMap::end ( void  ) const
inline

Definition at line 38 of file ModuleGraphInfoMap.h.

References info(), modules_, name(), and vertex_index().

39  {
40  return modules_.end();
41  }
auto const& art::detail::ModuleGraphInfoMap::info ( std::size_t const  i) const
inline
auto art::detail::ModuleGraphInfoMap::info ( module_name_t const &  name) const -> ModuleGraphInfo const&

Definition at line 53 of file ModuleGraphInfoMap.cc.

References modules_, name(), and vertex_index().

55 {
56  return modules_[vertex_index(name)].second;
57 }
auto vertex_index(module_name_t const &name) const -> distance_t
auto const & name(std::size_t const i) const
auto const& art::detail::ModuleGraphInfoMap::name ( std::size_t const  i) const
inline

Definition at line 14 of file ModuleGraphInfoMap.h.

References modules_.

Referenced by end(), info(), art::detail::print_module_graph(), art::detail::verify_no_interpath_dependencies(), and vertex_index().

15  {
16  return modules_[i].first;
17  }
auto art::detail::ModuleGraphInfoMap::size ( void  ) const
inline

Definition at line 26 of file ModuleGraphInfoMap.h.

References modules_.

Referenced by art::detail::make_module_graph(), and art::detail::make_product_dependency_edges().

27  {
28  return modules_.size();
29  }
auto art::detail::ModuleGraphInfoMap::vertex_index ( module_name_t const &  name) const -> distance_t

Definition at line 31 of file ModuleGraphInfoMap.cc.

References begin_, art::errors::Configuration, end_, and name().

Referenced by end(), info(), art::detail::make_path_ordering_edges(), art::detail::make_product_dependency_edges(), art::detail::make_synchronization_edges(), and art::detail::make_trigger_path_subgraphs().

33 {
34  auto const it = std::find_if(
35  begin_, end_, [&name](auto const& pr) { return pr.first == name; });
36  if (it == end_) {
37  throw Exception{
39  "An error occurred while constructing the data-dependency graph.\n"}
40  << "The module name '" << name << "' is not included in the set of\n"
41  << "filters and producers configured for this job. This error can\n"
42  << "happen if a 'consumes' statement in one of the modules specifies\n"
43  << "either the current process name or the literal string "
44  "\"current_process\"\n"
45  << "for the input tag. If you have encountered this error under a\n"
46  << "different circumstance, please contact artists@fnal.gov for "
47  "guidance.\n";
48  }
49  return std::distance(begin_, it);
50 }
collection_t::const_iterator const begin_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
auto const & name(std::size_t const i) const
collection_t::const_iterator const end_

Member Data Documentation

collection_t::const_iterator const art::detail::ModuleGraphInfoMap::begin_
private

Definition at line 48 of file ModuleGraphInfoMap.h.

Referenced by ModuleGraphInfoMap(), and vertex_index().

collection_t::const_iterator const art::detail::ModuleGraphInfoMap::end_
private

Definition at line 49 of file ModuleGraphInfoMap.h.

Referenced by ModuleGraphInfoMap(), and vertex_index().

collection_t const art::detail::ModuleGraphInfoMap::modules_
private

Definition at line 47 of file ModuleGraphInfoMap.h.

Referenced by begin(), end(), info(), ModuleGraphInfoMap(), name(), and size().


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