Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Integration
RunTimeProduces.h
Go to the documentation of this file.
1
#ifndef art_test_Integration_RunTimeProduces_h
2
#define art_test_Integration_RunTimeProduces_h
3
4
#include "
canvas/Persistency/Provenance/BranchType.h
"
5
#include <string>
6
7
namespace
art
{
8
namespace
detail
{
9
class
Producer;
10
}
11
namespace
test
{
12
13
template
<
typename
T>
14
void
15
run_time_produces
(
art::detail::Producer
*
p
,
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
:
31
throw
art::Exception
(
art::errors::LogicError
)
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:
string
std::string string
Definition:
nybbler.cc:12
art::errors::LogicError
Definition:
Exception.h:33
test
Definition:
test.py:1
ValidateOpDetSimulation.T
T
Definition:
ValidateOpDetSimulation.py:48
BranchType.h
instance
const std::string instance
Definition:
SimDepoSource.cxx:151
detail
Definition:
includer.cc:30
test.p
p
Definition:
test.py:228
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
art::InEvent
Definition:
BranchType.h:18
art::detail::Producer
Definition:
Producer.h:23
art::BranchType
BranchType
Definition:
BranchType.h:18
art
Definition:
BasicOptionsHandler.h:11
art::test::run_time_produces
void run_time_produces(art::detail::Producer *p, art::BranchType const bt, std::string const &instance={})
Definition:
RunTimeProduces.h:15
art::InSubRun
Definition:
BranchType.h:18
art::InRun
Definition:
BranchType.h:18
Generated by
1.8.11