tried to improve the mlog output string handling

This commit is contained in:
nemu 2008-02-18 09:49:53 +00:00
parent 18a45afea1
commit 3bbd235a11
4 changed files with 17 additions and 10 deletions

View File

@ -31,6 +31,8 @@ short term:
* fix problems in FUNCTIONS of the form (sin(par1)) **DONE** 08-02-18 * fix problems in FUNCTIONS of the form (sin(par1)) **DONE** 08-02-18
* fix output problems of the mlog files
* implement table based theory functions (LF stuff) * implement table based theory functions (LF stuff)
* if a parameter is not used at all, minuit is still varying it!! This is stupid. * if a parameter is not used at all, minuit is still varying it!! This is stupid.

View File

@ -279,14 +279,16 @@ int PMsrHandler::WriteMsrLogFile()
f << left << param_iter->fName.Data(); f << left << param_iter->fName.Data();
f << " "; f << " ";
// value of the parameter // value of the parameter
f.width(10); f.width(9);
f.precision(prec); f.precision(prec);
f << left << param_iter->fValue; f << left << param_iter->fValue;
f << " ";
// value of step/error/neg.error // value of step/error/neg.error
f.width(12); f.width(11);
f.precision(prec); f.precision(prec);
f << left << param_iter->fStep; f << left << param_iter->fStep;
f.width(12); f << " ";
f.width(11);
f.precision(prec); f.precision(prec);
if ((param_iter->fNoOfParams == 5) || (param_iter->fNoOfParams == 7)) // pos. error given if ((param_iter->fNoOfParams == 5) || (param_iter->fNoOfParams == 7)) // pos. error given
if (param_iter->fPosErrorPresent) // pos error is a number if (param_iter->fPosErrorPresent) // pos error is a number
@ -295,14 +297,17 @@ int PMsrHandler::WriteMsrLogFile()
f << left << "none"; f << left << "none";
else // no pos. error else // no pos. error
f << left << "none"; f << left << "none";
f << " ";
// boundaries // boundaries
if (param_iter->fNoOfParams > 5) { if (param_iter->fNoOfParams > 5) {
f.width(8); f.width(7);
f.precision(prec); f.precision(prec);
f << left << param_iter->fLowerBoundary; f << left << param_iter->fLowerBoundary;
f.width(8); f << " ";
f.width(7);
f.precision(prec); f.precision(prec);
f << left << param_iter->fUpperBoundary; f << left << param_iter->fUpperBoundary;
f << " ";
} }
// terminate line // terminate line
f << endl; f << endl;

View File

@ -12,19 +12,20 @@ int main()
} }
const int prec=6; const int prec=6;
double val = 0.258466548916354835498465; double val1 = 0.258466548916354835498465;
double val2 = 0.000258466548916354835498465;
f.width(9); f.width(9);
f.precision(prec); f.precision(prec);
f << left << val; f << left << val1;
f << " "; f << " ";
f.width(9); f.width(9);
f.precision(prec); f.precision(prec);
f << left << val; f << left << val2;
f << " "; f << " ";
f.width(9); f.width(9);
f.precision(prec); f.precision(prec);
f << left << val; f << left << val1;
f.close(); f.close();

View File

@ -1 +0,0 @@
0.258467 0.258467 0.258467