make sure that 'ASCII', 'DAT', and 'DB' is rejected from musrFT.

This commit is contained in:
suter_a 2025-01-27 18:00:32 +01:00
parent 124a31386c
commit e4b84b12df

View File

@ -1075,6 +1075,21 @@ Int_t main(Int_t argc, Char_t *argv[])
} }
} }
// check for ascii-, db- or dat-files in msr-file RUN block
TString ffstr("");
for (UInt_t i=0; i<msrHandler.size(); i++) {
PMsrRunList *runList = msrHandler[i]->GetMsrRunList();
for (UInt_t j=0; j<runList->at(i).GetFileFormatSize(); j++) {
ffstr = *(runList->at(i).GetFileFormat(j));
if (!ffstr.CompareTo("ascii", TString::kIgnoreCase) || !ffstr.CompareTo("dat", TString::kIgnoreCase) || !ffstr.CompareTo("db", TString::kIgnoreCase)) {
std::cout << std::endl;
std::cout << "**ERROR** Currently file format's 'ASCII', 'DAT', nor 'DB' are NOT supported." << std::endl;
std::cout << std::endl;
return PMUSR_UNSUPPORTED_FEATURE;
}
}
}
std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler; std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
runDataHandler.resize(startupParam.msrFln.size()+startupParam.dataFln.size()); // resize to the total number of run data provided runDataHandler.resize(startupParam.msrFln.size()+startupParam.dataFln.size()); // resize to the total number of run data provided
// load data-file(s) related to msr-file // load data-file(s) related to msr-file