start adding CSV like data reading routine with the FileFormat label DAT.

This commit is contained in:
2022-03-14 20:59:37 +01:00
parent faffaec6ac
commit 2d85d10b2f
9 changed files with 39 additions and 0 deletions

View File

@ -436,6 +436,8 @@ Bool_t PRunDataHandler::ReadFilesMsr()
success = ReadAsciiFile();
} else if (!runList->at(i).GetFileFormat(j)->CompareTo("db")) {
success = ReadDBFile();
} else if (!runList->at(i).GetFileFormat(j)->CompareTo("dat")) {
success = ReadDatFile();
} else {
success = false;
}
@ -994,6 +996,8 @@ Bool_t PRunDataHandler::FileExistsCheck(PMsrRunBlock &runInfo, const UInt_t idx)
ext = TString("dat");
else if (!runInfo.GetFileFormat(idx)->CompareTo("db"))
ext = TString("db");
else if (!runInfo.GetFileFormat(idx)->CompareTo("dat"))
ext = TString("dat");
else
success = false;
@ -1018,6 +1022,7 @@ Bool_t PRunDataHandler::FileExistsCheck(PMsrRunBlock &runInfo, const UInt_t idx)
std::cerr << std::endl << ">> MDU-ASCII -> psi mdu ascii file format";
std::cerr << std::endl << ">> ASCII -> column like file format";
std::cerr << std::endl << ">> DB -> triumf db file \"format\"";
std::cerr << std::endl << ">> DAT -> csv like file \"format\" as exported by msr2data.";
std::cerr << std::endl;
return success;
}
@ -4238,6 +4243,18 @@ Bool_t PRunDataHandler::ReadDBFile()
return success;
}
//--------------------------------------------------------------------------
// ReadDBFile (private)
//--------------------------------------------------------------------------
Bool_t PRunDataHandler::ReadDatFile()
{
Bool_t success = true;
std::cerr << "debug> in PRunDataHandler::ReadDatFile(). Not yet implemented..." << std::endl;
return success;
}
//--------------------------------------------------------------------------
// WriteMusrRootFile (private)
//--------------------------------------------------------------------------