1395 std::ostringstream msg;
1396 msg <<
"Could not open file '" <<
str <<
"': " << strerror(errno);
1400 if (file.GetStr(
"TELESCOP")!=
"FACT")
1402 std::ostringstream msg;
1403 msg <<
"Reading '" <<
str <<
"' failed: Not a valid FACT file (TELESCOP not FACT in header)";
1407 if (!file.HasKey(
"STEP"))
1409 std::ostringstream msg;
1410 msg <<
"Reading '" << str <<
"' failed: Is not a DRS calib file (STEP not found in header)";
1414 if (file.GetNumRows()!=1)
1416 std::ostringstream msg;
1417 msg <<
"Reading '" << str <<
"' failed: Number of rows in table is not 1.";
1421 fStep = file.GetUInt(
"STEP");
1425 fRoi = file.GetUInt(
"NROI");
1426 fNumTm = file.HasKey(
"NTM") ? file.GetUInt(
"NTM") : 0;
1428 if (file.HasKey(
"DATE-OBS"))
1429 fDateObs = file.GetStr(
"DATE-OBS");
1430 if (file.HasKey(
"DATE-END"))
1431 fDateEnd = file.GetStr(
"DATE-END");
1433 if (file.HasKey(
"RUN0-BEG"))
1435 if (file.HasKey(
"RUN1-BEG"))
1437 if (file.HasKey(
"RUN2-BEG"))
1439 if (file.HasKey(
"RUN0-END"))
1441 if (file.HasKey(
"RUN1-END"))
1443 if (file.HasKey(
"RUN2-END"))
1450 vec.resize(1440*1024*4 + (1440+
fNumTm)*
fRoi*2 + 4);
1452 float *base = vec.data();
1454 reinterpret_cast<uint32_t*
>(base)[0] =
fRoi;
1456 file.SetPtrAddress(
"RunNumberBaseline", base+1, 1);
1457 file.SetPtrAddress(
"RunNumberGain", base+2, 1);
1458 file.SetPtrAddress(
"RunNumberTriggerOffset", base+3, 1);
1459 file.SetPtrAddress(
"BaselineMean", base+4+0*1024*1440, 1024*1440);
1460 file.SetPtrAddress(
"BaselineRms", base+4+1*1024*1440, 1024*1440);
1461 file.SetPtrAddress(
"GainMean", base+4+2*1024*1440, 1024*1440);
1462 file.SetPtrAddress(
"GainRms", base+4+3*1024*1440, 1024*1440);
1463 file.SetPtrAddress(
"TriggerOffsetMean", base+4+4*1024*1440,
fRoi*1440);
1464 file.SetPtrAddress(
"TriggerOffsetRms", base+4+4*1024*1440+
fRoi*1440,
fRoi*1440);
1467 file.SetPtrAddress(
"TriggerOffsetTMMean", base+4+4*1024*1440+ 2*
fRoi*1440,
fRoi*
fNumTm);
1468 file.SetPtrAddress(
"TriggerOffsetTMRms", base+4+4*1024*1440+ 2*
fRoi*1440+
fRoi*fNumTm,
fRoi*fNumTm);
1471 if (!file.GetNextRow())
1473 std::ostringstream msg;
1474 msg <<
"Reading data from " << str <<
" failed.";
1486 fGain.resize(1024*1440);
1492 for (
int i=0;
i<1024*1440;
i++)
1498 for (
int i=0;
i<
fRoi*1440;
i++)
1512 for (
int i=0;
i<1024*1440;
i++)
1518 for (
int i=0;
i<1024*1440;
i++)
1528 return std::string();
std::vector< int32_t > fOffset
std::vector< int64_t > fGain
std::string fDateRunBeg[3]
std::string fDateRunEnd[3]
std::vector< int64_t > fTrgOff