test_configuration3.cxx
Go to the documentation of this file.
2 #include <iostream>
3 #include <unordered_map>
4 #include <string>
5 
6 using namespace std;
7 using namespace WireCell;
8 
9 int main()
10 {
12  cfg["chirp"] = "bad";
13  cfg["bad"] = "bad";
14 
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 
static QCString name
Definition: declinfo.cpp:673
STL namespace.
cfg
Definition: dbjson.py:29
static const double mm
Definition: Units.h:73
Definition: Main.h:22
int main()
Json::Value Configuration
Definition: Configuration.h:50
QTextStream & endl(QTextStream &s)