00001
00002
00003 #include "fhiclcpp/ParameterSet.h"
00004
00005 #include <iostream>
00006 #include <iomanip>
00007 #include "artdaq/Application/LoadParameterSet.hh"
00008
00009 namespace bpo = boost::program_options;
00010
00011
00012 int main(int argc, char * argv[])
00013 {
00014 struct Config {};
00015 auto pset = LoadParameterSet<Config>(argc, argv, "test_fhicl", "A test application to ensure that FHiCL numeric values are converted properly to/from hexadecimal values");
00016
00017 for(auto& p : pset.get_all_keys()) {
00018 std::cout << "Key " << p << " has string value " << pset.get<std::string>(p)
00019 << " and uint64_t value " << std::to_string(pset.get<uint64_t>(p))
00020 << " ( hex 0x" << std::hex << pset.get<uint64_t>(p) << " )."
00021 << std::endl;
00022 }
00023 }