diff --git a/src/classes/PFitter.cpp b/src/classes/PFitter.cpp
index 6349c37a..b78c0b0a 100644
--- a/src/classes/PFitter.cpp
+++ b/src/classes/PFitter.cpp
@@ -65,7 +65,7 @@ using namespace std;
* \param runListCollection
* \param chisq_only
*/
-PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, bool chisq_only) :
+PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bool_t chisq_only) :
fChisqOnly(chisq_only), fRunInfo(runInfo)
{
fConverged = false;
@@ -128,22 +128,22 @@ PFitter::~PFitter()
*
*
*/
-bool PFitter::DoFit()
+Bool_t PFitter::DoFit()
{
// feed minuit parameters
SetParameters();
// check if only chisq/maxLH shall be calculated once
if (fChisqOnly) {
- std::vector param = fMnUserParams.Params();
- std::vector error = fMnUserParams.Errors();
- int usedParams = 0;
- for (unsigned int i=0; i param = fMnUserParams.Params();
+ std::vector error = fMnUserParams.Errors();
+ Int_t usedParams = 0;
+ for (UInt_t i=0; iGetTotalNoOfFittedBins() - usedParams;
- double val = (*fFitterFcn)(param);
+ Int_t ndf = fFitterFcn->GetTotalNoOfFittedBins() - usedParams;
+ Double_t val = (*fFitterFcn)(param);
if (fUseChi2) {
cout << endl << endl << ">> chisq = " << val << ", NDF = " << ndf << ", chisq/NDF = " << val/ndf;
} else { // max. log likelihood
@@ -159,32 +159,32 @@ bool PFitter::DoFit()
else
cout << endl << "Maximum Likelihood fit will be executed" << endl;
- bool status = true;
+ Bool_t status = true;
// init positive errors to default false, if minos is called, it will be set true there
- for (unsigned int i=0; iSetMsrParamPosErrorPresent(i, false);
}
- for (unsigned int i=0; iSetMsrParamPosErrorPresent(i, true);
}
}
break;
case PMN_PLOT:
- cout << endl << "**WARNING** from PFitter::DoFit() : the command PLOT is not yet implemented.";
- cout << endl;
+ cerr << endl << "**WARNING** from PFitter::DoFit() : the command PLOT is not yet implemented.";
+ cerr << endl;
break;
case PMN_SAVE:
status = ExecuteSave();
@@ -214,19 +214,20 @@ bool PFitter::DoFit()
status = ExecuteSimplex();
break;
case PMN_USER_COVARIANCE:
- cout << endl << "**WARNING** from PFitter::DoFit() : the command USER_COVARIANCE is not yet implemented.";
- cout << endl;
+ cerr << endl << "**WARNING** from PFitter::DoFit() : the command USER_COVARIANCE is not yet implemented.";
+ cerr << endl;
break;
case PMN_USER_PARAM_STATE:
- cout << endl << "**WARNING** from PFitter::DoFit() : the command USER_PARAM_STATE is not yet implemented.";
- cout << endl;
+ cerr << endl << "**WARNING** from PFitter::DoFit() : the command USER_PARAM_STATE is not yet implemented.";
+ cerr << endl;
break;
case PMN_PRINT:
- cout << endl << "**WARNING** from PFitter::DoFit() : the command PRINT is not yet implemented.";
- cout << endl;
+ cerr << endl << "**WARNING** from PFitter::DoFit() : the command PRINT is not yet implemented.";
+ cerr << endl;
break;
default:
- cout << endl << "**PANIC ERROR**: PFitter::DoFit(): You should never have reached this point" << endl;
+ cerr << endl << "**PANIC ERROR**: PFitter::DoFit(): You should never have reached this point";
+ cerr << endl;
exit(0);
break;
}
@@ -252,7 +253,7 @@ bool PFitter::DoFit()
*
*
*/
-bool PFitter::CheckCommands()
+Bool_t PFitter::CheckCommands()
{
fIsValid = true;
@@ -328,11 +329,11 @@ bool PFitter::CheckCommands()
} else if (it->fLine.Contains("PRINT")) {
fCmdList.push_back(PMN_PRINT);
} else { // unkown command
- cout << endl << "FATAL ERROR:";
- cout << endl << "PFitter::CheckCommands(): In line " << it->fLineNo << " an unkown command is found:";
- cout << endl << " " << it->fLine.Data();
- cout << endl << "Will stop ...";
- cout << endl;
+ cerr << endl << "**FATAL ERROR**";
+ cerr << endl << "PFitter::CheckCommands(): In line " << it->fLineNo << " an unkown command is found:";
+ cerr << endl << " " << it->fLine.Data();
+ cerr << endl << "Will stop ...";
+ cerr << endl;
fIsValid = false;
}
}
@@ -347,9 +348,9 @@ bool PFitter::CheckCommands()
*
*
*/
-bool PFitter::SetParameters()
+Bool_t PFitter::SetParameters()
{
- for (unsigned int i=0; iParameterInUse(i) == 0) && (fParams[i].fStep != 0.0)) {
fMnUserParams.Fix(i); // fix the unused parameter so that minuit will not vary it
- cout << endl << "**WARNING** : Parameter No " << i+1 << " is not used at all, will fix it" << endl;
+ cerr << endl << "**WARNING** : Parameter No " << i+1 << " is not used at all, will fix it";
+ cerr << endl;
}
}
@@ -398,7 +400,7 @@ bool PFitter::SetParameters()
*
*
*/
-bool PFitter::ExecuteHesse()
+Bool_t PFitter::ExecuteHesse()
{
cout << "PFitter::ExecuteHesse(): will call hesse ..." << endl;
@@ -410,14 +412,14 @@ bool PFitter::ExecuteHesse()
ROOT::Minuit2::MnHesse hesse;
// specify maximal number of function calls
- unsigned int maxfcn = numeric_limits::max();
+ UInt_t maxfcn = numeric_limits::max();
// call hesse
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), fMnUserParams, maxfcn);
if (!mnState.IsValid()) {
- cout << endl << "**WARNING** PFitter::ExecuteHesse(): Hesse encountered some problems!";
- cout << endl;
+ cerr << endl << "**WARNING** PFitter::ExecuteHesse(): Hesse encountered some problems!";
+ cerr << endl;
return false;
}
@@ -428,7 +430,7 @@ bool PFitter::ExecuteHesse()
fMnUserParamState = new ROOT::Minuit2::MnUserParameterState(mnState);
// fill parabolic errors
- for (unsigned int i=0; iSetMsrParamStep(i, mnState.Error(i));
fRunInfo->SetMsrParamPosErrorPresent(i, false);
}
@@ -443,7 +445,7 @@ bool PFitter::ExecuteHesse()
*
*
*/
-bool PFitter::ExecuteMigrad()
+Bool_t PFitter::ExecuteMigrad()
{
cout << "PFitter::ExecuteMigrad(): will call migrad ..." << endl;
@@ -457,12 +459,13 @@ bool PFitter::ExecuteMigrad()
// minimize
// maxfcn is MINUIT2 Default maxfcn
- unsigned int maxfcn = numeric_limits::max();
+ UInt_t maxfcn = numeric_limits::max();
// tolerance = MINUIT2 Default tolerance
- double tolerance = 0.1;
+ Double_t tolerance = 0.1;
ROOT::Minuit2::FunctionMinimum min = migrad(maxfcn, tolerance);
if (!min.IsValid()) {
- cout << endl << "**WARNING**: PFitter::ExecuteMigrad(): Fit did not converge, sorry ...";
+ cerr << endl << "**WARNING**: PFitter::ExecuteMigrad(): Fit did not converge, sorry ...";
+ cerr << endl;
fIsValid = false;
return false;
}
@@ -480,17 +483,17 @@ bool PFitter::ExecuteMigrad()
fMnUserParamState = new ROOT::Minuit2::MnUserParameterState(min.UserState());
// fill run info
- for (unsigned int i=0; iSetMsrParamValue(i, min.UserState().Value(i));
fRunInfo->SetMsrParamStep(i, min.UserState().Error(i));
fRunInfo->SetMsrParamPosErrorPresent(i, false);
}
// handle statistics
- double minVal = min.Fval();
- unsigned int ndf = fFitterFcn->GetTotalNoOfFittedBins();
+ Double_t minVal = min.Fval();
+ UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
- for (unsigned int i=0; i
*
*/
-bool PFitter::ExecuteMinimize()
+Bool_t PFitter::ExecuteMinimize()
{
cout << "PFitter::ExecuteMinimize(): will call minimize ..." << endl;
@@ -525,13 +528,14 @@ bool PFitter::ExecuteMinimize()
// minimize
// maxfcn is MINUIT2 Default maxfcn
- unsigned int maxfcn = numeric_limits::max();
+ UInt_t maxfcn = numeric_limits::max();
//cout << endl << "maxfcn=" << maxfcn << endl;
// tolerance = MINUIT2 Default tolerance
- double tolerance = 0.1;
+ Double_t tolerance = 0.1;
ROOT::Minuit2::FunctionMinimum min = minimize(maxfcn, tolerance);
if (!min.IsValid()) {
- cout << endl << "**WARNING**: PFitter::ExecuteMinimize(): Fit did not converge, sorry ...";
+ cerr << endl << "**WARNING**: PFitter::ExecuteMinimize(): Fit did not converge, sorry ...";
+ cerr << endl;
fIsValid = false;
return false;
}
@@ -549,17 +553,17 @@ bool PFitter::ExecuteMinimize()
fMnUserParamState = new ROOT::Minuit2::MnUserParameterState(min.UserState());
// fill run info
- for (unsigned int i=0; iSetMsrParamValue(i, min.UserState().Value(i));
fRunInfo->SetMsrParamStep(i, min.UserState().Error(i));
fRunInfo->SetMsrParamPosErrorPresent(i, false);
}
// handle statistics
- double minVal = min.Fval();
- unsigned int ndf = fFitterFcn->GetTotalNoOfFittedBins();
+ Double_t minVal = min.Fval();
+ UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
- for (unsigned int i=0; i
*
*/
-bool PFitter::ExecuteMinos()
+Bool_t PFitter::ExecuteMinos()
{
cout << "PFitter::ExecuteMinos(): will call minos ..." << endl;
// if already some minimization is done use the minuit2 output as input
if (!fFcnMin) {
- cout << endl << "**ERROR**: MINOS musn't be called before any minimization (MINIMIZE/MIGRAD/SIMPLEX) is done!!";
- cout << endl;
+ cerr << endl << "**ERROR**: MINOS musn't be called before any minimization (MINIMIZE/MIGRAD/SIMPLEX) is done!!";
+ cerr << endl;
return false;
}
// check if minimum was valid
if (!fFcnMin->IsValid()) {
- cout << endl << "**ERROR**: MINOS cannot started since the previous minimization failed :-(";
- cout << endl;
+ cerr << endl << "**ERROR**: MINOS cannot started since the previous minimization failed :-(";
+ cerr << endl;
return false;
}
@@ -603,7 +607,7 @@ bool PFitter::ExecuteMinos()
// make minos analysis
ROOT::Minuit2::MnMinos minos((*fFitterFcn), (*fFcnMin));
- for (unsigned int i=0; i
*
*/
-bool PFitter::ExecuteSave()
+Bool_t PFitter::ExecuteSave()
{
// if any minimization was done, otherwise get out immediately
if (!fFcnMin) {
@@ -643,8 +647,8 @@ bool PFitter::ExecuteSave()
// check if the user parameter state is valid
if (!mnState.IsValid()) {
- cout << endl << "**WARNING** Minuit2 User Parameter State is not valid, i.e. nothing to be saved";
- cout << endl;
+ cerr << endl << "**WARNING** Minuit2 User Parameter State is not valid, i.e. nothing to be saved";
+ cerr << endl;
return false;
}
@@ -655,8 +659,8 @@ bool PFitter::ExecuteSave()
// open minuit2 output file
fout.open("MINUIT2.OUTPUT", iostream::out);
if (!fout.is_open()) {
- cout << endl << "**ERROR** PFitter::ExecuteSave() couldn't open MINUIT2.OUTPUT file";
- cout << endl;
+ cerr << endl << "**ERROR** PFitter::ExecuteSave() couldn't open MINUIT2.OUTPUT file";
+ cerr << endl;
return false;
}
@@ -678,14 +682,14 @@ bool PFitter::ExecuteSave()
fout << endl << "-------------------------------------------------------------------------";
fout << endl << " Parabolic Minos";
fout << endl << " No Name Value Error Negative Positive Limits";
- for (unsigned int i=0; i 0.0) {
@@ -778,7 +782,7 @@ bool PFitter::ExecuteSave()
ROOT::Minuit2::MnUserCovariance cov = mnState.Covariance();
PIntVector parNo;
fout << endl << " No Global ";
- for (unsigned int i=0; iParameterInUse(i) > 0) {
fout.setf(ios::left, ios::adjustfield);
@@ -789,8 +793,8 @@ bool PFitter::ExecuteSave()
}
// check that there is a correspondens between minuit2 and musrfit book keeping
if (parNo.size() != cov.Nrow()) {
- cout << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): minuit2 and musrfit book keeping to not correspond! Unable to write correlation matrix.";
- cout << endl;
+ cerr << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): minuit2 and musrfit book keeping to not correspond! Unable to write correlation matrix.";
+ cerr << endl;
} else { // book keeping is OK
TString title("Minuit2 Output Correlation Matrix for ");
title += fRunInfo->GetFileName();
@@ -798,8 +802,8 @@ bool PFitter::ExecuteSave()
title += dt.AsSQLString();
TCanvas *ccorr = new TCanvas("ccorr", "title", 500, 500);
TH2D *hcorr = new TH2D("hcorr", title, cov.Nrow(), 0.0, cov.Nrow(), cov.Nrow(), 0.0, cov.Nrow());
- double dval;
- for (unsigned int i=0; iFill((double)i,(double)i,1.0);
+ hcorr->Fill((Double_t)i,(Double_t)i,1.0);
} else {
// check that errors are none zero
if (fMnUserParams.Error(parNo[i]) == 0.0) {
- cout << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): parameter no " << parNo[i]+1 << " has an error == 0. Cannot correctly handle the correlation matrix.";
- cout << endl;
+ cerr << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): parameter no " << parNo[i]+1 << " has an error == 0. Cannot correctly handle the correlation matrix.";
+ cerr << endl;
dval = 0.0;
} else if (fMnUserParams.Error(parNo[j]) == 0.0) {
- cout << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): parameter no " << parNo[j]+1 << " has an error == 0. Cannot correctly handle the correlation matrix.";
- cout << endl;
+ cerr << endl << "**SEVERE ERROR** in PFitter::ExecuteSave(): parameter no " << parNo[j]+1 << " has an error == 0. Cannot correctly handle the correlation matrix.";
+ cerr << endl;
dval = 0.0;
} else {
dval = cov(i,j)/(fMnUserParams.Error(parNo[i])*fMnUserParams.Error(parNo[j]));
}
- hcorr->Fill((double)i,(double)j,dval);
+ hcorr->Fill((Double_t)i,(Double_t)j,dval);
// handle precision, ugly but ...
if (dval < 1.0e-2) {
fout.precision(2);
@@ -886,7 +890,7 @@ bool PFitter::ExecuteSave()
*
*
*/
-bool PFitter::ExecuteSimplex()
+Bool_t PFitter::ExecuteSimplex()
{
cout << "PFitter::ExecuteSimplex(): will call simplex ..." << endl;
@@ -900,12 +904,13 @@ bool PFitter::ExecuteSimplex()
// minimize
// maxfcn is 10*MINUIT2 Default maxfcn
- unsigned int maxfcn = numeric_limits::max();
+ UInt_t maxfcn = numeric_limits::max();
// tolerance = MINUIT2 Default tolerance
- double tolerance = 0.1;
+ Double_t tolerance = 0.1;
ROOT::Minuit2::FunctionMinimum min = simplex(maxfcn, tolerance);
if (!min.IsValid()) {
- cout << endl << "**WARNING**: PFitter::ExecuteSimplex(): Fit did not converge, sorry ...";
+ cerr << endl << "**WARNING**: PFitter::ExecuteSimplex(): Fit did not converge, sorry ...";
+ cerr << endl;
fIsValid = false;
return false;
}
@@ -917,17 +922,17 @@ bool PFitter::ExecuteSimplex()
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
// fill run info
- for (unsigned int i=0; iSetMsrParamValue(i, min.UserState().Value(i));
fRunInfo->SetMsrParamStep(i, min.UserState().Error(i));
fRunInfo->SetMsrParamPosErrorPresent(i, false);
}
// handle statistics
- double minVal = min.Fval();
- unsigned int ndf = fFitterFcn->GetTotalNoOfFittedBins();
+ Double_t minVal = min.Fval();
+ UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
- for (unsigned int i=0; iGetNoOfAsymmetry() > 0) ||
(fRunListCollection->GetNoOfRRF() > 0) ||
(fRunListCollection->GetNoOfNonMusr() > 0)) {
- cout << endl << "**WARNING**: Maximum Log Likelihood Fit is only implemented for Single Histogram Fit";
- cout << endl << " Will fall back to Chi Square Fit.";
- cout << endl;
+ cerr << endl << "**WARNING**: Maximum Log Likelihood Fit is only implemented for Single Histogram Fit";
+ cerr << endl << " Will fall back to Chi Square Fit.";
+ cerr << endl;
}
}
}
@@ -84,9 +84,9 @@ PFitterFcn::~PFitterFcn()
*
* \param par
*/
-double PFitterFcn::operator()(const std::vector& par) const
+Double_t PFitterFcn::operator()(const std::vector& par) const
{
- double value = 0.0;
+ Double_t value = 0.0;
if (fUseChi2) { // chi square
value += fRunListCollection->GetSingleHistoChisq(par);
@@ -101,7 +101,7 @@ double PFitterFcn::operator()(const std::vector& par) const
}
// cout << endl;
-// for (unsigned int i=0; i
*
*/
-PFourier::PFourier(TH1F *data, int unitTag, double startTime, double endTime, unsigned int zeroPaddingPower) :
+PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTime, UInt_t zeroPaddingPower) :
fData(data), fUnitTag(unitTag), fStartTime(startTime), fEndTime(endTime),
fZeroPaddingPower(zeroPaddingPower)
{
// some necessary checks and initialization
if (fData == 0) {
- cout << endl << "**ERROR** PFourier::PFourier: no valid data" << endl << endl;
+ cerr << endl << "**ERROR** PFourier::PFourier: no valid data" << endl << endl;
fValid = false;
return;
}
//cout << endl << "PFourier::PFourier: fData = " << fData;
/*
-for (unsigned int i=0; i<10; i++) {
+for (UInt_t i=0; i<10; i++) {
cout << endl << "PFourier::PFourier: i=" << i << ", t=" << fData->GetBinCenter(i) << ", value=" << fData->GetBinContent(i);
}
*/
@@ -83,14 +83,14 @@ for (unsigned int i=0; i<10; i++) {
// if endTime == 0 set it to the last time slot
if (fEndTime == 0.0) {
- int last = fData->GetNbinsX()-1;
+ Int_t last = fData->GetNbinsX()-1;
fEndTime = fData->GetBinCenter(last);
//cout << endl << ">> fEndTime = " << fEndTime;
}
// swap start and end time if necessary
if (fStartTime > fEndTime) {
- double keep = fStartTime;
+ Double_t keep = fStartTime;
fStartTime = fEndTime;
fEndTime = keep;
}
@@ -98,15 +98,15 @@ for (unsigned int i=0; i<10; i++) {
//cout << endl << "start time = " << fStartTime << endl;
// calculate start and end bin
- unsigned int start = (unsigned int)(fStartTime/fTimeResolution);
- unsigned int end = (unsigned int)(fEndTime/fTimeResolution);
+ UInt_t start = (UInt_t)(fStartTime/fTimeResolution);
+ UInt_t end = (UInt_t)(fEndTime/fTimeResolution);
fNoOfData = end-start;
//cout << endl << ">> fNoOfData = " << fNoOfData;
// check if zero padding is whished
if (fZeroPaddingPower > 0) {
- unsigned int noOfBins = static_cast(pow(2.0, static_cast(fZeroPaddingPower)));
+ UInt_t noOfBins = static_cast(pow(2.0, static_cast(fZeroPaddingPower)));
if (noOfBins > fNoOfData)
fNoOfBins = noOfBins;
else
@@ -118,7 +118,7 @@ for (unsigned int i=0; i<10; i++) {
//cout << endl << ">> fNoOfBins = " << fNoOfBins;
// calculate fourier resolution
- double resolution = 1.0/(fTimeResolution*fNoOfBins); // in MHz
+ Double_t resolution = 1.0/(fTimeResolution*fNoOfBins); // in MHz
switch (fUnitTag) {
case FOURIER_UNIT_FIELD:
fResolution = resolution/F_GAMMA_BAR_MUON;
@@ -186,7 +186,7 @@ PFourier::~PFourier()
*
* \param apodizationTag 0=no apod., 1=weak apod., 2=medium apod., 3=strong apod.
*/
-void PFourier::Transform(unsigned int apodizationTag)
+void PFourier::Transform(UInt_t apodizationTag)
{
if (!fValid)
return;
@@ -196,8 +196,8 @@ void PFourier::Transform(unsigned int apodizationTag)
fftw_execute(fFFTwPlan);
// correct the phase for tstart != 0.0
- double phase, re, im;
- for (unsigned int i=0; iGetName());
snprintf(title, sizeof(title), "%s_Fourier_Re", fData->GetTitle());
- TH1F *realFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (double)fNoOfBins/2.0*fResolution+fResolution/2.0);
+ TH1F *realFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (Double_t)fNoOfBins/2.0*fResolution+fResolution/2.0);
if (realFourier == 0) {
fValid = false;
- cout << endl << "**SEVERE ERROR** couldn't allocate memory for the real part of the Fourier transform." << endl;
+ cerr << endl << "**SEVERE ERROR** couldn't allocate memory for the real part of the Fourier transform." << endl;
return 0;
}
// fill realFourier vector
- for (unsigned int i=0; iSetBinContent(i+1, scale*fOut[i][0]);
realFourier->SetBinError(i+1, 0.0);
}
@@ -250,27 +250,27 @@ TH1F* PFourier::GetRealFourier(const double scale)
*
* \param scale
*/
-TH1F* PFourier::GetImaginaryFourier(const double scale)
+TH1F* PFourier::GetImaginaryFourier(const Double_t scale)
{
// check if valid flag is set
if (!fValid)
return 0;
// invoke imaginaryFourier
- char name[256];
- char title[256];
+ Char_t name[256];
+ Char_t title[256];
snprintf(name, sizeof(name), "%s_Fourier_Im", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Im", fData->GetTitle());
- TH1F* imaginaryFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (double)fNoOfBins/2.0*fResolution+fResolution/2.0);
+ TH1F* imaginaryFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (Double_t)fNoOfBins/2.0*fResolution+fResolution/2.0);
if (imaginaryFourier == 0) {
fValid = false;
- cout << endl << "**SEVERE ERROR** couldn't allocate memory for the imaginary part of the Fourier transform." << endl;
+ cerr << endl << "**SEVERE ERROR** couldn't allocate memory for the imaginary part of the Fourier transform." << endl;
return 0;
}
// fill imaginaryFourier vector
- for (unsigned int i=0; iSetBinContent(i+1, scale*fOut[i][1]);
imaginaryFourier->SetBinError(i+1, 0.0);
}
@@ -286,27 +286,27 @@ TH1F* PFourier::GetImaginaryFourier(const double scale)
*
* \param scale
*/
-TH1F* PFourier::GetPowerFourier(const double scale)
+TH1F* PFourier::GetPowerFourier(const Double_t scale)
{
// check if valid flag is set
if (!fValid)
return 0;
// invoke powerFourier
- char name[256];
- char title[256];
+ Char_t name[256];
+ Char_t title[256];
snprintf(name, sizeof(name), "%s_Fourier_Pwr", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Pwr", fData->GetTitle());
- TH1F* pwrFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (double)fNoOfBins/2.0*fResolution+fResolution/2.0);
+ TH1F* pwrFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (Double_t)fNoOfBins/2.0*fResolution+fResolution/2.0);
if (pwrFourier == 0) {
fValid = false;
- cout << endl << "**SEVERE ERROR** couldn't allocate memory for the power part of the Fourier transform." << endl;
+ cerr << endl << "**SEVERE ERROR** couldn't allocate memory for the power part of the Fourier transform." << endl;
return 0;
}
// fill powerFourier vector
- for (unsigned int i=0; iSetBinContent(i+1, scale*sqrt(fOut[i][0]*fOut[i][0]+fOut[i][1]*fOut[i][1]));
pwrFourier->SetBinError(i+1, 0.0);
}
@@ -322,28 +322,28 @@ TH1F* PFourier::GetPowerFourier(const double scale)
*
* \param scale
*/
-TH1F* PFourier::GetPhaseFourier(const double scale)
+TH1F* PFourier::GetPhaseFourier(const Double_t scale)
{
// check if valid flag is set
if (!fValid)
return 0;
// invoke phaseFourier
- char name[256];
- char title[256];
+ Char_t name[256];
+ Char_t title[256];
snprintf(name, sizeof(name), "%s_Fourier_Phase", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Phase", fData->GetTitle());
- TH1F* phaseFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (double)fNoOfBins/2.0*fResolution+fResolution/2.0);
+ TH1F* phaseFourier = new TH1F(name, title, fNoOfBins/2, -fResolution/2.0, (Double_t)fNoOfBins/2.0*fResolution+fResolution/2.0);
if (phaseFourier == 0) {
fValid = false;
- cout << endl << "**SEVERE ERROR** couldn't allocate memory for the phase part of the Fourier transform." << endl;
+ cerr << endl << "**SEVERE ERROR** couldn't allocate memory for the phase part of the Fourier transform." << endl;
return 0;
}
// fill phaseFourier vector
- double value = 0.0;
- for (unsigned int i=0; i= 0.0)
@@ -374,12 +374,12 @@ TH1F* PFourier::GetPhaseFourier(const double scale)
*
*
*/
-void PFourier::PrepareFFTwInputData(unsigned int apodizationTag)
+void PFourier::PrepareFFTwInputData(UInt_t apodizationTag)
{
// 1st find t==0. fData start at times t<0!!
- int t0bin = -1;
+ Int_t t0bin = -1;
//cout << ">> PFourier::PrepareFFTwInputData: fData=" << fData << ", fData->GetNbinsX() = " << fData->GetNbinsX();
- for (int i=1; iGetNbinsX(); i++) {
+ for (Int_t i=1; iGetNbinsX(); i++) {
//if (i<20) cout << endl << ">> PFourier::PrepareFFTwInputData: i=" << i << ", fData->GetBinCenter(i)=" << fData->GetBinCenter(i);
if (fData->GetBinCenter(i) >= 0.0) {
t0bin = i;
@@ -389,13 +389,13 @@ void PFourier::PrepareFFTwInputData(unsigned int apodizationTag)
//cout << endl << "t0bin = " << t0bin << endl;
// 2nd fill fIn
- unsigned int start = (unsigned int)(fStartTime/fTimeResolution) + t0bin;
+ UInt_t start = (UInt_t)(fStartTime/fTimeResolution) + t0bin;
//cout << endl << "start = " << start << endl;
- for (unsigned int i=0; iGetBinContent(i+start);
fIn[i][1] = 0.0;
}
- for (unsigned int i=fNoOfData; i> PFourier::PrepareFFTwInputData: fNoOfData = " << fNoOfData << ", fNoOfBins = " << fNoOfBins << endl;
-for (unsigned int i=0; i<10; i++) {
+for (UInt_t i=0; i<10; i++) {
cout << endl << ">> PFourier::PrepareFFTwInputData: " << i << ": fIn[i][0] = " << fIn[i][0];
}
cout << endl;
@@ -421,14 +421,14 @@ cout << endl;
*
* \param apodizationTag
*/
-void PFourier::ApodizeData(int apodizationTag) {
+void PFourier::ApodizeData(Int_t apodizationTag) {
- const double cweak[3] = { 0.384093, -0.087577, 0.703484 };
- const double cmedium[3] = { 0.152442, -0.136176, 0.983734 };
- const double cstrong[3] = { 0.045335, 0.554883, 0.399782 };
+ const Double_t cweak[3] = { 0.384093, -0.087577, 0.703484 };
+ const Double_t cmedium[3] = { 0.152442, -0.136176, 0.983734 };
+ const Double_t cstrong[3] = { 0.045335, 0.554883, 0.399782 };
- double c[5];
- for (unsigned int i=0; i<5; i++) {
+ Double_t c[5];
+ for (UInt_t i=0; i<5; i++) {
c[i] = 0.0;
}
@@ -454,15 +454,15 @@ void PFourier::ApodizeData(int apodizationTag) {
c[4] = cstrong[2];
break;
default:
- cout << endl << ">> **ERROR** User Apodization tag " << apodizationTag << " unknown, sorry ..." << endl;
+ cerr << endl << ">> **ERROR** User Apodization tag " << apodizationTag << " unknown, sorry ..." << endl;
break;
}
- double q;
- for (unsigned int i=0; i> realID: value = " << dvalue;
@@ -216,7 +216,8 @@ void PFunction::FillFuncEvalTree(iter_t const& i, PFuncTreeNode &node)
else if (!strcmp(str.c_str(), "EXP"))
node.fFunctionTag = FUN_EXP;
else {
- cout << endl << "**PANIC ERROR**: function " << str << " doesn't exist, but you never should have reached this point!";
+ cerr << endl << "**PANIC ERROR**: function " << str << " doesn't exist, but you never should have reached this point!";
+ cerr << endl;
assert(0);
}
// add node
@@ -286,7 +287,7 @@ else
* \param mapSize
* \param paramSize
*/
-bool PFunction::CheckMapAndParamRange(unsigned int mapSize, unsigned int paramSize)
+Bool_t PFunction::CheckMapAndParamRange(UInt_t mapSize, UInt_t paramSize)
{
return FindAndCheckMapAndParamRange(fFunc, mapSize, paramSize);
}
@@ -301,7 +302,7 @@ bool PFunction::CheckMapAndParamRange(unsigned int mapSize, unsigned int paramSi
* \param mapSize
* \param paramSize
*/
-bool PFunction::FindAndCheckMapAndParamRange(PFuncTreeNode &node, unsigned int mapSize, unsigned int paramSize)
+Bool_t PFunction::FindAndCheckMapAndParamRange(PFuncTreeNode &node, UInt_t mapSize, UInt_t paramSize)
{
if (node.fID == PFunctionGrammar::realID) {
return true;
@@ -310,12 +311,12 @@ bool PFunction::FindAndCheckMapAndParamRange(PFuncTreeNode &node, unsigned int m
} else if (node.fID == PFunctionGrammar::constGammaMuID) {
return true;
} else if (node.fID == PFunctionGrammar::parameterID) {
- if (node.fIvalue <= (int) paramSize)
+ if (node.fIvalue <= (Int_t) paramSize)
return true;
else
return false;
} else if (node.fID == PFunctionGrammar::mapID) {
- if (node.fIvalue <= (int) mapSize)
+ if (node.fIvalue <= (Int_t) mapSize)
return true;
else
return false;
@@ -334,7 +335,8 @@ bool PFunction::FindAndCheckMapAndParamRange(PFuncTreeNode &node, unsigned int m
else
return false;
} else {
- cout << endl << "**PANIC ERROR**: PFunction::FindAndCheckMapAndParamRange: you never should have reached this point!" << endl;
+ cerr << endl << "**PANIC ERROR**: PFunction::FindAndCheckMapAndParamRange: you never should have reached this point!";
+ cerr << endl;
assert(0);
}
return true;
@@ -347,7 +349,7 @@ bool PFunction::FindAndCheckMapAndParamRange(PFuncTreeNode &node, unsigned int m
*
*
*/
-double PFunction::Eval(vector param)
+Double_t PFunction::Eval(vector param)
{
fParam = param;
@@ -362,7 +364,7 @@ double PFunction::Eval(vector param)
*
* \param node
*/
-double PFunction::EvalNode(PFuncTreeNode &node)
+Double_t PFunction::EvalNode(PFuncTreeNode &node)
{
if (node.fID == PFunctionGrammar::realID) {
return node.fDvalue;
@@ -409,7 +411,8 @@ double PFunction::EvalNode(PFuncTreeNode &node)
} else if (node.fFunctionTag == FUN_EXP) {
return exp(EvalNode(node.children[0]));
} else {
- cout << endl << "**PANIC ERROR**: PFunction::EvalNode: node.fID == PFunctionGrammar::functionID: you never should have reached this point!" << endl;
+ cerr << endl << "**PANIC ERROR**: PFunction::EvalNode: node.fID == PFunctionGrammar::functionID: you never should have reached this point!";
+ cerr << endl;
assert(0);
}
} else if (node.fID == PFunctionGrammar::factorID) {
@@ -418,9 +421,10 @@ double PFunction::EvalNode(PFuncTreeNode &node)
if (node.fOperatorTag == OP_MUL) {
return EvalNode(node.children[0]) * EvalNode(node.children[1]);
} else {
- double denominator = EvalNode(node.children[1]);
+ Double_t denominator = EvalNode(node.children[1]);
if (denominator == 0.0) {
- cout << endl << "**PANIC ERROR**: PFunction::EvalNode: division by 0.0" << endl;
+ cerr << endl << "**PANIC ERROR**: PFunction::EvalNode: division by 0.0";
+ cerr << endl;
assert(0);
}
return EvalNode(node.children[0]) / denominator;
@@ -432,7 +436,8 @@ double PFunction::EvalNode(PFuncTreeNode &node)
return EvalNode(node.children[0]) - EvalNode(node.children[1]);
}
} else {
- cout << endl << "**PANIC ERROR**: PFunction::EvalNode: you never should have reached this point!" << endl;
+ cerr << endl << "**PANIC ERROR**: PFunction::EvalNode: you never should have reached this point!";
+ cerr << endl;
assert(0);
}
return 0.0;
@@ -462,7 +467,7 @@ void PFunction::CleanupFuncEvalTree()
void PFunction::CleanupNode(PFuncTreeNode &node)
{
if (node.children.size() != 0) {
- for (unsigned int i=0; i info)
*/
void PFunction::EvalTreeForStringExpression(iter_t const& i)
{
- static int termOp = 0;
+ static Int_t termOp = 0;
if (i->value.id() == PFunctionGrammar::realID) {
assert(i->children.size() == 0);
diff --git a/src/classes/PFunctionHandler.cpp b/src/classes/PFunctionHandler.cpp
index 7d511969..67892942 100644
--- a/src/classes/PFunctionHandler.cpp
+++ b/src/classes/PFunctionHandler.cpp
@@ -72,16 +72,16 @@ PFunctionHandler::~PFunctionHandler()
*
*
*/
-bool PFunctionHandler::DoParse()
+Bool_t PFunctionHandler::DoParse()
{
// cout << endl << "in PFunctionHandler::DoParse() ...";
- bool success = true;
+ Bool_t success = true;
PFunctionGrammar function;
TString line;
// feed the function block into the parser. Start with i=1, since i=0 is FUNCTIONS
- for (unsigned int i=1; i map, vector param)
*
* \param idx
*/
-int PFunctionHandler::GetFuncNo(unsigned int idx)
+Int_t PFunctionHandler::GetFuncNo(UInt_t idx)
{
if (idx > fFuncs.size())
return -1;
@@ -194,11 +196,11 @@ int PFunctionHandler::GetFuncNo(unsigned int idx)
*
* \param funcNo
*/
-int PFunctionHandler::GetFuncIndex(int funcNo)
+Int_t PFunctionHandler::GetFuncIndex(Int_t funcNo)
{
- int index = -1;
+ Int_t index = -1;
- for (unsigned int i=0; i fFuncs.size())
return 0;
diff --git a/src/classes/PMsr2Data.cpp b/src/classes/PMsr2Data.cpp
index 7372aa03..ba2982fa 100644
--- a/src/classes/PMsr2Data.cpp
+++ b/src/classes/PMsr2Data.cpp
@@ -184,8 +184,8 @@ int PMsr2Data::SetRunNumbers(const string &runListFile)
ifstream in(runListFile.c_str());
if (!in) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The runlist file " << runListFile << " cannot be opened! Please check!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The runlist file " << runListFile << " cannot be opened! Please check!";
+ cerr << endl;
return -1;
}
@@ -211,8 +211,8 @@ int PMsr2Data::SetRunNumbers(const string &runListFile)
strLine.str(splitVec[0]);
strLine >> indvar; // "RUN"
if (indvar.compare("RUN")) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The format of the runlist file " << runListFile << " is not correct! Please check!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The format of the runlist file " << runListFile << " is not correct! Please check!";
+ cerr << endl;
}
while (strLine >> indvar)
fIndVar.push_back(indvar);
@@ -251,7 +251,7 @@ int PMsr2Data::ParseXmlStartupFile()
status = fSaxParser->ParseFile(startup_path_name.c_str());
// check for parse errors
if (status) { // error
- cout << endl << ">> msr2data: **WARNING** reading/parsing musrfit_startup.xml." << endl;
+ cerr << endl << ">> msr2data: **WARNING** reading/parsing musrfit_startup.xml." << endl;
// clean up
if (fSaxParser) {
delete fSaxParser;
@@ -277,13 +277,13 @@ int PMsr2Data::ReadMsrFile(const string &infile)
if (status != PMUSR_SUCCESS) {
switch (status) {
case PMUSR_MSR_FILE_NOT_FOUND:
- cout << endl << ">> msr2data: **ERROR** Could not find " << infile << endl;
+ cerr << endl << ">> msr2data: **ERROR** Could not find " << infile << endl;
break;
case PMUSR_MSR_SYNTAX_ERROR:
- cout << endl << ">> msr2data: **SYNTAX ERROR** in file " << infile << ", full stop here." << endl;
+ cerr << endl << ">> msr2data: **SYNTAX ERROR** in file " << infile << ", full stop here." << endl;
break;
default:
- cout << endl << ">> msr2data: **UNKOWN ERROR** when trying to read the msr-file" << endl;
+ cerr << endl << ">> msr2data: **UNKOWN ERROR** when trying to read the msr-file" << endl;
break;
}
}
@@ -303,7 +303,7 @@ bool PMsr2Data::ReadRunDataFile()
bool success = fDataHandler->IsAllDataAvailable();
if (!success) {
- cout << endl << ">> msr2data: **WARNING** Could not read all data files, will continue without the data file information..." << endl;
+ cerr << endl << ">> msr2data: **WARNING** Could not read all data files, will continue without the data file information..." << endl;
delete fDataHandler;
fDataHandler = 0;
}
@@ -328,16 +328,16 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun) const
strInfile << tempRun << fFileExtension << ".msr";
ifstream in(strInfile.str().c_str());
if (!in) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The template msr-file " << strInfile.str() << " cannot be opened! Please check!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The template msr-file " << strInfile.str() << " cannot be opened! Please check!";
+ cerr << endl;
return false;
}
ostringstream strOutfile;
strOutfile << *fRunVectorIter << fFileExtension << ".msr";
ofstream out(strOutfile.str().c_str());
if (!out) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The new msr file " << strOutfile.str() << " cannot be opened! Please check!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The new msr file " << strOutfile.str() << " cannot be opened! Please check!";
+ cerr << endl;
return false;
}
@@ -378,9 +378,9 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun) const
if ( loc != string::npos ) {
line.replace(loc, N, newRunNumber.str());
} else {
- cout << endl;
- cout << ">> msr2data: **WARNING** The template run file number does not match the \"file index\"" << endl;
- cout << ">> msr2data: **WARNING** Unexpected things will happen... (for sure)" << endl;
+ cerr << endl << ">> msr2data: **WARNING** The template run file number does not match the \"file index\"";
+ cerr << endl << ">> msr2data: **WARNING** Unexpected things will happen... (for sure)";
+ cerr << endl;
}
}
out << line << endl;
@@ -494,9 +494,9 @@ void PMsr2Data::WriteOutput(const string &outfile, bool db, bool withHeader) con
strLine.str(splitVec[0]);
strLine >> runNo;
if (runNo != *fRunVectorIter) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The run number in the runlist file does not match the one which should be processed..." << endl;
- cout << ">> msr2data: **ERROR** Something is very strange... Please report this bug!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The run number in the runlist file does not match the one which should be processed...";
+ cerr << endl << ">> msr2data: **ERROR** Something is very strange... Please report this bug!";
+ cerr << endl;
fRunVectorIter = fRunVector.end();
return;
}
@@ -504,9 +504,9 @@ void PMsr2Data::WriteOutput(const string &outfile, bool db, bool withHeader) con
indVarValues.push_back(val);
}
if (indVarValues.size() != fIndVar.size()) {
- cout << endl;
- cout << ">> msr2data: **ERROR** The number of data entries in the runlist file for the run number " << runNo << endl;
- cout << ">> msr2data: **ERROR** does not match the number of labels given in the RUN-line! Please check the file!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The number of data entries in the runlist file for the run number " << runNo;
+ cerr << endl << ">> msr2data: **ERROR** does not match the number of labels given in the RUN-line! Please check the file!";
+ cerr << endl;
fRunVectorIter = fRunVector.end();
return;
}
@@ -518,9 +518,9 @@ void PMsr2Data::WriteOutput(const string &outfile, bool db, bool withHeader) con
// The RUNLIST file stream and the run vector iterator might get out of synchronization, if the following check is placed before the above block...
PMsrStatisticStructure *msrStatistic(fMsrHandler->GetMsrStatistic());
if (!msrStatistic->fValid) {
- cout << endl;
- cout << ">> msr2data: **WARNING** The fit of run " << *fRunVectorIter << " has not converged!" << endl;
- cout << ">> msr2data: **WARNING** Its parameter data have not been appended to the output file " << outfile << endl;
+ cerr << endl << ">> msr2data: **WARNING** The fit of run " << *fRunVectorIter << " has not converged!";
+ cerr << endl << ">> msr2data: **WARNING** Its parameter data have not been appended to the output file " << outfile;
+ cerr << endl;
fRunVectorIter++;
delete fMsrHandler;
@@ -545,8 +545,8 @@ void PMsr2Data::WriteOutput(const string &outfile, bool db, bool withHeader) con
ofstream outFile(outfile.c_str(), ios::app);
if (!outFile) {
- cout << endl;
- cout << ">> msr2data: The output file " << outfile << " cannot be opened! Please check!" << endl;
+ cerr << endl << ">> msr2data: **ERROR** The output file " << outfile << " cannot be opened! Please check!";
+ cerr << endl;
fRunVectorIter = fRunVector.end();
return;
}
diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp
index de19c0bf..06d0273b 100644
--- a/src/classes/PMsrHandler.cpp
+++ b/src/classes/PMsrHandler.cpp
@@ -52,7 +52,7 @@ using namespace std;
*
* \param fileName
*/
-PMsrHandler::PMsrHandler(const char *fileName) : fFileName(fileName)
+PMsrHandler::PMsrHandler(const Char_t *fileName) : fFileName(fileName)
{
// init variables
fMsrBlockCounter = 0;
@@ -90,7 +90,7 @@ PMsrHandler::~PMsrHandler()
fParam.clear();
fTheory.clear();
fFunctions.clear();
- for (unsigned int i=0; i> PMsrHandler::ReadMsrFile: **SEVERE ERROR** parameter name " << fParam[parX].fName.Data() << " is identical for parameter no " << fParam[parX].fNo << " and " << fParam[parY].fNo << "!";
- cout << endl << "Needs to be fixed first!";
+ cerr << endl << ">> PMsrHandler::ReadMsrFile: **SEVERE ERROR** parameter name " << fParam[parX].fName.Data() << " is identical for parameter no " << fParam[parX].fNo << " and " << fParam[parY].fNo << "!";
+ cerr << endl << "Needs to be fixed first!";
+ cerr << endl;
result = PMUSR_MSR_SYNTAX_ERROR;
}
}
@@ -317,20 +318,20 @@ cout << endl;
/**
*
*/
-int PMsrHandler::WriteMsrLogFile(const bool messages)
+Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
{
- const unsigned int prec = 6; // output precision for float/doubles
+ const UInt_t prec = 6; // output precision for float/doubles
- int tag, lineNo = 0, number;
- int runNo = -1, addRunNo = 0;
- int plotNo = -1;
+ Int_t tag, lineNo = 0, number;
+ Int_t runNo = -1, addRunNo = 0;
+ Int_t plotNo = -1;
string line;
TString str, sstr;
TObjArray *tokens = 0;
TObjString *ostr = 0;
- bool found = false;
- bool statisticBlockFound = false;
- bool partialStatisticBlockFound = true;
+ Bool_t found = false;
+ Bool_t statisticBlockFound = false;
+ Bool_t partialStatisticBlockFound = true;
// construct log file name
// first find the last '.' in the filename
@@ -418,7 +419,7 @@ int PMsrHandler::WriteMsrLogFile(const bool messages)
number = sstr.Atoi();
number--;
// make sure number makes sense
- assert ((number >= 0) && (number < (int)fParam.size()));
+ assert ((number >= 0) && (number < (Int_t)fParam.size()));
// parameter no
fout.width(9);
fout << right << fParam[number].fNo;
@@ -474,7 +475,7 @@ int PMsrHandler::WriteMsrLogFile(const bool messages)
break;
case MSR_TAG_THEORY:
found = false;
- for (unsigned int i=0; i fParam.size()) {
- cout << endl << "PMsrHandler::SetMsrParamValue(): i = " << i << " is larger than the number of parameters " << fParam.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrParamValue(): **ERROR** i = " << i << " is larger than the number of parameters " << fParam.size();
+ cerr << endl;
return false;
}
@@ -997,11 +998,11 @@ bool PMsrHandler::SetMsrParamValue(unsigned int i, double value)
* \param i
* \param value
*/
-bool PMsrHandler::SetMsrParamStep(unsigned int i, double value)
+Bool_t PMsrHandler::SetMsrParamStep(UInt_t i, Double_t value)
{
if (i > fParam.size()) {
- cout << endl << "PMsrHandler::SetMsrParamValue(): i = " << i << " is larger than the number of parameters " << fParam.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrParamValue(): **ERROR** i = " << i << " is larger than the number of parameters " << fParam.size();
+ cerr << endl;
return false;
}
@@ -1019,11 +1020,11 @@ bool PMsrHandler::SetMsrParamStep(unsigned int i, double value)
* \param i
* \param value
*/
-bool PMsrHandler::SetMsrParamPosErrorPresent(unsigned int i, bool value)
+Bool_t PMsrHandler::SetMsrParamPosErrorPresent(UInt_t i, Bool_t value)
{
if (i > fParam.size()) {
- cout << endl << "PMsrHandler::SetMsrParamPosErrorPresent(): i = " << i << " is larger than the number of parameters " << fParam.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrParamPosErrorPresent(): **ERROR** i = " << i << " is larger than the number of parameters " << fParam.size();
+ cerr << endl;
return false;
}
@@ -1041,11 +1042,11 @@ bool PMsrHandler::SetMsrParamPosErrorPresent(unsigned int i, bool value)
* \param i
* \param value
*/
-bool PMsrHandler::SetMsrParamPosError(unsigned int i, double value)
+Bool_t PMsrHandler::SetMsrParamPosError(UInt_t i, Double_t value)
{
if (i > fParam.size()) {
- cout << endl << "PMsrHandler::SetMsrParamPosError(): i = " << i << " is larger than the number of parameters " << fParam.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrParamPosError(): **ERROR** i = " << i << " is larger than the number of parameters " << fParam.size();
+ cerr << endl;
return false;
}
@@ -1065,17 +1066,17 @@ bool PMsrHandler::SetMsrParamPosError(unsigned int i, double value)
* \param idx
* \param bin
*/
-void PMsrHandler::SetMsrT0Entry(unsigned int runNo, unsigned int idx, int bin)
+void PMsrHandler::SetMsrT0Entry(UInt_t runNo, UInt_t idx, Int_t bin)
{
if ((runNo < 0) || (runNo > fRuns.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrT0Entry: runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrT0Entry: **ERROR** runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
+ cerr << endl;
return;
}
if ((idx < 0) || (idx > fRuns[runNo].fT0.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrT0Entry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fT0.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrT0Entry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fT0.size();
+ cerr << endl;
return;
}
@@ -1092,17 +1093,17 @@ void PMsrHandler::SetMsrT0Entry(unsigned int runNo, unsigned int idx, int bin)
* \param idx
* \param bin
*/
-void PMsrHandler::SetMsrDataRangeEntry(unsigned int runNo, unsigned int idx, int bin)
+void PMsrHandler::SetMsrDataRangeEntry(UInt_t runNo, UInt_t idx, Int_t bin)
{
if ((runNo < 0) || (runNo > fRuns.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrDataRangeEntry: runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrDataRangeEntry: **ERROR** runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
+ cerr << endl;
return;
}
if ((idx < 0) || (idx > fRuns[runNo].fDataRange.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrDataRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fDataRange.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrDataRangeEntry: **ERROR** idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fDataRange.size();
+ cerr << endl;
return;
}
@@ -1119,17 +1120,17 @@ void PMsrHandler::SetMsrDataRangeEntry(unsigned int runNo, unsigned int idx, int
* \param idx
* \param bin
*/
-void PMsrHandler::SetMsrBkgRangeEntry(unsigned int runNo, unsigned int idx, int bin)
+void PMsrHandler::SetMsrBkgRangeEntry(UInt_t runNo, UInt_t idx, Int_t bin)
{
if ((runNo < 0) || (runNo > fRuns.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrBkgRangeEntry: runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrBkgRangeEntry: **ERROR** runNo = " << runNo << ", is out of valid range 0.." << fRuns.size();
+ cerr << endl;
return;
}
if ((idx < 0) || (idx > fRuns[runNo].fBkgRange.size())) { // error
- cout << endl << "**ERROR** in PMsrHandler::SetMsrBkgRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fBkgRange.size();
- cout << endl;
+ cerr << endl << "PMsrHandler::SetMsrBkgRangeEntry: idx = " << idx << ", is out of valid range 0.." << fRuns[runNo].fBkgRange.size();
+ cerr << endl;
return;
}
@@ -1147,7 +1148,7 @@ void PMsrHandler::SetMsrBkgRangeEntry(unsigned int runNo, unsigned int idx, int
*
* \param paramNo
*/
-int PMsrHandler::ParameterInUse(unsigned int paramNo)
+Int_t PMsrHandler::ParameterInUse(UInt_t paramNo)
{
// check that paramNo is within acceptable range
if ((paramNo < 0) || (paramNo > fParam.size()))
@@ -1176,10 +1177,10 @@ int PMsrHandler::ParameterInUse(unsigned int paramNo)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
{
PMsrParamStructure param;
- bool error = false;
+ Bool_t error = false;
PMsrLines::iterator iter;
@@ -1206,8 +1207,8 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
tokens = iter->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandleFitParameterEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandleFitParameterEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
+ cerr << endl << endl;
return false;
}
@@ -1232,7 +1233,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(2));
str = ostr->GetString();
if (str.IsFloat())
- param.fValue = (double)str.Atof();
+ param.fValue = (Double_t)str.Atof();
else
error = true;
@@ -1240,7 +1241,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(3));
str = ostr->GetString();
if (str.IsFloat())
- param.fStep = (double)str.Atof();
+ param.fStep = (Double_t)str.Atof();
else
error = true;
@@ -1258,7 +1259,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
str = ostr->GetString();
if (str.IsFloat()) {
param.fPosErrorPresent = true;
- param.fPosError = (double)str.Atof();
+ param.fPosError = (Double_t)str.Atof();
} else {
str.ToLower();
if (!str.CompareTo("none", TString::kIgnoreCase))
@@ -1277,7 +1278,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
str = ostr->GetString();
if (str.IsFloat()) {
param.fPosErrorPresent = true;
- param.fPosError = (double)str.Atof();
+ param.fPosError = (Double_t)str.Atof();
} else {
str.ToLower();
if (!str.CompareTo("none", TString::kIgnoreCase))
@@ -1294,7 +1295,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
param.fLowerBoundaryPresent = false;
} else { // assuming that the lower boundary is a number
if (str.IsFloat()) {
- param.fLowerBoundary = (double)str.Atof();
+ param.fLowerBoundary = (Double_t)str.Atof();
param.fLowerBoundaryPresent = true;
} else {
error = true;
@@ -1309,7 +1310,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
param.fUpperBoundaryPresent = false;
} else { // assuming a number
if (str.IsFloat()) {
- param.fUpperBoundary = (double)str.Atof();
+ param.fUpperBoundary = (Double_t)str.Atof();
param.fUpperBoundaryPresent = true;
} else {
error = true;
@@ -1320,28 +1321,28 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
// check if enough elements found
if (error) {
- cout << endl;
- cout << endl << ">> PMsrHandler::HandleFitParameterEntry: **ERROR** in line " << iter->fLineNo << ":";
- cout << endl << iter->fLine.Data();
- cout << endl << "A Fit Parameter line needs to have the following form: ";
- cout << endl;
- cout << endl << "No Name Value Step/Error [Lower_Boundary Upper_Boundary]";
- cout << endl;
- cout << endl << "or";
- cout << endl;
- cout << endl << "No Name Value Step/Neg_Error Pos_Error [Lower_Boundary Upper_Boundary]";
- cout << endl;
- cout << endl << "No: the parameter number (an int)";
- cout << endl << "Name: the name of the parameter (less than 256 character)";
- cout << endl << "Value: the starting value of the parameter (a double)";
- cout << endl << "Step/Error,";
- cout << endl << "Step/Neg_Error: the starting step value in a fit (a double), or";
- cout << endl << " the symmetric error (MIGRAD, SIMPLEX), or";
- cout << endl << " the negative error (MINOS)";
- cout << endl << "Pos_Error: the positive error (MINOS), (a double or \"none\")";
- cout << endl << "Lower_Boundary: the lower boundary allowed for the fit parameter (a double or \"none\")";
- cout << endl << "Upper_Boundary: the upper boundary allowed for the fit parameter (a double or \"none\")";
- cout << endl;
+ cerr << endl;
+ cerr << endl << ">> PMsrHandler::HandleFitParameterEntry: **ERROR** in line " << iter->fLineNo << ":";
+ cerr << endl << iter->fLine.Data();
+ cerr << endl << "A Fit Parameter line needs to have the following form: ";
+ cerr << endl;
+ cerr << endl << "No Name Value Step/Error [Lower_Boundary Upper_Boundary]";
+ cerr << endl;
+ cerr << endl << "or";
+ cerr << endl;
+ cerr << endl << "No Name Value Step/Neg_Error Pos_Error [Lower_Boundary Upper_Boundary]";
+ cerr << endl;
+ cerr << endl << "No: the parameter number (an Int_t)";
+ cerr << endl << "Name: the name of the parameter (less than 256 character)";
+ cerr << endl << "Value: the starting value of the parameter (a Double_t)";
+ cerr << endl << "Step/Error,";
+ cerr << endl << "Step/Neg_Error: the starting step value in a fit (a Double_t), or";
+ cerr << endl << " the symmetric error (MIGRAD, SIMPLEX), or";
+ cerr << endl << " the negative error (MINOS)";
+ cerr << endl << "Pos_Error: the positive error (MINOS), (a Double_t or \"none\")";
+ cerr << endl << "Lower_Boundary: the lower boundary allowed for the fit parameter (a Double_t or \"none\")";
+ cerr << endl << "Upper_Boundary: the upper boundary allowed for the fit parameter (a Double_t or \"none\")";
+ cerr << endl;
} else { // everything is OK, therefore add the parameter to the parameter list
fParam.push_back(param);
}
@@ -1366,7 +1367,7 @@ bool PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleTheoryEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleTheoryEntry(PMsrLines &lines)
{
// store the theory lines
fTheory = lines;
@@ -1382,7 +1383,7 @@ bool PMsrHandler::HandleTheoryEntry(PMsrLines &lines)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
{
// store the functions lines
fFunctions = lines;
@@ -1390,7 +1391,7 @@ bool PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
// create function handler
fFuncHandler = new PFunctionHandler(fFunctions);
if (fFuncHandler == 0) {
- cout << endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** Couldn't invoke PFunctionHandler." << endl;
+ cerr << endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** Couldn't invoke PFunctionHandler." << endl;
return false;
}
@@ -1401,9 +1402,9 @@ bool PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
// check if an empty FUNCTIONS block is present
if ((fFuncHandler->GetNoOfFuncs() == 0) && !lines.empty()) {
- cout << endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** empty FUNCTIONS block are not supported!";
- cout << endl << ">> If you want to keep it, just comment the whole block ;-)";
- cout << endl;
+ cerr << endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** empty FUNCTIONS block are not supported!";
+ cerr << endl << ">> If you want to keep it, just comment the whole block ;-)";
+ cerr << endl;
return false;
}
@@ -1418,12 +1419,12 @@ bool PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
{
PMsrLines::iterator iter;
PMsrRunStructure param;
- bool first = true; // first run line tag
- bool error = false;
+ Bool_t first = true; // first run line tag
+ Bool_t error = false;
TString str;
TObjArray *tokens = 0;
@@ -1440,8 +1441,8 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
// tokenize line
tokens = iter->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
+ cerr << endl << endl;
return false;
}
@@ -1504,7 +1505,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(1));
str = ostr->GetString();
if (str.IsDigit()) {
- int fittype = str.Atoi();
+ Int_t fittype = str.Atoi();
if ((fittype == MSR_FITTYPE_SINGLE_HISTO) ||
(fittype == MSR_FITTYPE_ASYM) ||
(fittype == MSR_FITTYPE_ASYM_RRF) ||
@@ -1557,7 +1558,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if (str.IsDigit()) {
param.fNormParamNo = str.Atoi();
} else if (str.Contains("fun")) {
- int no;
+ Int_t no;
if (FilterNumber(str, "fun", MSR_PARAM_FUN_OFFSET, no))
param.fNormParamNo = no;
else
@@ -1617,7 +1618,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
// map ------------------------------------------------------
if (iter->fLine.BeginsWith("map", TString::kIgnoreCase)) {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit())
@@ -1626,9 +1627,9 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
error = true;
}
// check map entries, i.e. if the map values are within parameter bounds
- for (unsigned int i=0; i (int) fParam.size())) {
- cout << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** map value " << param.fMap[i] << " in line " << iter->fLineNo << " is out of range!";
+ for (UInt_t i=0; i (Int_t) fParam.size())) {
+ cerr << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** map value " << param.fMap[i] << " in line " << iter->fLineNo << " is out of range!";
error = true;
break;
}
@@ -1668,7 +1669,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if (tokens->GetEntries() < 2) {
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsFloat())
@@ -1684,7 +1685,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if ((tokens->GetEntries() < 3) || (tokens->GetEntries() % 2 != 1)) { // odd number (>=3) of entries needed
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit())
@@ -1700,7 +1701,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if ((tokens->GetEntries() < 3) || (tokens->GetEntries() % 2 != 1)) { // odd number (>=3) of entries needed
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit())
@@ -1716,7 +1717,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if (tokens->GetEntries() < 2) {
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit())
@@ -1732,7 +1733,7 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if (tokens->GetEntries() < 3) {
error = true;
} else {
- for (int i=1; i<3; i++) {
+ for (Int_t i=1; i<3; i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsFloat())
@@ -1876,19 +1877,19 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
if (error) {
--iter;
- cout << endl << ">> PMsrHandler::HandleRunEntry: **ERROR** in line " << iter->fLineNo << ":";
- cout << endl << iter->fLine.Data();
- cout << endl << "RUN block syntax is too complex to print it here. Please check the manual.";
+ cerr << endl << ">> PMsrHandler::HandleRunEntry: **ERROR** in line " << iter->fLineNo << ":";
+ cerr << endl << iter->fLine.Data();
+ cerr << endl << "RUN block syntax is too complex to print it here. Please check the manual.";
} else { // save last run found
fRuns.push_back(param);
}
// check if for fittypes: single histo, asymmetry, RRF any background info is given
- for (unsigned int i=0; i= 0) { // check if backgr.fit is given
found = true;
} else if (fRuns[i].fBkgFix.size() > 0) { // check if backgr.fix is given
@@ -1899,11 +1900,11 @@ bool PMsrHandler::HandleRunEntry(PMsrLines &lines)
found = false;
}
if (!found) {
- cout << endl << ">> PMsrHandler::HandleRunEntry: **ERROR** for run " << fRuns[i].fRunName[0].Data() << ", forward " << fRuns[i].fForwardHistoNo;
- cout << endl << " no background information found!";
- cout << endl << " Either of the tags 'backgr.fit', 'backgr.fix', 'background'";
- cout << endl << " with data is needed.";
- cout << endl;
+ cerr << endl << ">> PMsrHandler::HandleRunEntry: **ERROR** for run " << fRuns[i].fRunName[0].Data() << ", forward " << fRuns[i].fForwardHistoNo;
+ cerr << endl << " no background information found!";
+ cerr << endl << " Either of the tags 'backgr.fit', 'backgr.fix', 'background'";
+ cerr << endl << " with data is needed.";
+ cerr << endl;
return false;
}
}
@@ -1941,7 +1942,7 @@ void PMsrHandler::InitRunParameterStructure(PMsrRunStructure ¶m)
param.fBkgRange.clear();
param.fDataRange.clear();
param.fT0.clear();
- for (int i=0; i<4; i++)
+ for (Int_t i=0; i<4; i++)
param.fFitRange[i] = -1;
param.fPacking = 1;
param.fRRFFreq = -1.0;
@@ -1950,9 +1951,9 @@ void PMsrHandler::InitRunParameterStructure(PMsrRunStructure ¶m)
param.fBeta2ParamNo = -1;
param.fRightHistoNo = -1;
param.fLeftHistoNo = -1;
- for (int i=0; i<2; i++)
+ for (Int_t i=0; i<2; i++)
param.fXYDataIndex[i] = -1;
- for (int i=0; i<2; i++)
+ for (Int_t i=0; i<2; i++)
param.fXYDataLabel[i] = "";
}
@@ -1970,13 +1971,13 @@ void PMsrHandler::InitRunParameterStructure(PMsrRunStructure ¶m)
* \param offset it is used to offset to found number, e.g. strX -> no = X+offset
* \param no filtered number
*/
-bool PMsrHandler::FilterNumber(TString str, const char *filter, int offset, int &no)
+Bool_t PMsrHandler::FilterNumber(TString str, const Char_t *filter, Int_t offset, Int_t &no)
{
- int found, no_found=-1;
+ Int_t found, no_found=-1;
// copy str to an ordinary c-like string
- char *cstr, filterStr[32];
- cstr = new char[str.Sizeof()];
+ Char_t *cstr, filterStr[32];
+ cstr = new Char_t[str.Sizeof()];
strncpy(cstr, str.Data(), str.Sizeof());
sprintf(filterStr, "%s%%d", filter);
@@ -2007,13 +2008,13 @@ bool PMsrHandler::FilterNumber(TString str, const char *filter, int offset, int
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleCommandsEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleCommandsEntry(PMsrLines &lines)
{
PMsrLines::iterator iter;
if (lines.empty()) {
- cout << endl << "**WARNING**: There is no COMMANDS block! Do you really want this?";
- cout << endl;
+ cerr << endl << "**WARNING**: There is no COMMANDS block! Do you really want this?";
+ cerr << endl;
}
for (iter = lines.begin(); iter != lines.end(); ++iter) {
@@ -2041,7 +2042,7 @@ void PMsrHandler::InitFourierParameterStructure(PMsrFourierStructure &fourier)
fourier.fPlotTag = FOURIER_PLOT_NOT_GIVEN; // initial plot tag, default: NOT GIVEN
fourier.fPhaseParamNo = 0; // initial parameter no = 0 means not a parameter
fourier.fPhase = -999.0; // fourier phase: -999 = NOT GIVEN
- for (unsigned int i=0; i<2; i++) {
+ for (UInt_t i=0; i<2; i++) {
fourier.fRangeForPhaseCorrection[i] = -1.0; // frequency range for phase correction, default: {-1, -1} = NOT GIVEN
fourier.fPlotRange[i] = -1.0; // fourier plot range, default: {-1, -1} = NOT GIVEN
}
@@ -2055,11 +2056,11 @@ void PMsrHandler::InitFourierParameterStructure(PMsrFourierStructure &fourier)
*
* \param lines is a list of lines containing the fourier parameter block
*/
-bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleFourierEntry(PMsrLines &lines)
{
//cout << endl << ">> in PMsrHandler::HandleFourierEntry ...";
- bool error = false;
+ Bool_t error = false;
if (lines.empty()) // no fourier block present
return true;
@@ -2078,15 +2079,15 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
TObjString *ostr = 0;
TString str;
- int ival;
+ Int_t ival;
iter = lines.begin();
while ((iter != lines.end()) && !error) {
// tokenize line
tokens = iter->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandleRunEntry: **SEVERE ERROR** Couldn't tokenize Parameters in line " << iter->fLineNo;
+ cerr << endl << endl;
return false;
}
@@ -2191,10 +2192,10 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(1));
str = ostr->GetString();
if (str.BeginsWith("par", TString::kIgnoreCase)) { // parameter value
- int no = 0;
+ Int_t no = 0;
if (FilterNumber(str, "par", 0, no)) {
// check that the parameter is in range
- if ((int)fParam.size() < no) {
+ if ((Int_t)fParam.size() < no) {
error = true;
continue;
}
@@ -2221,7 +2222,7 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
error = true;
continue;
} else {
- for (unsigned int i=0; i<2; i++) {
+ for (UInt_t i=0; i<2; i++) {
ostr = dynamic_cast(tokens->At(i+1));
str = ostr->GetString();
if (str.IsFloat()) {
@@ -2240,7 +2241,7 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
error = true;
continue;
} else {
- for (unsigned int i=0; i<2; i++) {
+ for (UInt_t i=0; i<2; i++) {
ostr = dynamic_cast(tokens->At(i+1));
str = ostr->GetString();
if (str.IsFloat()) {
@@ -2264,23 +2265,23 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
}
if (error) {
- cout << endl << ">> PMsrHandler::HandleFourierEntry: **ERROR** in line " << iter->fLineNo << ":";
- cout << endl;
- cout << endl << iter->fLine.Data();
- cout << endl;
- cout << endl << "FOURIER block syntax, parameters in [] are optinal:";
- cout << endl;
- cout << endl << "FOURIER";
- cout << endl << "[units Gauss | MHz | Mc/s]";
- cout << endl << "[fourier_power n # n is a number such that zero padding up to 2^n will be used]";
- cout << endl << " n=0 means no zero padding";
- cout << endl << " 0 <= n <= 20 are allowed values";
- cout << endl << "[apodization none | weak | medium | strong]";
- cout << endl << "[plot real | imag | real_and_imag | power | phase]";
- cout << endl << "[phase value]";
- cout << endl << "[range_for_phase_correction min max]";
- cout << endl << "[range min max]";
- cout << endl;
+ cerr << endl << ">> PMsrHandler::HandleFourierEntry: **ERROR** in line " << iter->fLineNo << ":";
+ cerr << endl;
+ cerr << endl << iter->fLine.Data();
+ cerr << endl;
+ cerr << endl << "FOURIER block syntax, parameters in [] are optinal:";
+ cerr << endl;
+ cerr << endl << "FOURIER";
+ cerr << endl << "[units Gauss | MHz | Mc/s]";
+ cerr << endl << "[fourier_power n # n is a number such that zero padding up to 2^n will be used]";
+ cerr << endl << " n=0 means no zero padding";
+ cerr << endl << " 0 <= n <= 20 are allowed values";
+ cerr << endl << "[apodization none | weak | medium | strong]";
+ cerr << endl << "[plot real | imag | real_and_imag | power | phase]";
+ cerr << endl << "[phase value]";
+ cerr << endl << "[range_for_phase_correction min max]";
+ cerr << endl << "[range min max]";
+ cerr << endl;
} else { // save last run found
fFourier = fourier;
}
@@ -2296,9 +2297,9 @@ bool PMsrHandler::HandleFourierEntry(PMsrLines &lines)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
{
- bool error = false;
+ Bool_t error = false;
PMsrPlotStructure param;
@@ -2311,8 +2312,8 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
TString str2;
if (lines.empty()) {
- cout << endl << "**WARNING**: There is no PLOT block! Do you really want this?";
- cout << endl;
+ cerr << endl << "**WARNING**: There is no PLOT block! Do you really want this?";
+ cerr << endl;
}
iter1 = lines.begin();
@@ -2339,8 +2340,8 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
if (iter1->fLine.Contains("PLOT")) { // handle plot header
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
if (tokens->GetEntries() < 2) { // plot type missing
@@ -2369,14 +2370,14 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
case MSR_PLOT_NON_MUSR:
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
if (tokens->GetEntries() < 2) { // runs missing
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit()) {
@@ -2396,14 +2397,14 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
case MSR_PLOT_ASYM_RRF: // like: runs 1,1 1,2
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
if (tokens->GetEntries() < 2) { // runs missing
error = true;
} else {
- for (int i=1; iGetEntries(); i++) {
+ for (Int_t i=1; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i)); // something like 1,2
str = ostr->GetString();
tokens2 = str.Tokenize(",");
@@ -2446,8 +2447,8 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
if ((tokens->GetEntries() != 3) && (tokens->GetEntries() != 5)) {
@@ -2458,7 +2459,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(1));
str = ostr->GetString();
if (str.IsFloat())
- param.fTmin.push_back((double)str.Atof());
+ param.fTmin.push_back((Double_t)str.Atof());
else
error = true;
@@ -2466,7 +2467,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(2));
str = ostr->GetString();
if (str.IsFloat())
- param.fTmax.push_back((double)str.Atof());
+ param.fTmax.push_back((Double_t)str.Atof());
else
error = true;
@@ -2476,7 +2477,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(3));
str = ostr->GetString();
if (str.IsFloat())
- param.fYmin.push_back((double)str.Atof());
+ param.fYmin.push_back((Double_t)str.Atof());
else
error = true;
@@ -2484,7 +2485,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(4));
str = ostr->GetString();
if (str.IsFloat())
- param.fYmax.push_back((double)str.Atof());
+ param.fYmax.push_back((Double_t)str.Atof());
else
error = true;
}
@@ -2503,21 +2504,21 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
- if ((tokens->GetEntries() != (int)(2*param.fRuns.size() + 1)) && (tokens->GetEntries() != (int)(2*param.fRuns.size() + 3))) {
+ if ((tokens->GetEntries() != (Int_t)(2*param.fRuns.size() + 1)) && (tokens->GetEntries() != (Int_t)(2*param.fRuns.size() + 3))) {
error = true;
} else {
// get all the times
- for (unsigned int i=0; i(tokens->At(2*i+1));
str = ostr->GetString();
if (str.IsFloat())
- param.fTmin.push_back((double)str.Atof());
+ param.fTmin.push_back((Double_t)str.Atof());
else
error = true;
@@ -2525,19 +2526,19 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(2*i+2));
str = ostr->GetString();
if (str.IsFloat())
- param.fTmax.push_back((double)str.Atof());
+ param.fTmax.push_back((Double_t)str.Atof());
else
error = true;
}
// get y-range if present
- if (tokens->GetEntries() == (int)(2*param.fRuns.size() + 3)) {
+ if (tokens->GetEntries() == (Int_t)(2*param.fRuns.size() + 3)) {
// handle y_min
ostr = dynamic_cast(tokens->At(2*param.fRuns.size()+1));
str = ostr->GetString();
if (str.IsFloat())
- param.fYmin.push_back((double)str.Atof());
+ param.fYmin.push_back((Double_t)str.Atof());
else
error = true;
@@ -2545,7 +2546,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(2*param.fRuns.size()+2));
str = ostr->GetString();
if (str.IsFloat())
- param.fYmax.push_back((double)str.Atof());
+ param.fYmax.push_back((Double_t)str.Atof());
else
error = true;
}
@@ -2565,8 +2566,8 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
} else if (iter1->fLine.Contains("view_packing", TString::kIgnoreCase)) {
tokens = iter1->fLine.Tokenize(" \t");
if (!tokens) {
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
+ cerr << endl << endl;
return false;
}
if (tokens->GetEntries() != 2) {
@@ -2575,7 +2576,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
ostr = dynamic_cast(tokens->At(1));
str = ostr->GetString();
if (str.IsDigit()) {
- int val = str.Atoi();
+ Int_t val = str.Atoi();
if (val > 0)
param.fViewPacking = val;
else
@@ -2599,13 +2600,13 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
}
// analyze if the plot block is valid
- double keep;
+ Double_t keep;
if (!error) {
if (param.fRuns.empty()) { // there was no run tag
error = true;
} else { // everything ok
if ((param.fTmin.size() > 0) || (param.fTmax.size() > 0)) { // if range is given, check that it is ordered properly
- for (unsigned int i=0; i param.fTmax[i]) {
keep = param.fTmin[i];
param.fTmin[i] = param.fTmax[i];
@@ -2615,7 +2616,7 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
}
if ((param.fYmin.size() > 0) || (param.fYmax.size() > 0)) { // if range is given, check that it is ordered properly
- for (unsigned int i=0; i param.fYmax[i]) {
keep = param.fYmin[i];
param.fYmin[i] = param.fYmax[i];
@@ -2629,33 +2630,33 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
if (error) { // print error message
--iter1;
- cout << endl << ">> PMsrHandler::HandlePlotEntry: **ERROR** in line " << iter1->fLineNo << ": " << iter1->fLine.Data();
- cout << endl << "A PLOT block needs to have the following structure:";
- cout << endl;
- cout << endl << "PLOT ";
- cout << endl << "runs ";
- cout << endl << "[range tmin tmax [ymin ymax]]";
- cout << endl << "[sub_ranges tmin1 tmax1 tmin2 tmax2 ... tminN tmaxN [ymin ymax]";
- cout << endl << "[logx | logy]";
- cout << endl << "[use_fit_ranges]";
- cout << endl << "[view_packing n]";
- cout << endl;
- cout << endl << "where is: 0=single histo asym,";
- cout << endl << " 2=forward-backward asym,";
- cout << endl << " 4=RRF asym (not implemented yet),";
- cout << endl << " 8=non muSR.";
- cout << endl << " is the list of runs";
- cout << endl << " for 0,2,8 it is a list of run numbers, e.g. runs 1 3";
- cout << endl << " for 4 it is a list of 'complex' numbers, where";
- cout << endl << " the real part is the run number, and the";
- cout << endl << " imaginary one is 1=real part or 2=imag part, e.g.";
- cout << endl << " runs 1,1 1,2";
- cout << endl << "range is optional";
- cout << endl << "sub_ranges (if present) will plot the N given runs each on its own sub-range";
- cout << endl << "logx, logy (if present) will present the x-, y-axis in log-scale";
- cout << endl << "use_fit_ranges (if present) will plot each run on its fit-range";
- cout << endl << "view_packing n (if present) will bin all data by n (> 0) rather than the binning of the fit";
- cout << endl;
+ cerr << endl << ">> PMsrHandler::HandlePlotEntry: **ERROR** in line " << iter1->fLineNo << ": " << iter1->fLine.Data();
+ cerr << endl << "A PLOT block needs to have the following structure:";
+ cerr << endl;
+ cerr << endl << "PLOT ";
+ cerr << endl << "runs ";
+ cerr << endl << "[range tmin tmax [ymin ymax]]";
+ cerr << endl << "[sub_ranges tmin1 tmax1 tmin2 tmax2 ... tminN tmaxN [ymin ymax]";
+ cerr << endl << "[logx | logy]";
+ cerr << endl << "[use_fit_ranges]";
+ cerr << endl << "[view_packing n]";
+ cerr << endl;
+ cerr << endl << "where is: 0=single histo asym,";
+ cerr << endl << " 2=forward-backward asym,";
+ cerr << endl << " 4=RRF asym (not implemented yet),";
+ cerr << endl << " 8=non muSR.";
+ cerr << endl << " is the list of runs";
+ cerr << endl << " for 0,2,8 it is a list of run numbers, e.g. runs 1 3";
+ cerr << endl << " for 4 it is a list of 'complex' numbers, where";
+ cerr << endl << " the real part is the run number, and the";
+ cerr << endl << " imaginary one is 1=real part or 2=imag part, e.g.";
+ cerr << endl << " runs 1,1 1,2";
+ cerr << endl << "range is optional";
+ cerr << endl << "sub_ranges (if present) will plot the N given runs each on its own sub-range";
+ cerr << endl << "logx, logy (if present) will present the x-, y-axis in log-scale";
+ cerr << endl << "use_fit_ranges (if present) will plot each run on its fit-range";
+ cerr << endl << "view_packing n (if present) will bin all data by n (> 0) rather than the binning of the fit";
+ cerr << endl;
}
param.fRuns.clear();
@@ -2673,41 +2674,41 @@ bool PMsrHandler::HandlePlotEntry(PMsrLines &lines)
*
* \param lines is a list of lines containing the fitparameter block
*/
-bool PMsrHandler::HandleStatisticEntry(PMsrLines &lines)
+Bool_t PMsrHandler::HandleStatisticEntry(PMsrLines &lines)
{
if (lines.empty()) {
- cout << endl << ">> PMsrHandler::HandleStatisticEntry: **WARNING** There is no STATISTIC block! Do you really want this?";
- cout << endl;
+ cerr << endl << ">> PMsrHandler::HandleStatisticEntry: **WARNING** There is no STATISTIC block! Do you really want this?";
+ cerr << endl;
fStatistic.fValid = false;
return true;
}
// check if chisq or max.log likelihood
fStatistic.fChisq = true;
- for (unsigned int i=0; i 0) {
if (!tstr.BeginsWith("#") && !tstr.BeginsWith("STATISTIC") && !tstr.BeginsWith("chisq") &&
!tstr.BeginsWith("maxLH") && !tstr.BeginsWith("*** FIT DID NOT CONVERGE ***")) {
- cout << endl << ">> PMsrHandler::HandleStatisticEntry: **SYNTAX ERROR** in line " << lines[i].fLineNo;
- cout << endl << ">> '" << lines[i].fLine.Data() << "'";
- cout << endl << ">> not a valid STATISTIC block line";
- cout << endl << ">> If you do not understand this, just remove the STATISTIC block, musrfit will recreate after fitting";
- cout << endl << endl;
+ cerr << endl << ">> PMsrHandler::HandleStatisticEntry: **SYNTAX ERROR** in line " << lines[i].fLineNo;
+ cerr << endl << ">> '" << lines[i].fLine.Data() << "'";
+ cerr << endl << ">> not a valid STATISTIC block line";
+ cerr << endl << ">> If you do not understand this, just remove the STATISTIC block, musrfit will recreate after fitting";
+ cerr << endl << endl;
return false;
}
}
@@ -2789,10 +2790,10 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi
TObjArray *tokens = 0;
TObjString *ostr = 0;
TString str;
- int ival, funNo;
+ Int_t ival, funNo;
// create and initialize fParamInUse vector
- for (unsigned int i=0; iGetEntries(); i++) {
+ for (Int_t i=0; iGetEntries(); i++) {
ostr = dynamic_cast(tokens->At(i));
str = ostr->GetString();
if (str.IsDigit()) { // parameter number
ival = str.Atoi();
- if ((ival > 0) && (ival < (int)fParam.size()+1)) {
+ if ((ival > 0) && (ival < (Int_t)fParam.size()+1)) {
fParamInUse[ival-1]++;
//cout << endl << ">>>> theo: param no : " << ival;
}
@@ -2866,17 +2867,17 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi
// check if fun number is used, and if yes, filter parameter numbers and maps
TString sstr;
//cout << endl << ">> fun.size() = " << fun.size();
- for (unsigned int i=0; i> funNo: " << fun[i] << ", funNo: " << funNo;
if (fun[i] == funNo) { // function number found
// filter for parX
sstr = iter->fLine;
- char sval[128];
+ Char_t sval[128];
while (sstr.Index("par") != -1) {
memset(sval, 0, sizeof(sval));
sstr = &sstr[sstr.Index("par")+3]; // trunc sstr
//cout << endl << ">> par:sstr: " << sstr.Data();
- for (int j=0; j> map:sstr: " << sstr.Data();
- for (int j=0; j>>> mapX from func 1st, X = " << ival;
// check if map value already in map, otherwise add it
if (ival > 0) {
- unsigned int pos;
+ UInt_t pos;
for (pos=0; pos> map.size() = " << map.size();
- for (unsigned int i=0; iGetEntries()) {
@@ -3029,16 +3030,16 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi
// check if fun number is used, and if yes, filter parameter numbers and maps
TString sstr;
- for (unsigned int i=0; i> funNo: " << fun[i] << ", funNo: " << funNo;
if (fun[i] == funNo) { // function number found
// filter for parX
sstr = iter->fLine;
- char sval[128];
+ Char_t sval[128];
while (sstr.Index("par") != -1) {
memset(sval, 0, sizeof(sval));
sstr = &sstr[sstr.Index("par")+3]; // trunc sstr
- for (int j=0; j>>> mapX from func 2nd, X = " << ival;
// check if map value already in map, otherwise add it
if (ival > 0) {
- unsigned int pos;
+ UInt_t pos;
for (pos=0; pos> map.size() = " << map.size();
- for (unsigned int i=0; iGetEntries()) {
@@ -3128,15 +3129,15 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi
}
// cout << endl << ">> fParamInUse: ";
-// for (unsigned int i=0; iChecks if map entries found in the theory- or function-block are also
* present in the run-block, if yes return true otherwise return false.
*/
-bool PMsrHandler::CheckMaps()
+Bool_t PMsrHandler::CheckMaps()
{
- bool result = true;
+ Bool_t result = true;
PIntVector mapVec;
PIntVector mapBlock;
@@ -3193,14 +3194,14 @@ bool PMsrHandler::CheckMaps()
TObjString *ostr = 0;
TString str;
- int no;
+ Int_t no;
// check if map is present in the theory-block
- for (unsigned int i=0; iGetEntries(); j++) {
+ for (Int_t j=0; jGetEntries(); j++) {
ostr = dynamic_cast(tokens->At(j));
str = ostr->GetString();
if (str.Contains("map", TString::kIgnoreCase)) {
@@ -3220,11 +3221,11 @@ bool PMsrHandler::CheckMaps()
}
// check if map is present in the function-block
- for (unsigned int i=0; iGetEntries(); j++) {
+ for (Int_t j=0; jGetEntries(); j++) {
ostr = dynamic_cast(tokens->At(j));
str = ostr->GetString();
if (str.Contains("map", TString::kIgnoreCase)) {
@@ -3244,11 +3245,11 @@ bool PMsrHandler::CheckMaps()
}
// check if present maps are found in the run-block
- bool found;
- for (unsigned int i=0; i= 0)) { // map value smaller than run-block map length
if (fRuns[j].fMap[mapVec[i]-MSR_PARAM_MAP_OFFSET-1] != 0) { // map value in the run-block != 0
found = true;
@@ -3258,14 +3259,16 @@ bool PMsrHandler::CheckMaps()
}
if (!found) { // map not found
result = false;
- cout << endl << ">> PMsrHandler::CheckMaps: **ERROR** map" << mapVec[i]-MSR_PARAM_MAP_OFFSET << " found in the ";
+ cerr << endl << ">> PMsrHandler::CheckMaps: **ERROR** map" << mapVec[i]-MSR_PARAM_MAP_OFFSET << " found in the ";
if (mapBlock[i] == 0)
- cout << "theory-block ";
+ cerr << "theory-block ";
else
- cout << "functions-block ";
- cout << "in line " << mapLineNo[i] << " is not present in the run-block!";
+ cerr << "functions-block ";
+ cerr << "in line " << mapLineNo[i] << " is not present in the run-block!";
+ cerr << endl;
if (mapVec[i]-MSR_PARAM_MAP_OFFSET == 0) {
- cout << endl << ">> by the way: map must be > 0 ...";
+ cerr << endl << ">> by the way: map must be > 0 ...";
+ cerr << endl;
}
}
}
@@ -3285,9 +3288,9 @@ bool PMsrHandler::CheckMaps()
* Checks if fun entries found in the theory- and run-block are also
* present in the functions-block, if yes return true otherwise return false.
*/
-bool PMsrHandler::CheckFuncs()
+Bool_t PMsrHandler::CheckFuncs()
{
- bool result = true;
+ Bool_t result = true;
PIntVector funVec;
PIntVector funBlock;
@@ -3297,14 +3300,14 @@ bool PMsrHandler::CheckFuncs()
TObjString *ostr = 0;
TString str;
- int no;
+ Int_t no;
// check if func is present in the theory-block
- for (unsigned int i=0; iGetEntries(); j++) {
+ for (Int_t j=0; jGetEntries(); j++) {
ostr = dynamic_cast(tokens->At(j));
str = ostr->GetString();
if (str.Contains("fun", TString::kIgnoreCase)) {
@@ -3324,7 +3327,7 @@ bool PMsrHandler::CheckFuncs()
}
// check if func is present in the run-block
- for (unsigned int i=0; i= MSR_PARAM_FUN_OFFSET) { // function found
funVec.push_back(fRuns[i].fNormParamNo);
funBlock.push_back(1); // 1 = run-block
@@ -3333,11 +3336,11 @@ bool PMsrHandler::CheckFuncs()
}
// check if present funcs are found in the functions-block
- bool found;
- for (unsigned int i=0; i> PMsrHandler::CheckFuncs: **ERROR** fun" << funVec[i]-MSR_PARAM_FUN_OFFSET << " found in the ";
+ cerr << endl << ">> PMsrHandler::CheckFuncs: **ERROR** fun" << funVec[i]-MSR_PARAM_FUN_OFFSET << " found in the ";
if (funBlock[i] == 0)
- cout << "theory-block in line " << funLineBlockNo[i] << " is not present in the functions-block!";
+ cerr << "theory-block in line " << funLineBlockNo[i] << " is not present in the functions-block!";
else
- cout << "run-block No " << funLineBlockNo[i] << " (norm) is not present in the functions-block!";
+ cerr << "run-block No " << funLineBlockNo[i] << " (norm) is not present in the functions-block!";
+ cerr << endl;
}
}
diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp
index 6d1cc114..720821eb 100644
--- a/src/classes/PMusrCanvas.cpp
+++ b/src/classes/PMusrCanvas.cpp
@@ -89,7 +89,7 @@ PMusrCanvas::PMusrCanvas()
/**
*
*/
-PMusrCanvas::PMusrCanvas(const int number, const char* title,
+PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
const Bool_t batch) :
fBatchMode(batch), fPlotNumber(number)
@@ -113,7 +113,7 @@ PMusrCanvas::PMusrCanvas(const int number, const char* title,
/**
*
*/
-PMusrCanvas::PMusrCanvas(const int number, const char* title,
+PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
PMsrFourierStructure fourierDefault,
const PIntVector markerList, const PIntVector colorList,
@@ -154,12 +154,12 @@ PMusrCanvas::~PMusrCanvas()
fTitlePad = 0;
}
if (fData.size() > 0) {
- for (unsigned int i=0; i 0) {
- for (unsigned int i=0; iGetMsrParamList();
// get maximal parameter name string length
- for (unsigned int i=0; i maxLength)
maxLength = param[i].fName.Length();
}
@@ -280,7 +280,7 @@ void PMusrCanvas::UpdateParamTheoryPad()
yoffset = 0.05;
// add parameters to the pad
- for (unsigned int i=0; iGetMsrFunctions();
- for (unsigned int i=1; iAddText(0.03, ypos, functions[i].fLine.Data());
}
@@ -373,36 +373,36 @@ void PMusrCanvas::UpdateParamTheoryPad()
void PMusrCanvas::UpdateDataTheoryPad()
{
// some checks first
- unsigned int runNo;
+ UInt_t runNo;
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
fPlotType = plotInfo.fPlotType;
- for (unsigned int i=0; i (int)runs.size()) {
+ if ((Int_t)plotInfo.fRuns[i].Re() > (Int_t)runs.size()) {
fValid = false;
- cout << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** run plot number " << (int)plotInfo.fRuns[i].Re() << " is larger than the number of runs " << runs.size();
- cout << endl;
+ cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** run plot number " << (Int_t)plotInfo.fRuns[i].Re() << " is larger than the number of runs " << runs.size();
+ cerr << endl;
return;
}
// check that the plottype and the fittype do correspond
- runNo = (unsigned int)plotInfo.fRuns[i].Re()-1;
+ runNo = (UInt_t)plotInfo.fRuns[i].Re()-1;
//cout << endl << ">> runNo = " << runNo;
//cout << endl;
if (fPlotType != runs[runNo].fFitType) {
fValid = false;
- cout << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** plottype = " << fPlotType << ", fittype = " << runs[runNo].fFitType << ", however they have to correspond!";
- cout << endl;
+ cerr << endl << "PMusrCanvas::UpdateDataTheoryPad: **ERROR** plottype = " << fPlotType << ", fittype = " << runs[runNo].fFitType << ", however they have to correspond!";
+ cerr << endl;
return;
}
}
PRunData *data;
- for (unsigned int i=0; i > ddvec;
- char sval[128];
- unsigned int runNo;
+ Char_t sval[128];
+ UInt_t runNo;
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
- for (unsigned int i=0; i 1)
tstr = "++" + runs[runNo].fRunName[0] + TString(","); // run_name
else
@@ -555,7 +555,7 @@ void PMusrCanvas::UpdateInfoPad()
sprintf(sval, "%0.2lf", ddvec[0].first);
tstr += TString(sval) + TString("K,");
} else {
- for(unsigned int i(0); ifMainCanvas " << fMainCanvas << endl;
// cout << ">selected " << selected << endl;
//
-//cout << "x : " << (char)x << endl;
-//cout << "px: " << (char)fMainCanvas->GetEventX() << endl;
+//cout << "x : " << (Char_t)x << endl;
+//cout << "px: " << (Char_t)fMainCanvas->GetEventX() << endl;
// handle keys and popup menu entries
- bool relevantKey = false;
+ Bool_t relevantKey = false;
if (x == 'q') { // quit
Done(0);
} else if (x == 'd') { // difference
@@ -937,14 +937,14 @@ void PMusrCanvas::LastCanvasClosed()
*
* \param graphicsFormat One of the supported graphics formats.
*/
-void PMusrCanvas::SaveGraphicsAndQuit(char *fileName, char *graphicsFormat)
+void PMusrCanvas::SaveGraphicsAndQuit(Char_t *fileName, Char_t *graphicsFormat)
{
cout << endl << ">> SaveGraphicsAndQuit: will dump the canvas into a graphics output file (" << graphicsFormat << ") ..."<< endl;
TString str(fileName);
Int_t idx = -1;
Int_t size = 0;
- char ext[32];
+ Char_t ext[32];
if (str.Contains(".msr")) {
idx = str.Index(".msr");
@@ -956,7 +956,7 @@ void PMusrCanvas::SaveGraphicsAndQuit(char *fileName, char *graphicsFormat)
}
if (idx == -1) {
- cout << endl << "PMusrCanvas::SaveGraphicsAndQuit **ERROR**: fileName (" << fileName << ") is invalid." << endl;
+ cerr << endl << "PMusrCanvas::SaveGraphicsAndQuit **ERROR**: fileName (" << fileName << ") is invalid." << endl;
return;
}
@@ -971,7 +971,7 @@ void PMusrCanvas::SaveGraphicsAndQuit(char *fileName, char *graphicsFormat)
fMainCanvas->SaveAs(str.Data());
- if (fPlotNumber == static_cast(fMsrHandler->GetMsrPlotList()->size()) - 1)
+ if (fPlotNumber == static_cast(fMsrHandler->GetMsrPlotList()->size()) - 1)
Done(0);
}
@@ -1005,7 +1005,7 @@ void PMusrCanvas::InitFourier()
fFourier.fApodization = FOURIER_APOD_NONE; // no apodization
fFourier.fPlotTag = FOURIER_PLOT_REAL_AND_IMAG; // initial plot tag, plot real and imaginary part
fFourier.fPhase = 0.0; // fourier phase 0°
- for (unsigned int i=0; i<2; i++) {
+ for (UInt_t i=0; i<2; i++) {
fFourier.fRangeForPhaseCorrection[i] = -1.0; // frequency range for phase correction, default: {-1, -1} = NOT GIVEN
fFourier.fPlotRange[i] = -1.0; // fourier plot range, default: {-1, -1} = NOT GIVEN
}
@@ -1024,7 +1024,7 @@ void PMusrCanvas::InitFourier()
* \param ww
* \param wh
*/
-void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
+void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
{
fValid = false;
fDifferenceView = false;
@@ -1050,8 +1050,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
canvasName += fPlotNumber;
fMainCanvas = new TCanvas(canvasName.Data(), title, wtopx, wtopy, ww, wh);
if (fMainCanvas == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke " << canvasName.Data();
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke " << canvasName.Data();
+ cerr << endl;
return;
}
@@ -1096,8 +1096,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
// title pad
fTitlePad = new TPaveText(0.0, YTITLE, 1.0, 1.0, "NDC");
if (fTitlePad == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fTitlePad";
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fTitlePad";
+ cerr << endl;
return;
}
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
@@ -1108,8 +1108,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
// data/theory pad
fDataTheoryPad = new TPad("dataTheoryPad", "dataTheoryPad", 0.0, YINFO, XTHEO, YTITLE);
if (fDataTheoryPad == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fDataTheoryPad";
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fDataTheoryPad";
+ cerr << endl;
return;
}
fDataTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
@@ -1118,8 +1118,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
// parameter pad
fParameterPad = new TPaveText(XTHEO, 0.5, 1.0, YTITLE, "NDC");
if (fParameterPad == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fParameterPad";
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fParameterPad";
+ cerr << endl;
return;
}
fParameterPad->SetFillColor(TColor::GetColor(255,255,255));
@@ -1129,8 +1129,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
// theory pad
fTheoryPad = new TPaveText(XTHEO, 0.1, 1.0, 0.5, "NDC");
if (fTheoryPad == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fTheoryPad";
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fTheoryPad";
+ cerr << endl;
return;
}
fTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
@@ -1141,8 +1141,8 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
// info pad
fInfoPad = new TLegend(0.0, 0.0, 1.0, YINFO, "NDC");
if (fInfoPad == 0) {
- cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fInfoPad";
- cout << endl;
+ cerr << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fInfoPad";
+ cerr << endl;
return;
}
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
@@ -1373,7 +1373,7 @@ void PMusrCanvas::CleanupDataSet(PMusrCanvasNonMusrDataSet &dataSet)
* \param runNo is the number of the run
* \param data
*/
-void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data)
+void PMusrCanvas::HandleDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
{
//cout << endl << ">> PMusrCanvas::HandleDataSet(): start ...; plotNo = " << plotNo << ", fPlotNumber = " << fPlotNumber << ", runNo = " << runNo << endl;
PMusrCanvasDataSet dataSet;
@@ -1383,7 +1383,7 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
TString name;
double start;
double end;
- int size;
+ Int_t size;
InitDataSet(dataSet);
//cout << endl << ">> PMusrCanvas::HandleDataSet(): after InitDataSet ..." << endl;
@@ -1391,7 +1391,7 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
// dataHisto -------------------------------------------------------------
// create histo specific infos
name = fMsrHandler->GetMsrRunList()->at(runNo).fRunName[0] + "_DataRunNo";
- name += (int)runNo;
+ name += (Int_t)runNo;
name += "_";
name += fPlotNumber;
start = data->GetDataTimeStart() - data->GetDataTimeStep()/2.0;
@@ -1404,9 +1404,9 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
start = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0]; // needed to estimate size
end = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1]; // needed to estimate size
- size = (int) ((end - start) / data->GetDataTimeStep()) + 1;
+ size = (Int_t) ((end - start) / data->GetDataTimeStep()) + 1;
start = data->GetDataTimeStart() +
- (int)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
+ (Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
data->GetDataTimeStep()/2.0; // closesd start value compatible with the user given
end = start + size * data->GetDataTimeStep(); // closesd end value compatible with the user given
}
@@ -1415,9 +1415,9 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin.size() > 1) {
start = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo]; // needed to estimate size
end = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[runNo]; // needed to estimate size
- size = (int) ((end - start) / data->GetDataTimeStep()) + 1;
+ size = (Int_t) ((end - start) / data->GetDataTimeStep()) + 1;
start = data->GetDataTimeStart() +
- (int)((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo] - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
+ (Int_t)((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo] - data->GetDataTimeStart())/data->GetDataTimeStep()) * data->GetDataTimeStep() -
data->GetDataTimeStep()/2.0; // closesd start value compatible with the user given
end = start + size * data->GetDataTimeStep(); // closesd end value compatible with the user given
}
@@ -1473,7 +1473,7 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
// theoHisto -------------------------------------------------------------
// create histo specific infos
name = fMsrHandler->GetMsrRunList()->at(runNo).fRunName[0] + "_TheoRunNo";
- name += (int)runNo;
+ name += (Int_t)runNo;
name += "_";
name += fPlotNumber;
start = data->GetTheoryTimeStart() - data->GetTheoryTimeStep()/2.0;
@@ -1484,9 +1484,9 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fUseFitRanges) {
start = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0]; // needed to estimate size
end = fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[1]; // needed to estimate size
- size = (int) ((end - start) / data->GetTheoryTimeStep()) + 1;
+ size = (Int_t) ((end - start) / data->GetTheoryTimeStep()) + 1;
start = data->GetTheoryTimeStart() +
- (int)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
+ (Int_t)((fMsrHandler->GetMsrRunList()->at(runNo).fFitRange[0] - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
data->GetTheoryTimeStep()/2.0; // closesd start value compatible with the user given
end = start + size * data->GetTheoryTimeStep(); // closesd end value compatible with the user given
}
@@ -1495,9 +1495,9 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin.size() > 1) {
start = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo]; // needed to estimate size
end = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[runNo]; // needed to estimate size
- size = (int) ((end - start) / data->GetTheoryTimeStep()) + 1;
+ size = (Int_t) ((end - start) / data->GetTheoryTimeStep()) + 1;
start = data->GetTheoryTimeStart() +
- (int)((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo] - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
+ (Int_t)((fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[runNo] - data->GetTheoryTimeStart())/data->GetTheoryTimeStep()) * data->GetTheoryTimeStep() -
data->GetTheoryTimeStep()/2.0; // closesd start value compatible with the user given
end = start + size * data->GetTheoryTimeStep(); // closesd end value compatible with the user given
}
@@ -1558,7 +1558,7 @@ void PMusrCanvas::HandleDataSet(unsigned int plotNo, unsigned int runNo, PRunDat
* \param runNo
* \param data
*/
-void PMusrCanvas::HandleNonMusrDataSet(unsigned int plotNo, unsigned int runNo, PRunData *data)
+void PMusrCanvas::HandleNonMusrDataSet(UInt_t plotNo, UInt_t runNo, PRunData *data)
{
PMusrCanvasNonMusrDataSet dataSet;
TGraphErrors *dataHisto;
@@ -1572,7 +1572,7 @@ void PMusrCanvas::HandleNonMusrDataSet(unsigned int plotNo, unsigned int runNo,
dataHisto = new TGraphErrors(data->GetX()->size());
// fill graph
- for (unsigned int i=0; iGetX()->size(); i++) {
+ for (UInt_t i=0; iGetX()->size(); i++) {
dataHisto->SetPoint(i, data->GetX()->at(i), data->GetValue()->at(i));
dataHisto->SetPointError(i, 0.0, data->GetError()->at(i));
}
@@ -1603,7 +1603,7 @@ void PMusrCanvas::HandleNonMusrDataSet(unsigned int plotNo, unsigned int runNo,
theoHisto = new TGraphErrors(data->GetXTheory()->size());
// fill graph
- for (unsigned int i=0; iGetXTheory()->size(); i++) {
+ for (UInt_t i=0; iGetXTheory()->size(); i++) {
theoHisto->SetPoint(i, data->GetXTheory()->at(i), data->GetTheory()->at(i));
theoHisto->SetPointError(i, 0.0, 0.0);
}
@@ -1639,7 +1639,7 @@ void PMusrCanvas::HandleDifference()
TH1F *diffHisto;
TString name;
// loop over all histos
- for (unsigned int i=0; iGetTitle()) + "_diff";
//cout << endl << ">> diff-name = " << name.Data() << endl;
@@ -1659,7 +1659,7 @@ void PMusrCanvas::HandleDifference()
fData[i].diff = diffHisto;
// calculate diff histo entry
double value;
- for (int j=1; jGetNbinsX()-1; j++) {
+ for (Int_t j=1; jGetNbinsX()-1; j++) {
// set diff bin value
value = CalculateDiff(fData[i].data->GetBinCenter(j),
fData[i].data->GetBinContent(j),
@@ -1674,7 +1674,7 @@ void PMusrCanvas::HandleDifference()
TGraphErrors *diffHisto;
TString name;
// loop over all histos
- for (unsigned int i=0; iGetN());
@@ -1696,7 +1696,7 @@ void PMusrCanvas::HandleDifference()
// calculate diff histo entry
double value;
double x, y;
- for (int j=0; jGetN(); j++) {
+ for (Int_t j=0; jGetN(); j++) {
// set diff bin value
fNonMusrData[i].data->GetPoint(j, x, y);
value = CalculateDiff(x, y, fNonMusrData[i].theory);
@@ -1746,7 +1746,7 @@ void PMusrCanvas::HandleFourier()
if (fData[0].dataFourierRe == 0) {
//cout << endl << ">> Recalculate Fourier ----------------------------------------";
//cout << endl << ">> fData[0].data = " << fData[0].data;
- int bin;
+ Int_t bin;
bin = fHistoFrame->GetXaxis()->GetFirst();
//cout << endl << ">> start bin = " << bin;
double startTime = fHistoFrame->GetBinCenter(bin);
@@ -1755,11 +1755,11 @@ void PMusrCanvas::HandleFourier()
//cout << endl << ">> end bin = " << bin;
double endTime = fHistoFrame->GetBinCenter(bin);
//cout << endl << ">> Fourier: startTime = " << startTime << ", endTime = " << endTime;
- for (unsigned int i=0; iSetMarkerStyle(fData[i].data->GetMarkerStyle());
// calculate fourier transform of the theory
- int powerPad = (int)round(log((endTime-startTime)/fData[i].theory->GetBinWidth(1))/log(2))+3;
+ Int_t powerPad = (Int_t)round(log((endTime-startTime)/fData[i].theory->GetBinWidth(1))/log(2))+3;
//cout << endl << ">> powerPad = " << powerPad;
PFourier fourierTheory(fData[i].theory, fFourier.fUnits, startTime, endTime, powerPad);
if (!fourierTheory.IsValid()) {
- cout << endl << "**SEVERE ERROR** PMusrCanvas::HandleFourier: couldn't invoke PFourier to calculate the Fourier theory ..." << endl;
+ cerr << endl << "**SEVERE ERROR** PMusrCanvas::HandleFourier: couldn't invoke PFourier to calculate the Fourier theory ..." << endl;
return;
}
fourierTheory.Transform(fFourier.fApodization);
@@ -1842,9 +1842,9 @@ cout << endl;
fCurrentFourierPhase = fFourier.fPhase;
- for (unsigned int i=0; iGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].dataFourierRe->GetBinContent(j) * cp + fData[i].dataFourierIm->GetBinContent(j) * sp;
im = fData[i].dataFourierIm->GetBinContent(j) * cp - fData[i].dataFourierRe->GetBinContent(j) * sp;
@@ -1854,7 +1854,7 @@ cout << endl;
}
}
if ((fData[i].theoryFourierRe != 0) && (fData[i].theoryFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].theoryFourierRe->GetBinContent(j) * cp + fData[i].theoryFourierIm->GetBinContent(j) * sp;
im = fData[i].theoryFourierIm->GetBinContent(j) * cp - fData[i].theoryFourierRe->GetBinContent(j) * sp;
@@ -1876,9 +1876,9 @@ cout << endl;
const double cp = TMath::Cos(fCurrentFourierPhase/180.0*TMath::Pi());
const double sp = TMath::Sin(fCurrentFourierPhase/180.0*TMath::Pi());
- for (unsigned int i=0; iGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].dataFourierRe->GetBinContent(j) * cp + fData[i].dataFourierIm->GetBinContent(j) * sp;
im = fData[i].dataFourierIm->GetBinContent(j) * cp - fData[i].dataFourierRe->GetBinContent(j) * sp;
@@ -1888,7 +1888,7 @@ cout << endl;
}
}
if ((fData[i].theoryFourierRe != 0) && (fData[i].theoryFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].theoryFourierRe->GetBinContent(j) * cp + fData[i].theoryFourierIm->GetBinContent(j) * sp;
im = fData[i].theoryFourierIm->GetBinContent(j) * cp - fData[i].theoryFourierRe->GetBinContent(j) * sp;
@@ -1924,17 +1924,17 @@ void PMusrCanvas::HandleFourierDifference()
// check if difference has been already calcualted, if not do it
if (fData[0].diff == 0)
HandleDifference();
- int bin;
+ Int_t bin;
bin = fData[0].diff->GetXaxis()->GetFirst();
double startTime = fData[0].diff->GetBinCenter(bin);
bin = fData[0].diff->GetXaxis()->GetLast();
double endTime = fData[0].diff->GetBinCenter(bin);
//cout << endl << ">> startTime = " << startTime << ", endTime = " << endTime << endl;
- for (unsigned int i=0; iGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].diffFourierRe->GetBinContent(j) * cp + fData[i].diffFourierIm->GetBinContent(j) * sp;
im = fData[i].diffFourierIm->GetBinContent(j) * cp - fData[i].diffFourierRe->GetBinContent(j) * sp;
@@ -2020,8 +2020,8 @@ double PMusrCanvas::FindOptimalFourierPhase()
Double_t minIm = 0.0, maxIm = 0.0, asymmetry;
// get min/max of the imaginary part for phase = 0.0 as a starting point
minPhase = 0.0;
- bool first = true;
- for (int i=0; iGetNbinsX(); i++) {
+ Bool_t first = true;
+ for (Int_t i=0; iGetNbinsX(); i++) {
x = fData[0].dataFourierIm->GetBinCenter(i);
if ((x > fFourier.fRangeForPhaseCorrection[0]) && (x < fFourier.fRangeForPhaseCorrection[1])) {
valIm = fData[0].dataFourierIm->GetBinContent(i);
@@ -2047,7 +2047,7 @@ double PMusrCanvas::FindOptimalFourierPhase()
cp = TMath::Cos(phase / 180.0 * TMath::Pi());
sp = TMath::Sin(phase / 180.0 * TMath::Pi());
first = true;
- for (int i=0; iGetNbinsX(); i++) {
+ for (Int_t i=0; iGetNbinsX(); i++) {
x = fData[0].dataFourierIm->GetBinCenter(i);
if ((x > fFourier.fRangeForPhaseCorrection[0]) && (x < fFourier.fRangeForPhaseCorrection[1])) {
valIm = -sp * fData[0].dataFourierRe->GetBinContent(i) + cp * fData[0].dataFourierIm->GetBinContent(i);
@@ -2085,7 +2085,7 @@ cout << endl << ">> optimal phase = " << minPhase << endl;
*/
void PMusrCanvas::CleanupDifference()
{
- for (unsigned int i=0; iGetBinContent(1);
double binContent;
- for (int i=2; i < histo->GetNbinsX(); i++) {
+ for (Int_t i=2; i < histo->GetNbinsX(); i++) {
binContent = histo->GetBinContent(i);
if (max < binContent)
max = binContent;
@@ -2276,7 +2276,7 @@ double PMusrCanvas::GetGlobalMinimum(TH1F* histo)
double min = histo->GetBinContent(1);
double binContent;
- for (int i=2; i < histo->GetNbinsX(); i++) {
+ for (Int_t i=2; i < histo->GetNbinsX(); i++) {
binContent = histo->GetBinContent(i);
if (min > binContent)
min = binContent;
@@ -2317,7 +2317,7 @@ void PMusrCanvas::PlotData()
Double_t dataXmax = fData[0].data->GetXaxis()->GetXmax();
Double_t dataYmin = fData[0].data->GetMinimum();
Double_t dataYmax = fData[0].data->GetMaximum();
- for (unsigned int i=1; iGetXaxis()->GetXmin() < dataXmin)
dataXmin = fData[i].data->GetXaxis()->GetXmin();
if (fData[i].data->GetXaxis()->GetXmax() > dataXmax)
@@ -2338,7 +2338,7 @@ void PMusrCanvas::PlotData()
fXmax = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[0];
fYmin = fData[0].data->GetMinimum();
fYmax = fData[0].data->GetMaximum();
- for (unsigned int i=1; iGetMsrPlotList()->at(fPlotNumber).fTmin.size(); i++) {
+ for (UInt_t i=1; iGetMsrPlotList()->at(fPlotNumber).fTmin.size(); i++) {
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[i] < fXmin)
fXmin = fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmin[i];
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fTmax[i] > fXmax)
@@ -2394,11 +2394,11 @@ void PMusrCanvas::PlotData()
}
fHistoFrame->GetYaxis()->SetTitle(yAxisTitle.Data());
// plot all data
- for (unsigned int i=0; iDraw("pesame");
}
// plot all the theory
- for (unsigned int i=0; iDraw("lsame");
}
}
@@ -2412,7 +2412,7 @@ void PMusrCanvas::PlotData()
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
- unsigned int runNo = (unsigned int)plotInfo.fRuns[0].Re()-1;
+ UInt_t runNo = (UInt_t)plotInfo.fRuns[0].Re()-1;
TString xAxisTitle = fRunList->GetXAxisTitle(runs[runNo].fRunName[0], runNo);
TString yAxisTitle = fRunList->GetYAxisTitle(runs[runNo].fRunName[0], runNo);
@@ -2423,7 +2423,7 @@ void PMusrCanvas::PlotData()
assert(fMultiGraphData != 0);
// add all data to fMultiGraphData
- for (unsigned int i=0; iAdd(ge, "p");
}
// add all the theory to fMultiGraphData
- for (unsigned int i=0; iGetXAxisTitle(runs[runNo].fRunName[0], runNo);
yAxisTitle = fRunList->GetYAxisTitle(runs[runNo].fRunName[0], runNo);
legendLabel.push_back(xAxisTitle + " vs. " + yAxisTitle);
}
- for (unsigned int i=0; iAddEntry(fNonMusrData[i].data, legendLabel[i].Data(), "p");
}
legendLabel.clear();
@@ -2517,7 +2517,7 @@ void PMusrCanvas::PlotDifference()
// set y-axis label
hframe->GetYaxis()->SetTitle("data-theory");
// plot all remaining diff data
- for (unsigned int i=0; iDraw("pesame");
}
} else { // fPlotType == MSR_PLOT_NON_MUSR
@@ -2530,7 +2530,7 @@ void PMusrCanvas::PlotDifference()
PMsrRunList runs = *fMsrHandler->GetMsrRunList();
PMsrPlotStructure plotInfo = fMsrHandler->GetMsrPlotList()->at(fPlotNumber);
- unsigned int runNo = (unsigned int)plotInfo.fRuns[0].Re()-1;
+ UInt_t runNo = (UInt_t)plotInfo.fRuns[0].Re()-1;
TString xAxisTitle = fRunList->GetXAxisTitle(runs[runNo].fRunName[0], runNo);
// if fMultiGraphDiff is not present create it and add the diff data
@@ -2539,7 +2539,7 @@ void PMusrCanvas::PlotDifference()
assert(fMultiGraphDiff != 0);
// add all diff data to fMultiGraphDiff
- for (unsigned int i=0; i> y-range: min, max = " << min << ", " << max;
- for (unsigned int i=1; iGetYaxis()->SetTitle("Real Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("psame");
}
// plot theories
- for (unsigned int i=0; iDraw("same");
}
@@ -2668,7 +2668,7 @@ void PMusrCanvas::PlotFourier()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].dataFourierIm);
max = GetGlobalMaximum(fData[0].dataFourierIm);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Imaginary Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("psame");
}
// plot theories
- for (unsigned int i=0; iDraw("same");
}
@@ -2716,7 +2716,7 @@ void PMusrCanvas::PlotFourier()
// real part first
min = GetGlobalMinimum(fData[0].dataFourierRe);
max = GetGlobalMaximum(fData[0].dataFourierRe);
- for (unsigned int i=1; iDraw("psame");
- for (unsigned int i=1; iDraw("psame");
fData[i].dataFourierIm->Draw("psame");
}
// plot theories
- for (unsigned int i=0; iDraw("same");
fData[i].theoryFourierIm->Draw("same");
}
@@ -2775,7 +2775,7 @@ void PMusrCanvas::PlotFourier()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].dataFourierPwr);
max = GetGlobalMaximum(fData[0].dataFourierPwr);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Power Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("psame");
}
// plot theories
- for (unsigned int i=0; iDraw("same");
}
@@ -2820,7 +2820,7 @@ void PMusrCanvas::PlotFourier()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].dataFourierPhase);
max = GetGlobalMaximum(fData[0].dataFourierPhase);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Phase Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("psame");
}
// plot theories
- for (unsigned int i=0; iDraw("same");
}
@@ -2913,7 +2913,7 @@ void PMusrCanvas::PlotFourierDifference()
min = GetGlobalMinimum(fData[0].diffFourierRe);
max = GetGlobalMaximum(fData[0].diffFourierRe);
//cout << endl << ">> y-range: min, max = " << min << ", " << max;
- for (unsigned int i=1; iGetYaxis()->SetTitle("Real Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("plsame");
}
@@ -2956,7 +2956,7 @@ void PMusrCanvas::PlotFourierDifference()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].diffFourierIm);
max = GetGlobalMaximum(fData[0].diffFourierIm);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Imaginary Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("plsame");
}
@@ -2998,7 +2998,7 @@ void PMusrCanvas::PlotFourierDifference()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].diffFourierRe);
max = GetGlobalMaximum(fData[0].diffFourierRe);
- for (unsigned int i=1; i max)
max = binContent;
}
- for (unsigned int i=0; iDraw("plsame");
- for (unsigned int i=1; iDraw("plsame");
fData[i].diffFourierIm->Draw("plsame");
}
@@ -3050,7 +3050,7 @@ void PMusrCanvas::PlotFourierDifference()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].diffFourierPwr);
max = GetGlobalMaximum(fData[0].diffFourierPwr);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Power Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("plsame");
}
@@ -3092,7 +3092,7 @@ void PMusrCanvas::PlotFourierDifference()
// first find minimum/maximum of all histos
min = GetGlobalMinimum(fData[0].diffFourierPhase);
max = GetGlobalMaximum(fData[0].diffFourierPhase);
- for (unsigned int i=1; iGetYaxis()->SetTitle("Phase Fourier");
// plot all remaining data
- for (unsigned int i=1; iDraw("plsame");
}
@@ -3179,9 +3179,9 @@ void PMusrCanvas::IncrementFourierPhase()
fCurrentFourierPhase += fFourier.fPhaseIncrement;
PlotFourierPhaseValue();
- for (unsigned int i=0; iGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].dataFourierRe->GetBinContent(j) * cp + fData[i].dataFourierIm->GetBinContent(j) * sp;
im = fData[i].dataFourierIm->GetBinContent(j) * cp - fData[i].dataFourierRe->GetBinContent(j) * sp;
@@ -3191,7 +3191,7 @@ void PMusrCanvas::IncrementFourierPhase()
}
}
if ((fData[i].theoryFourierRe != 0) && (fData[i].theoryFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].theoryFourierRe->GetBinContent(j) * cp + fData[i].theoryFourierIm->GetBinContent(j) * sp;
im = fData[i].theoryFourierIm->GetBinContent(j) * cp - fData[i].theoryFourierRe->GetBinContent(j) * sp;
@@ -3201,7 +3201,7 @@ void PMusrCanvas::IncrementFourierPhase()
}
}
if ((fData[i].diffFourierRe != 0) && (fData[i].diffFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier diff data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier diff data set
// calculate new fourier diff data set value
re = fData[i].diffFourierRe->GetBinContent(j) * cp + fData[i].diffFourierIm->GetBinContent(j) * sp;
im = fData[i].diffFourierIm->GetBinContent(j) * cp - fData[i].diffFourierRe->GetBinContent(j) * sp;
@@ -3230,9 +3230,9 @@ void PMusrCanvas::DecrementFourierPhase()
fCurrentFourierPhase -= fFourier.fPhaseIncrement;
PlotFourierPhaseValue();
- for (unsigned int i=0; iGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].dataFourierRe->GetBinContent(j) * cp - fData[i].dataFourierIm->GetBinContent(j) * sp;
im = fData[i].dataFourierIm->GetBinContent(j) * cp + fData[i].dataFourierRe->GetBinContent(j) * sp;
@@ -3242,7 +3242,7 @@ void PMusrCanvas::DecrementFourierPhase()
}
}
if ((fData[i].theoryFourierRe != 0) && (fData[i].theoryFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier data set
// calculate new fourier data set value
re = fData[i].theoryFourierRe->GetBinContent(j) * cp - fData[i].theoryFourierIm->GetBinContent(j) * sp;
im = fData[i].theoryFourierIm->GetBinContent(j) * cp + fData[i].theoryFourierRe->GetBinContent(j) * sp;
@@ -3252,7 +3252,7 @@ void PMusrCanvas::DecrementFourierPhase()
}
}
if ((fData[i].diffFourierRe != 0) && (fData[i].diffFourierIm != 0)) {
- for (int j=0; jGetNbinsX(); j++) { // loop over a fourier diff data set
+ for (Int_t j=0; jGetNbinsX(); j++) { // loop over a fourier diff data set
// calculate new fourier diff data set value
re = fData[i].diffFourierRe->GetBinContent(j) * cp - fData[i].diffFourierIm->GetBinContent(j) * sp;
im = fData[i].diffFourierIm->GetBinContent(j) * cp + fData[i].diffFourierRe->GetBinContent(j) * sp;
@@ -3281,7 +3281,7 @@ void PMusrCanvas::SaveDataAscii()
TString str;
TString flnData = TString("");
TString flnTheo = TString("");
- for (int i=0; iGetEntries()-1; i++) {
+ for (Int_t i=0; iGetEntries()-1; i++) {
ostr = dynamic_cast(tokens->At(i));
flnData += ostr->GetString() + TString(".");
flnTheo += ostr->GetString() + TString(".");
@@ -3305,7 +3305,7 @@ void PMusrCanvas::SaveDataAscii()
// open output data-file
foutData.open(flnData.Data(), iostream::out);
if (!foutData.is_open()) {
- cout << endl << ">> PMusrCanvas::SaveDataAscii: **ERROR** couldn't open file " << flnData.Data() << " for writing." << endl;
+ cerr << endl << ">> PMusrCanvas::SaveDataAscii: **ERROR** couldn't open file " << flnData.Data() << " for writing." << endl;
return;
}
@@ -3313,7 +3313,7 @@ void PMusrCanvas::SaveDataAscii()
// open output theory-file
foutTheo.open(flnTheo.Data(), iostream::out);
if (!foutTheo.is_open()) {
- cout << endl << ">> PMusrCanvas::SaveDataAscii: **ERROR** couldn't open file " << flnTheo.Data() << " for writing." << endl;
+ cerr << endl << ">> PMusrCanvas::SaveDataAscii: **ERROR** couldn't open file " << flnTheo.Data() << " for writing." << endl;
return;
}
}
@@ -3333,7 +3333,7 @@ void PMusrCanvas::SaveDataAscii()
case PV_DATA:
// write header
foutData << "% time (us)";
- for (unsigned int j=0; jGetXaxis()->GetBinCenter(xminBin);
xmax = fHistoFrame->GetXaxis()->GetBinCenter(xmaxBin);
// get difference data
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
time = fData[0].diff->GetBinCenter(i); // get time
if ((time < xmin) || (time > xmax))
continue;
foutData << time;
- for (unsigned int j=0; jGetBinContent(i);
foutData << ", " << fData[j].diff->GetBinError(i);
}
@@ -3373,13 +3373,13 @@ void PMusrCanvas::SaveDataAscii()
case PV_DATA:
// write header
foutData << endl << "% timeData (us)";
- for (unsigned int j=0; jGetXaxis()->GetBinCenter(xminBin);
xmax = fHistoFrame->GetXaxis()->GetBinCenter(xmaxBin);
// write data
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
time = fData[0].data->GetBinCenter(i); // get time
if ((time < xmin) || (time > xmax))
continue;
foutData << time << ", ";
- for (unsigned int j=0; jGetBinContent(i) << ", ";
foutData << fData[j].data->GetBinError(i) << ", ";
}
@@ -3406,12 +3406,12 @@ void PMusrCanvas::SaveDataAscii()
}
// write theory
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
time = fData[0].theory->GetBinCenter(i); // get time
if ((time < xmin) || (time > xmax))
continue;
foutTheo << time << ", ";
- for (unsigned int j=0; jGetBinContent(i) << ", ";
}
// write last data set
@@ -3437,13 +3437,13 @@ void PMusrCanvas::SaveDataAscii()
break;
}
foutData << str.Data();
- for (unsigned int j=0; jGetXaxis()->GetBinCenter(xmaxBin);
// write data
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
xval = fData[0].dataFourierRe->GetBinCenter(i); // get x-unit
if ((xval < xmin) || (xval > xmax))
continue;
foutData << xval;
- for (unsigned int j=0; jGetBinContent(i);
}
foutData << endl;
}
// write theory
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
xval = fData[0].theoryFourierRe->GetBinCenter(i); // get x-unit
if ((xval < xmin) || (xval > xmax))
continue;
foutTheo << xval;
- for (unsigned int j=0; jGetBinContent(i);
}
foutTheo << endl;
@@ -3496,13 +3496,13 @@ void PMusrCanvas::SaveDataAscii()
break;
}
foutData << str.Data();
- for (unsigned int j=0; jGetXaxis()->GetBinCenter(xmaxBin);
// write data
- for (int i=1; iGetNbinsX()-1; i++) {
+ for (Int_t i=1; iGetNbinsX()-1; i++) {
xval = fData[0].dataFourierIm->GetBinCenter(i); // get x-unit
if ((xval < xmin) || (xval > xmax))
continue;
foutData << xval;
- for (unsigned int j=0; j