16namespace Experimental {
35 return fJson[key].dump();
40 if (!
fJson.contains(key))
41 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
42 if (!
fJson[key].is_number_integer())
43 throw std::logic_error(
"Key " + key +
" is not of type int.");
44 return fJson[key].get<
int>();
49 if (!
fJson.contains(key))
50 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
51 if (!
fJson[key].is_number_float())
52 throw std::logic_error(
"Key " + key +
" is not of type double.");
53 return fJson[key].get<
double>();
58 if (!
fJson.contains(key))
59 throw std::logic_error(
"No key with name " + key +
" in the metadata object.");
60 if (!
fJson[key].is_string())
61 throw std::logic_error(
"Key " + key +
" is not of type string.");
62 return fJson[key].get<std::string>();
67 if (!
fJson.contains(key))
69 if (!
fJson[key].is_number_integer())
70 throw std::logic_error(
"Key " + key +
" is not of type int.");
71 return fJson[key].get<
int>();
76 if (!
fJson.contains(key))
78 if (!
fJson[key].is_number_float())
79 throw std::logic_error(
"Key " + key +
" is not of type double.");
80 return fJson[key].get<
double>();
83const std::string
RMetaData::GetS(
const std::string &key,
const std::string &defaultVal)
const
85 if (!
fJson.contains(key))
87 if (!
fJson[key].is_string())
88 throw std::logic_error(
"Key " + key +
" is not of type string.");
89 return fJson[key].get<std::string>();
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.