some minor changes to improve the robustness for various msr-file dialects
This commit is contained in:
parent
bdbfe3b4df
commit
07f702167e
@ -92,7 +92,7 @@ cout << endl << "fLines[" << i << "] = '" << fLines[i].fLine.Data() << "'";
|
||||
tree_parse_info<> info = ast_parse(line.Data(), function, space_p);
|
||||
|
||||
if (info.full) {
|
||||
cout << endl << "parse successfull ..." << endl;
|
||||
cout << endl << "parse successful ..." << endl;
|
||||
PFunction func(info);
|
||||
fFuncs.push_back(func);
|
||||
} else {
|
||||
|
@ -736,7 +736,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
|
||||
iter = lines.begin();
|
||||
while ((iter != lines.end()) && !error) {
|
||||
|
||||
tokens = iter->fLine.Tokenize(" ");
|
||||
tokens = iter->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize Parameters in line " << iter->fLineNo;
|
||||
cout << endl << endl;
|
||||
@ -965,7 +965,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
||||
iter->fLine.ToLower();
|
||||
|
||||
// tokenize line
|
||||
tokens = iter->fLine.Tokenize(" ");
|
||||
tokens = iter->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize Parameters in line " << iter->fLineNo;
|
||||
cout << endl << endl;
|
||||
@ -1537,7 +1537,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
while ((iter1 != iter2) && !error) {
|
||||
|
||||
if (iter1->fLine.Contains("PLOT")) { // handle plot header
|
||||
tokens = iter1->fLine.Tokenize(" ");
|
||||
tokens = iter1->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||
cout << endl << endl;
|
||||
@ -1569,7 +1569,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
case MSR_PLOT_SINGLE_HISTO: // like: runs 1 5 13
|
||||
case MSR_PLOT_ASYM:
|
||||
case MSR_PLOT_NO_MUSR:
|
||||
tokens = iter1->fLine.Tokenize(" ");
|
||||
tokens = iter1->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||
cout << endl << endl;
|
||||
@ -1596,7 +1596,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
}
|
||||
break;
|
||||
case MSR_PLOT_ASYM_RRF: // like: runs 1,1 1,2
|
||||
tokens = iter1->fLine.Tokenize(" ");
|
||||
tokens = iter1->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||
cout << endl << endl;
|
||||
@ -1642,7 +1642,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
||||
}
|
||||
|
||||
if (iter1->fLine.Contains("range")) { // handle plot range
|
||||
tokens = iter1->fLine.Tokenize(" ");
|
||||
tokens = iter1->fLine.Tokenize(" \t");
|
||||
if (!tokens) {
|
||||
cout << endl << "SEVERE ERROR: Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||
cout << endl << endl;
|
||||
|
@ -443,7 +443,7 @@ bool PRunDataHandler::ReadNemuFile()
|
||||
|
||||
// read header
|
||||
bool headerInfo = true;
|
||||
char instr[128];
|
||||
char instr[512];
|
||||
TString line;
|
||||
double dval;
|
||||
int ival;
|
||||
@ -551,9 +551,11 @@ cout << endl << ">> time resolution : " << runData.fTimeResolution;
|
||||
histoData.push_back(val[i]);
|
||||
}
|
||||
|
||||
// save the last histo
|
||||
runData.fDataBin.push_back(histoData);
|
||||
histoData.clear();
|
||||
// save the last histo if not empty
|
||||
if (histoData.size() > 0) {
|
||||
runData.fDataBin.push_back(histoData);
|
||||
histoData.clear();
|
||||
}
|
||||
|
||||
// close file
|
||||
f.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user