fixed unsigned int problem

This commit is contained in:
nemu 2009-04-08 14:06:15 +00:00
parent a6efc88bf1
commit 8a5501ed71
3 changed files with 11 additions and 6 deletions

View File

@ -811,10 +811,12 @@ bool PRunDataHandler::ReadPsiBinFile()
if (!success)
return success;
/*
cout << endl << "> " << psiBin.get_numberHisto_int() << ": ";
for (int i=0; i<psiBin.get_numberHisto_int(); i++)
cout << endl << "> " << 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;
}

View File

@ -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<TObjString*>(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];

View File

@ -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)"},