LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
get_ProductDescription.cc
Go to the documentation of this file.
2 
11 
12 // 3.
15  BranchType const branch_type,
16  std::string const& module_label,
17  std::string const& instance_name)
18 {
20  tid,
21  ServiceHandle<TriggerNamesService const> {}->getProcessName(),
22  ProductMetaData::instance().productList(),
23  branch_type,
24  module_label,
25  instance_name); // 5.
26 }
27 
28 // 4.
31  Principal const& principal,
32  std::string const& module_label,
33  std::string const& instance_name)
34 {
35  return get_ProductDescription(type_id,
36  principal.processConfiguration().processName(),
37  ProductMetaData::instance().productList(),
38  principal.branchType(),
39  module_label,
40  instance_name); // 5.
41 }
42 
43 // 5.
46  std::string const& process_name,
47  ProductList const& product_list,
48  BranchType const branch_type,
49  std::string const& module_label,
50  std::string const& instance_name)
51 {
52  BranchKey const bk{type_id.friendlyClassName(),
53  module_label,
54  instance_name,
55  process_name,
56  branch_type};
57  auto const it = product_list.find(bk);
58  if (it == product_list.end()) {
60  "art::get_ProductDescription"}
61  << "No product is registered for\n"
62  << " process name: '" << bk.processName_ << "'\n"
63  << " module label: '" << bk.moduleLabel_ << "'\n"
64  << " product friendly class name: '" << bk.friendlyClassName_ << "'\n"
65  << " product instance name: '" << bk.productInstanceName_ << "'\n"
66  << " branch type: '" << branch_type << "'\n";
67  }
68  return it->second;
69 }
BranchDescription const & get_ProductDescription(BranchType branch_type, std::string const &module_label, std::string const &instance_name)
std::string friendlyClassName() const
Definition: TypeID.cc:33
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductList.h:15
const std::string instance
std::string const & processName() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
BranchType
Definition: BranchType.h:18
virtual BranchType branchType() const =0
ProcessConfiguration const & processConfiguration() const
Definition: Principal.h:138