start implementing with the deadtime correction, if present

This commit is contained in:
2026-02-04 13:20:10 +01:00
parent 12888be4c9
commit b262ee33c5
2 changed files with 41 additions and 0 deletions

View File

@@ -3334,6 +3334,20 @@ Bool_t PMsrHandler::HandleGlobalEntry(PMsrLines &lines)
error = true;
}
}
} else if (iter->fLine.BeginsWith("deadtime-cor", TString::kIgnoreCase)) { // deadtime correction
if (tokens->GetEntries() < 2) {
error = true;
} else {
ostr = dynamic_cast<TObjString*>(tokens->At(1));
str = ostr->GetString();
if (!str.CompareTo("no", TString::kIgnoreCase) ||
!str.CompareTo("file", TString::kIgnoreCase) ||
!str.CompareTo("estimate", TString::kIgnoreCase)) {
global.SetDeadTimeCorrection(str);
} else {
error = true;
}
}
}
// clean up
@@ -3931,6 +3945,27 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
}
}
// deadtime-correction -----------------------------------
if (iter->fLine.BeginsWith("deadtime-cor", TString::kIgnoreCase)) { // deadtime correction
runLinePresent = false; // this is needed to make sure that a run line is present before and ADDRUN is following
if (tokens->GetEntries() < 2) {
error = true;
} else {
ostr = dynamic_cast<TObjString*>(tokens->At(1));
str = ostr->GetString();
if (!str.CompareTo("no", TString::kIgnoreCase) ||
!str.CompareTo("file", TString::kIgnoreCase) ||
!str.CompareTo("estimate", TString::kIgnoreCase)) {
param.SetDeadTimeCorrection(str);
} else {
error = true;
}
}
}
// xy-data -----------------------------------------------
if (line.BeginsWith("xy-data", TString::kIgnoreCase)) {