864 if (!
fMap.
Read(conf.
Get<
string>(
"pixel-map-file")))
866 Error(
"Reading mapping table from "+conf.
Get<
string>(
"pixel-map-file")+
" failed.");
878 const vector<string> types = conf.
Vec<
string>(
"run-type");
880 Warn(
"No run-types defined.");
884 for (
auto it=types.begin(); it!=types.end(); it++)
890 Error(
"Run-type "+*it+
" defined twice.");
895 if (!
GetConfig(conf,
"calibration-type.", *it, c.fCalibrationType) ||
896 !
GetConfig(conf,
"target-rate.", *it, c.fTargetRate) ||
897 !
GetConfig(conf,
"min-threshold.", *it, c.fMinThreshold) ||
898 !
GetConfig(conf,
"average-time.", *it, c.fAverageTime) ||
899 !
GetConfig(conf,
"required-events.", *it, c.fRequiredEvents))
T Get(const std::string &var)
uint16_t fThresholdReference
std::vector< T > Vec(const std::string &var)
map< string, config > fRunTypes
int Error(const std::string &str)
int Warn(const std::string &str)
int Message(const std::string &str)
bool GetConfig(Configuration &conf, const string &name, const string &sub, uint16_t &rc)
bool Read(const std::string &fname)