start adding CSV like data reading routine with the FileFormat label DAT.
This commit is contained in:
parent
faffaec6ac
commit
2d85d10b2f
@ -549,6 +549,9 @@ void PRunAsymmetry::CalcTheory()
|
|||||||
*/
|
*/
|
||||||
Bool_t PRunAsymmetry::PrepareData()
|
Bool_t PRunAsymmetry::PrepareData()
|
||||||
{
|
{
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -587,6 +587,9 @@ void PRunAsymmetryBNMR::CalcTheory()
|
|||||||
*/
|
*/
|
||||||
Bool_t PRunAsymmetryBNMR::PrepareData()
|
Bool_t PRunAsymmetryBNMR::PrepareData()
|
||||||
{
|
{
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -531,6 +531,9 @@ void PRunAsymmetryRRF::CalcTheory()
|
|||||||
*/
|
*/
|
||||||
Bool_t PRunAsymmetryRRF::PrepareData()
|
Bool_t PRunAsymmetryRRF::PrepareData()
|
||||||
{
|
{
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -436,6 +436,8 @@ Bool_t PRunDataHandler::ReadFilesMsr()
|
|||||||
success = ReadAsciiFile();
|
success = ReadAsciiFile();
|
||||||
} else if (!runList->at(i).GetFileFormat(j)->CompareTo("db")) {
|
} else if (!runList->at(i).GetFileFormat(j)->CompareTo("db")) {
|
||||||
success = ReadDBFile();
|
success = ReadDBFile();
|
||||||
|
} else if (!runList->at(i).GetFileFormat(j)->CompareTo("dat")) {
|
||||||
|
success = ReadDatFile();
|
||||||
} else {
|
} else {
|
||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
@ -994,6 +996,8 @@ Bool_t PRunDataHandler::FileExistsCheck(PMsrRunBlock &runInfo, const UInt_t idx)
|
|||||||
ext = TString("dat");
|
ext = TString("dat");
|
||||||
else if (!runInfo.GetFileFormat(idx)->CompareTo("db"))
|
else if (!runInfo.GetFileFormat(idx)->CompareTo("db"))
|
||||||
ext = TString("db");
|
ext = TString("db");
|
||||||
|
else if (!runInfo.GetFileFormat(idx)->CompareTo("dat"))
|
||||||
|
ext = TString("dat");
|
||||||
else
|
else
|
||||||
success = false;
|
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 << ">> MDU-ASCII -> psi mdu ascii file format";
|
||||||
std::cerr << std::endl << ">> ASCII -> column like file format";
|
std::cerr << std::endl << ">> ASCII -> column like file format";
|
||||||
std::cerr << std::endl << ">> DB -> triumf db 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;
|
std::cerr << std::endl;
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
@ -4238,6 +4243,18 @@ Bool_t PRunDataHandler::ReadDBFile()
|
|||||||
return success;
|
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)
|
// WriteMusrRootFile (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -458,6 +458,9 @@ Bool_t PRunMuMinus::PrepareData()
|
|||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -198,6 +198,9 @@ Bool_t PRunNonMusr::PrepareData()
|
|||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (fRunInfo->GetRunNameSize() > 1) { // ADDRUN present which is not supported for NonMusr
|
if (fRunInfo->GetRunNameSize() > 1) { // ADDRUN present which is not supported for NonMusr
|
||||||
std::cerr << std::endl << ">> PRunNonMusr::PrepareData(): **WARNING** ADDRUN NOT SUPPORTED FOR THIS FIT TYPE, WILL IGNORE IT." << std::endl;
|
std::cerr << std::endl << ">> PRunNonMusr::PrepareData(): **WARNING** ADDRUN NOT SUPPORTED FOR THIS FIT TYPE, WILL IGNORE IT." << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -700,6 +700,9 @@ Bool_t PRunSingleHisto::PrepareData()
|
|||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -431,6 +431,9 @@ Bool_t PRunSingleHistoRRF::PrepareData()
|
|||||||
{
|
{
|
||||||
Bool_t success = true;
|
Bool_t success = true;
|
||||||
|
|
||||||
|
if (!fValid)
|
||||||
|
return false;
|
||||||
|
|
||||||
// keep the Global block info
|
// keep the Global block info
|
||||||
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
PMsrGlobalBlock *globalBlock = fMsrInfo->GetMsrGlobal();
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ class PRunDataHandler
|
|||||||
virtual Bool_t ReadMduAsciiFile();
|
virtual Bool_t ReadMduAsciiFile();
|
||||||
virtual Bool_t ReadAsciiFile();
|
virtual Bool_t ReadAsciiFile();
|
||||||
virtual Bool_t ReadDBFile();
|
virtual Bool_t ReadDBFile();
|
||||||
|
virtual Bool_t ReadDatFile();
|
||||||
|
|
||||||
virtual Bool_t WriteMusrRootFile(TString fln="");
|
virtual Bool_t WriteMusrRootFile(TString fln="");
|
||||||
virtual Bool_t WriteRootFile(TString fln="");
|
virtual Bool_t WriteRootFile(TString fln="");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user