Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
wire-cell-build
util
test
test_configuration3.cxx
Go to the documentation of this file.
1
#include "
WireCellUtil/Configuration.h
"
2
#include <iostream>
3
#include <unordered_map>
4
#include <string>
5
6
using namespace
std
;
7
using namespace
WireCell
;
8
9
int
main
()
10
{
11
Configuration
cfg
;
12
cfg[
"chirp"
] =
"bad"
;
13
cfg[
"bad"
] =
"bad"
;
14
15
Configuration
top
;
16
top[
"maskmap"
] =
cfg
;
17
18
19
// void OmnibusNoiseFilter::configure(const WireCell::Configuration& top)
20
21
auto
jmm = top[
"maskmap"
];
22
23
std::unordered_map<std::string, std::string>
mm
;
24
for
(
auto
name
: jmm.getMemberNames()) {
25
mm[
name
] = jmm[
name
].asString();
26
cerr <<
name
<<
" "
<< mm[
name
] <<
endl
;
27
}
28
29
30
auto
newthing = top[
"maskmap"
][
"adc"
];
31
//auto newthing = cfg["adc"];
32
if
(newthing.isNull()) {
33
cerr <<
"dunno adc\n"
;
34
}
35
36
37
cerr << top<<
endl
;
38
}
39
40
name
static QCString name
Definition:
declinfo.cpp:673
std
STL namespace.
dbjson.cfg
cfg
Definition:
dbjson.py:29
wirecell.validate.cmaps.top
top
Definition:
cmaps.py:84
genie::units::mm
static const double mm
Definition:
Units.h:73
WireCell
Definition:
Main.h:22
main
int main()
Definition:
test_configuration3.cxx:9
WireCell::Configuration
Json::Value Configuration
Definition:
Configuration.h:50
Configuration.h
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11