Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
gen
src
WireSchemaFile.cxx
Go to the documentation of this file.
1
#include "
WireCellGen/WireSchemaFile.h
"
2
3
#include "
WireCellUtil/Exceptions.h
"
4
#include "
WireCellUtil/NamedFactory.h
"
5
6
WIRECELL_FACTORY
(WireSchemaFile,
7
WireCell::Gen::WireSchemaFile
,
8
WireCell::IWireSchema
,
WireCell::IConfigurable
)
9
10
11
using namespace
WireCell
;
12
13
Gen::
WireSchemaFile
::
WireSchemaFile
(
const
char
*
fname
)
14
: m_fname(
fname
)
15
{
16
}
17
18
Gen::WireSchemaFile::~WireSchemaFile()
19
{
20
}
21
22
23
void
Gen::WireSchemaFile::configure
(
const
WireCell::Configuration
&
cfg
)
24
{
25
m_fname =
get
(
cfg
,
"filename"
, m_fname);
26
if
(m_fname.empty()) {
27
THROW
(
ValueError
() <<
errmsg
{
"must give a wire schema filename"
});
28
}
29
m_store =
WireSchema::load
(m_fname.c_str());
30
}
31
32
WireCell::Configuration
Gen::WireSchemaFile::default_configuration()
const
33
{
34
Configuration
cfg
;
35
cfg[
"filename"
] = m_fname;
36
return
cfg
;
37
}
38
39
40
const
WireSchema::Store
& Gen::WireSchemaFile::wire_schema_store()
const
41
{
42
return
m_store;
43
}
44
45
WireCell::IConfigurable
Definition:
IConfigurable.h:13
freeze_graph.const
const
Definition:
freeze_graph.py:179
NamedFactory.h
Exceptions.h
WireCell::errmsg
boost::error_info< struct tag_errmsg, std::string > errmsg
Definition:
Exceptions.h:54
dbjson.cfg
cfg
Definition:
dbjson.py:29
wirecell.sigproc.paper.noise.fname
fname
Definition:
noise.py:68
WireCell::WireSchema::Store
Definition:
WireSchema.h:62
cuda.configure
def configure(cfg)
Definition:
cuda.py:34
WIRECELL_FACTORY
WIRECELL_FACTORY(WireSchemaFile, WireCell::Gen::WireSchemaFile, WireCell::IWireSchema, WireCell::IConfigurable) using namespace WireCell
THROW
#define THROW(e)
Definition:
Exceptions.h:25
WireCell::ValueError
Thrown when a wrong value has been encountered.
Definition:
Exceptions.h:37
WireCell::Gen::WireSchemaFile
Definition:
WireSchemaFile.h:16
WireCell
Definition:
Main.h:22
WireCell::Configuration
Json::Value Configuration
Definition:
Configuration.h:50
WireCell::IWireSchema
Definition:
IWireSchema.h:19
WireSchemaFile.h
wirecell.gen.depos.load
def load(filename, jpath="depos")
Definition:
depos.py:34
Generated by
1.8.11