ModuleBase.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
6 
7 using namespace std;
8 
9 namespace art {
10 
11  ModuleBase::~ModuleBase() noexcept = default;
12  ModuleBase::ModuleBase() = default;
13 
14  ModuleDescription const&
15  ModuleBase::moduleDescription() const
16  {
17  if (md_.has_value()) {
18  return *md_;
19  }
20 
22  "There was an error while calling moduleDescription().\n"}
23  << "The moduleDescription() base-class member function cannot be called\n"
24  "during module construction. To determine which module is "
25  "responsible\n"
26  "for calling it, find the '<module type>:<module "
27  "label>@Construction'\n"
28  "tag in the message prefix above. Please contact artists@fnal.gov\n"
29  "for guidance.\n";
30  }
31 
32  void
33  ModuleBase::setModuleDescription(ModuleDescription const& md)
34  {
35  md_ = md;
36  }
37 
38  array<vector<ProductInfo>, NumBranchTypes> const&
39  ModuleBase::getConsumables() const
40  {
41  return collector_.getConsumables();
42  }
43 
44  void
45  ModuleBase::sortConsumables(std::string const& current_process_name)
46  {
47  // Now that we know we have seen all the consumes declarations,
48  // sort the results for fast lookup later.
49  collector_.sortConsumables(current_process_name);
50  }
51 
53  ModuleBase::consumesCollector()
54  {
55  return collector_;
56  }
57 
58 } // namespace art
std::string string
Definition: nybbler.cc:12
STL namespace.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66