Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
fhiclcpp
fhiclcpp
test
types
FixtureBase.h
Go to the documentation of this file.
1
#ifndef fhiclcpp_test_types_FixtureBase_h
2
#define fhiclcpp_test_types_FixtureBase_h
3
4
// ======================================================================
5
//
6
// Test struct for BOOST fixture tests
7
//
8
// ======================================================================
9
10
#include "
fhiclcpp/ParameterSet.h
"
11
#include "
fhiclcpp/types/Table.h
"
12
13
namespace
fhiclcpp_types
{
14
15
template
<
typename
Config>
16
struct
FixtureBase
{
17
18
FixtureBase
(
std::string
const
&
filename
)
19
:
pset
{
get_pset
(filename)}
20
,
config
{
pset
.
get
<
fhicl::ParameterSet
>(
"pset"
), {}}
21
{}
22
23
fhicl::ParameterSet
pset
;
24
fhicl::Table<Config>
config
;
25
26
private
:
27
fhicl::ParameterSet
28
get_pset
(
std::string
const
&
filename
)
29
{
30
using namespace
fhicl
;
31
putenv(const_cast<char*>(
"FHICL_FILE_PATH=./test:."
));
32
cet::filepath_lookup
policy(
"FHICL_FILE_PATH"
);
33
std::string
cfg_in(filename);
34
return
ParameterSet::make
(cfg_in, policy);
35
}
36
};
37
}
38
39
#endif
/* fhiclcpp_test_types_FixtureBase_h */
40
41
// Local variables:
42
// mode: c++
43
// End:
fhicl::Table< Config >
fhiclcpp_types::FixtureBase::FixtureBase
FixtureBase(std::string const &filename)
Definition:
FixtureBase.h:18
string
std::string string
Definition:
nybbler.cc:12
train.filename
string filename
Definition:
train.py:213
ParameterSet.h
cet::filepath_lookup
Definition:
filepath_maker.h:52
fhicl
Definition:
InputSourceFactory.h:7
fhicl::ParameterSet::get
T get(std::string const &key) const
Definition:
ParameterSet.h:271
fhiclcpp_types::FixtureBase::config
fhicl::Table< Config > config
Definition:
FixtureBase.h:24
fhiclcpp_types::FixtureBase::pset
fhicl::ParameterSet pset
Definition:
FixtureBase.h:23
art::InputSourceFactory::make
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
Definition:
InputSourceFactory.cc:23
Table.h
fhiclcpp_types
Definition:
FixtureBase.h:13
fhiclcpp_types::FixtureBase
Definition:
FixtureBase.h:16
fhiclcpp_types::FixtureBase::get_pset
fhicl::ParameterSet get_pset(std::string const &filename)
Definition:
FixtureBase.h:28
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11