artdaq  v3_09_05
fhicl_test.cc
1 // Show that the string representation of numbers in fhicl is not what you'd expect.
2 
3 #include "fhiclcpp/ParameterSet.h"
4 
5 #include <iomanip>
6 #include <iostream>
7 #include "artdaq/Application/LoadParameterSet.hh"
8 
9 int main(int argc, char* argv[]) try
10 {
11  struct Config
12  {};
13  auto pset = LoadParameterSet<Config>(argc, argv, "test_fhicl", "A test application to ensure that FHiCL numeric values are converted properly to/from hexadecimal values");
14 
15  for (auto& p : pset.get_all_keys())
16  {
17  std::cout << "Key " << p << " has string value " << pset.get<std::string>(p)
18  << " and uint64_t value " << pset.get<uint64_t>(p)
19  << " ( hex 0x" << std::hex << pset.get<uint64_t>(p) << " )."
20  << std::endl;
21  }
22 
23  return 0;
24 }
25 catch (...)
26 {
27  return -1;
28 }
Configuration for simple_metric_sender.