80 if(!
fClocks->InheritClockConfig())
return;
88 if(file != 0 && !file->IsZombie() && file->IsOpen()) {
90 std::vector<std::string> cfgName =
fClocks->ConfigNames();
91 std::vector<double> cfgValue =
fClocks->ConfigValues();
95 ::art::SQLite3Wrapper sqliteDB(file,
"RootFileDB");
103 sqlite3_prepare_v2(sqliteDB,
"SELECT PSetBlob from ParameterSets;", -1, &stmt, NULL);
105 while (sqlite3_step(stmt) == SQLITE_ROW) {
111 if(!
fClocks->IsRightConfig(
ps))
continue;
115 double value_from_file =
ps.get<
double>(cfgName.at(i).c_str());
117 if(!(config_count.at(i)))
119 config_value.at(i) = value_from_file;
121 else if(config_value.at(i) != value_from_file)
124 << Form(
"\033[95mFound historical value disagreement for %s ... %g != %g",
125 cfgName.at(i).c_str(),
129 config_count.at(i) +=1;
139 if(config_count.at(i) && cfgValue.at(i) != config_value.at(i)) {
142 << Form(
"\033[93mOverriding configuration parameter %s ... %g (fcl) => %g (data file)\033[00m",
143 cfgName.at(i).c_str(),
147 fClocks->SetConfigValue(i,config_value.at(i));
static ParameterSet make(intermediate_table const &tbl)
struct sqlite3_stmt sqlite3_stmt
std::unique_ptr< detinfo::DetectorClocksStandardGAr > fClocks
static constexpr double ps
#define MF_LOG_INFO(category)
cet::coded_exception< error, detail::translate > exception