From 8a5501ed71c91e9901167259a8a17bb09507d253 Mon Sep 17 00:00:00 2001 From: nemu Date: Wed, 8 Apr 2009 14:06:15 +0000 Subject: [PATCH] fixed unsigned int problem --- src/classes/PRunDataHandler.cpp | 4 ++++ src/classes/PTheory.cpp | 11 ++++++----- src/include/PTheory.h | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/classes/PRunDataHandler.cpp b/src/classes/PRunDataHandler.cpp index 843481f8..09c1b8b5 100644 --- a/src/classes/PRunDataHandler.cpp +++ b/src/classes/PRunDataHandler.cpp @@ -811,10 +811,12 @@ bool PRunDataHandler::ReadPsiBinFile() if (!success) return success; +/* cout << endl << "> " << psiBin.get_numberHisto_int() << ": "; for (int i=0; i " << psiBin.get_nameHisto(i); cout << endl; +*/ // fill necessary header informations PIntVector ivec; @@ -867,6 +869,8 @@ cout << endl; runData.fDataBin[i].clear(); runData.fDataBin.clear(); +// cout << endl << "end of ReadPsiBinFile() ..." << endl; + return success; } diff --git a/src/classes/PTheory.cpp b/src/classes/PTheory.cpp index a144cacd..e5eaaeb1 100644 --- a/src/classes/PTheory.cpp +++ b/src/classes/PTheory.cpp @@ -708,14 +708,12 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock) line = &(*fullTheoryBlock)[i]; // copy line content to str in order to remove comments str = line->fLine.Copy(); -//cout << endl << ">> str = " << str.Data(); // remove theory line comment if present, i.e. something starting with '(' int index = str.Index("("); if (index > 0) // theory line comment present str.Resize(index); // tokenize line tokens = str.Tokenize(" \t"); -//cout << endl << ">> #tokens=" << tokens->GetEntries() << ", str=" << str.Data(); // make a handable string out of the asymmetry token ostr = dynamic_cast(tokens->At(0)); str = ostr->GetString(); @@ -755,9 +753,12 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock) tidy += TString(substr); } if (fgTheoDataBase[idx].fComment.Length() != 0) { - unsigned int size = tidy.Length(); - for (unsigned int k=0; k<35-size; k++) + if (tidy.Length() < 35) { + for (unsigned int k=0; k<35-(unsigned int)tidy.Length(); k++) + tidy += TString(" "); + } else { tidy += TString(" "); + } if ((unsigned int)tokens->GetEntries() == fgTheoDataBase[idx].fNoOfParam + 1) // no tshift tidy += fgTheoDataBase[idx].fComment; else @@ -1519,7 +1520,7 @@ double PTheory::InternalField(register double t, const PDoubleVector& paramValue } double tt; - if (fParamNo.size() == 4) // no tshift + if (fParamNo.size() == 5) // no tshift tt = t; else // tshift present tt = t-val[5]; diff --git a/src/include/PTheory.h b/src/include/PTheory.h index 777fcd99..a077091f 100644 --- a/src/include/PTheory.h +++ b/src/include/PTheory.h @@ -165,7 +165,7 @@ static PTheoDataBase fgTheoDataBase[THEORY_MAX] = { "abragam", "ab", "(rate hopprate)", "(rate hopprate tshift)"}, {THEORY_INTERNAL_FIELD, THEORY_PARAM_INTERNAL_FIELD, false, - "internFld", "if", "(phase frequency Trate Lrate)", "(phase frequency Trate Lrate tshift)"}, + "internFld", "if", "(fraction phase frequency Trate Lrate)", "(fraction phase frequency Trate Lrate tshift)"}, {THEORY_TF_COS, THEORY_PARAM_TF_COS, false, "TFieldCos", "tf", "(phase frequency)", "(phase frequency tshift)"},