Public Member Functions | Private Attributes | List of all members
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.

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:87
collection_t::const_iterator const begin_
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:82
collection_t::const_iterator const end_

Member Function Documentation

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

Definition at line 32 of file ModuleGraphInfoMap.h.

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

Definition at line 38 of file ModuleGraphInfoMap.h.

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

Definition at line 20 of file ModuleGraphInfoMap.h.

21  {
22  return modules_[i].second;
23  }
auto art::detail::ModuleGraphInfoMap::info ( module_name_t const &  name) const -> ModuleGraphInfo const&

Definition at line 53 of file ModuleGraphInfoMap.cc.

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.

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

Definition at line 26 of file ModuleGraphInfoMap.h.

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.

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_
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
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.

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

Definition at line 49 of file ModuleGraphInfoMap.h.

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

Definition at line 47 of file ModuleGraphInfoMap.h.


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