modernized code to C++11 and newer.
This allows to analyze the code by external code analyzers. Since a lot is adopted, the version is changed to 1.4.3 Conflicts: src/classes/PFitter.cpp src/classes/PFourier.cpp src/classes/PMsrHandler.cpp src/classes/PMusrCanvas.cpp src/classes/PRunAsymmetry.cpp src/classes/PRunAsymmetryRRF.cpp src/classes/PRunListCollection.cpp src/classes/PRunSingleHisto.cpp src/classes/PRunSingleHistoRRF.cpp src/classes/PStartupHandler.cpp src/include/PFourier.h src/include/PRunListCollection.h src/musrFT.cpp
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2016 by Andreas Suter *
|
||||
* Copyright (C) 2007-2019 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -351,7 +351,7 @@ Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_
|
||||
Double_t expectedChisq = 0.0;
|
||||
|
||||
if (idx > fMsrInfo->GetMsrRunList()->size()) {
|
||||
cerr << ">> PRunListCollection::GetSingleRunChisqExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << endl << endl;
|
||||
std::cerr << ">> PRunListCollection::GetSingleHistoChisqExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
|
||||
return expectedChisq;
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ Double_t PRunListCollection::GetSingleRunChisq(const std::vector<Double_t>& par,
|
||||
Double_t chisq = 0.0;
|
||||
|
||||
if (idx > fMsrInfo->GetMsrRunList()->size()) {
|
||||
cerr << ">> PRunListCollection::GetSingleRunChisq() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << endl << endl;
|
||||
std::cerr << ">> PRunListCollection::GetSingleRunChisq() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
|
||||
return chisq;
|
||||
}
|
||||
|
||||
@ -589,7 +589,7 @@ Double_t PRunListCollection::GetSingleHistoMaximumLikelihoodExpected(const std::
|
||||
Double_t expected_mlh = 0.0;
|
||||
|
||||
if (idx > fMsrInfo->GetMsrRunList()->size()) {
|
||||
cerr << ">> PRunListCollection::GetSingleHistoMaximumLikelihoodExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << endl << endl;
|
||||
std::cerr << ">> PRunListCollection::GetSingleHistoMaximumLikelihoodExpected() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
|
||||
return expected_mlh;
|
||||
}
|
||||
|
||||
@ -634,7 +634,7 @@ Double_t PRunListCollection::GetSingleRunMaximumLikelihood(const std::vector<Dou
|
||||
Double_t mlh = 0.0;
|
||||
|
||||
if (idx > fMsrInfo->GetMsrRunList()->size()) {
|
||||
cerr << ">> PRunListCollection::GetSingleRunMaximumLikelihood() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << endl << endl;
|
||||
std::cerr << ">> PRunListCollection::GetSingleRunMaximumLikelihood() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
|
||||
return mlh;
|
||||
}
|
||||
|
||||
@ -680,7 +680,7 @@ UInt_t PRunListCollection::GetNoOfBinsFitted(const UInt_t idx) const
|
||||
UInt_t result = 0;
|
||||
|
||||
if (idx > fMsrInfo->GetMsrRunList()->size()) {
|
||||
cerr << ">> PRunListCollection::GetNoOfBinsFitted() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << endl << endl;
|
||||
std::cerr << ">> PRunListCollection::GetNoOfBinsFitted() **ERROR** idx=" << idx << " is out of range [0.." << fMsrInfo->GetMsrRunList()->size() << "[" << std::endl << std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -773,14 +773,14 @@ UInt_t PRunListCollection::GetTotalNoOfBinsFitted() const
|
||||
*/
|
||||
PRunData* PRunListCollection::GetSingleHisto(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex:
|
||||
if (index >= fRunSingleHistoList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetSingleHisto(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetSingleHisto(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fRunSingleHistoList[index]->CalcTheory();
|
||||
@ -816,14 +816,14 @@ PRunData* PRunListCollection::GetSingleHisto(UInt_t index, EDataSwitch tag)
|
||||
*/
|
||||
PRunData* PRunListCollection::GetSingleHistoRRF(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex:
|
||||
if (index >= fRunSingleHistoRRFList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetSingleHistoRRF(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetSingleHistoRRF(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fRunSingleHistoRRFList[index]->CalcTheory();
|
||||
@ -859,14 +859,14 @@ PRunData* PRunListCollection::GetSingleHistoRRF(UInt_t index, EDataSwitch tag)
|
||||
*/
|
||||
PRunData* PRunListCollection::GetAsymmetry(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex: // called from musrfit when dumping the data
|
||||
if (index > fRunAsymmetryList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetAsymmetry(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetAsymmetry(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fRunAsymmetryList[index]->CalcTheory();
|
||||
@ -902,14 +902,14 @@ PRunData* PRunListCollection::GetAsymmetry(UInt_t index, EDataSwitch tag)
|
||||
*/
|
||||
PRunData* PRunListCollection::GetAsymmetryRRF(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex: // called from musrfit when dumping the data
|
||||
if (index > fRunAsymmetryRRFList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetAsymmetryRRF(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetAsymmetryRRF(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fRunAsymmetryRRFList[index]->CalcTheory();
|
||||
@ -945,14 +945,14 @@ PRunData* PRunListCollection::GetAsymmetryRRF(UInt_t index, EDataSwitch tag)
|
||||
*/
|
||||
PRunData* PRunListCollection::GetMuMinus(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex:
|
||||
if (index > fRunMuMinusList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetMuMinus(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetMuMinus(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
fRunMuMinusList[index]->CalcTheory();
|
||||
data = fRunMuMinusList[index]->GetData();
|
||||
@ -987,14 +987,14 @@ PRunData* PRunListCollection::GetMuMinus(UInt_t index, EDataSwitch tag)
|
||||
*/
|
||||
PRunData* PRunListCollection::GetNonMusr(UInt_t index, EDataSwitch tag)
|
||||
{
|
||||
PRunData *data = 0;
|
||||
PRunData *data = nullptr;
|
||||
|
||||
switch (tag) {
|
||||
case kIndex:
|
||||
if (index > fRunNonMusrList.size()) {
|
||||
cerr << endl << ">> PRunListCollection::GetNonMusr(): **ERROR** index = " << index << " out of bounds";
|
||||
cerr << endl;
|
||||
return 0;
|
||||
std::cerr << std::endl << ">> PRunListCollection::GetNonMusr(): **ERROR** index = " << index << " out of bounds";
|
||||
std::cerr << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
break;
|
||||
case kRunNo:
|
||||
@ -1092,7 +1092,7 @@ const Char_t* PRunListCollection::GetXAxisTitle(const TString &runName, const UI
|
||||
{
|
||||
PRawRunData *runData = fData->GetRunData(runName);
|
||||
|
||||
const Char_t *result = 0;
|
||||
const Char_t *result = nullptr;
|
||||
|
||||
if (runData->fDataNonMusr.FromAscii()) {
|
||||
result = runData->fDataNonMusr.GetLabels()->at(0).Data();
|
||||
@ -1125,7 +1125,7 @@ const Char_t* PRunListCollection::GetYAxisTitle(const TString &runName, const UI
|
||||
{
|
||||
PRawRunData *runData = fData->GetRunData(runName);
|
||||
|
||||
const Char_t *result = 0;
|
||||
const Char_t *result = nullptr;
|
||||
|
||||
if (runData->fDataNonMusr.FromAscii()) {
|
||||
result = runData->fDataNonMusr.GetLabels()->at(1).Data();
|
||||
|
Reference in New Issue
Block a user