RunTimeProduces.h
Go to the documentation of this file.
1 #ifndef art_test_Integration_RunTimeProduces_h
2 #define art_test_Integration_RunTimeProduces_h
3 
5 #include <string>
6 
7 namespace art {
8  namespace detail {
9  class Producer;
10  }
11  namespace test {
12 
13  template <typename T>
14  void
16  art::BranchType const bt,
17  std::string const& instance = {})
18  {
19  assert(p != nullptr);
20  switch (bt) {
21  case art::InEvent:
22  p->produces<T>(instance);
23  break;
24  case art::InSubRun:
25  p->produces<T, art::InSubRun>(instance);
26  break;
27  case art::InRun:
28  p->produces<T, art::InRun>(instance);
29  break;
30  default:
32  << "Unknown branch type " << bt << ".\n";
33  }
34  }
35  }
36 }
37 
38 #endif /* art_test_Integration_RunTimeProduces_h */
39 
40 // Local Variables:
41 // mode: c++
42 // End:
std::string string
Definition: nybbler.cc:12
Definition: test.py:1
const std::string instance
p
Definition: test.py:228
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
BranchType
Definition: BranchType.h:18
void run_time_produces(art::detail::Producer *p, art::BranchType const bt, std::string const &instance={})