Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/Field/src/MagFieldContFact.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ FairParSet* MagFieldContFact::createContainer(FairContainer* c)
{
// calls the constructor of the corresponding parameter container.
const char* name = c->GetName();
LOG(INFO) << "MagFieldContFact::createContainer: Creating mag.field container " << name;
LOG(info) << "MagFieldContFact::createContainer: Creating mag.field container " << name;
FairParSet* p = nullptr;
if (strcmp(name, "MagFieldParam") == 0) {
p = new MagFieldParam(c->getConcatName().Data(), c->GetTitle(), c->getContext());
Expand Down
2 changes: 1 addition & 1 deletion Common/Field/src/MagFieldFact.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void MagFieldFact::SetParm()
FairField* MagFieldFact::createFairField()
{
if (!mFieldPar) {
LOG(ERROR) << "MagFieldFact::createFairField: No field parameters available";
LOG(error) << "MagFieldFact::createFairField: No field parameters available";
return nullptr;
}
// since we have just 1 field class, we don't need to consider fFieldPar->GetType()
Expand Down
16 changes: 8 additions & 8 deletions Common/Field/src/MagFieldFast.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MagFieldFast::MagFieldFast(const string inpFName) : mFactorSol(1.f)
{
// c-tor
if (!inpFName.empty() && !LoadData(inpFName)) {
LOG(FATAL) << "Failed to initialize from " << inpFName;
LOG(fatal) << "Failed to initialize from " << inpFName;
}
}

Expand All @@ -50,12 +50,12 @@ MagFieldFast::MagFieldFast(float factor, int nomField, const string inpFmt) : mF
{
// c-tor
if (nomField != 2 && nomField != 5) {
LOG(FATAL) << "No parametrization for nominal field of " << nomField << " kG";
LOG(fatal) << "No parametrization for nominal field of " << nomField << " kG";
}
TString pth;
pth.Form(inpFmt.data(), nomField);
if (!LoadData(pth.Data())) {
LOG(FATAL) << "Failed to initialize from " << pth.Data();
LOG(fatal) << "Failed to initialize from " << pth.Data();
}
}

Expand All @@ -66,7 +66,7 @@ bool MagFieldFast::LoadData(const string inpFName)

std::ifstream in(gSystem->ExpandPathName(inpFName.data()), std::ifstream::in);
if (in.fail()) {
LOG(FATAL) << "Failed to open file " << inpFName;
LOG(fatal) << "Failed to open file " << inpFName;
return false;
}
std::string line;
Expand All @@ -85,7 +85,7 @@ bool MagFieldFast::LoadData(const string inpFName)
;
}
if (cnt != 4) {
LOG(FATAL) << "Wrong header " << line;
LOG(fatal) << "Wrong header " << line;
return false;
}
curParam = &mSolPar[header[0]][header[1]][header[2]];
Expand All @@ -94,7 +94,7 @@ bool MagFieldFast::LoadData(const string inpFName)
;
}
if (cnt != header[3]) {
LOG(FATAL) << "Wrong data (npar=" << cnt << ") for param " << header[0] << " " << header[1] << " " << header[2]
LOG(fatal) << "Wrong data (npar=" << cnt << ") for param " << header[0] << " " << header[1] << " " << header[2]
<< " " << header[3] << " " << line;
return false;
}
Expand All @@ -106,9 +106,9 @@ bool MagFieldFast::LoadData(const string inpFName)
}
}
//
LOG(INFO) << "Loaded " << nParams << " params from " << inpFName;
LOG(info) << "Loaded " << nParams << " params from " << inpFName;
if (nParams != kNSolRRanges * kNSolZRanges * kNQuadrants) {
LOG(FATAL) << "Was expecting " << kNSolRRanges * kNSolZRanges * kNQuadrants << " params";
LOG(fatal) << "Was expecting " << kNSolRRanges * kNSolZRanges * kNQuadrants << " params";
}
return true;
}
Expand Down
30 changes: 15 additions & 15 deletions Common/Field/src/MagneticField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ MagneticField* MagneticField::createNominalField(int fld, bool uniform)
fldCoeffL3 = fldCoeffDip = fld > 0 ? 1. : -1;
break;
default:
LOG(FATAL) << "Field option " << fld << " is not supported, use +-2, +-5 or 0 or <int_kilogauss>U";
LOG(fatal) << "Field option " << fld << " is not supported, use +-2, +-5 or 0 or <int_kilogauss>U";
};
}
return new o2::field::MagneticField("Maps", "Maps", fldCoeffL3, fldCoeffDip, fldType);
Expand All @@ -188,7 +188,7 @@ void MagneticField::CreateField()

// does real creation of the field
if (mDefaultIntegration < 0 || mDefaultIntegration > 2) {
LOG(WARNING) << "MagneticField::CreateField: Invalid magnetic field flag: " << mDefaultIntegration
LOG(warning) << "MagneticField::CreateField: Invalid magnetic field flag: " << mDefaultIntegration
<< "; Helix tracking chosen instead";
mDefaultIntegration = 2;
}
Expand All @@ -205,7 +205,7 @@ void MagneticField::CreateField()
mBeamEnergy = 2760; // same rigitiy max PbPb energy
}
//
LOG(INFO) << "MagneticField::CreateField: Maximim possible beam energy for requested beam is assumed";
LOG(info) << "MagneticField::CreateField: Maximim possible beam energy for requested beam is assumed";
}

const char* parname = nullptr;
Expand All @@ -217,7 +217,7 @@ void MagneticField::CreateField()
} else if (mMapType == MagFieldParam::k5kGUniform) {
parname = "Sol30_Dip6_Uniform";
} else {
LOG(FATAL) << "MagneticField::CreateField: Unknown field identifier " << mMapType << " is requested\n";
LOG(fatal) << "MagneticField::CreateField: Unknown field identifier " << mMapType << " is requested\n";
}

setParameterName(parname);
Expand All @@ -239,19 +239,19 @@ Bool_t MagneticField::loadParameterization()
*/

if (mMeasuredMap) {
LOG(FATAL) << "MagneticField::loadParameterization: Field data " << getParameterName()
LOG(fatal) << "MagneticField::loadParameterization: Field data " << getParameterName()
<< " are already loaded from " << getDataFileName() << "\n";
}
const char* fname = gSystem->ExpandPathName(getDataFileName());
TFile* file = TFile::Open(fname);
if (!file) {
LOG(FATAL) << "MagneticField::loadParameterization: Failed to open magnetic field data file " << fname << "\n";
LOG(fatal) << "MagneticField::loadParameterization: Failed to open magnetic field data file " << fname << "\n";
}

mMeasuredMap =
std::unique_ptr<MagneticWrapperChebyshev>(dynamic_cast<MagneticWrapperChebyshev*>(file->Get(getParameterName())));
if (!mMeasuredMap) {
LOG(FATAL) << "MagneticField::loadParameterization: Did not find field " << getParameterName() << " in " << fname
LOG(fatal) << "MagneticField::loadParameterization: Did not find field " << getParameterName() << " in " << fname
<< "%s\n";
}
file->Close();
Expand Down Expand Up @@ -556,7 +556,7 @@ MagneticField* MagneticField::createFieldMap(Float_t l3Cur, Float_t diCur, Int_t
if (diCur <= zero) {
sclDip = 0.; // some small current.. -> Dipole OFF
} else {
LOG(FATAL) << "MagneticField::createFieldMap: Wrong dipole current (" << diCur << " A)!";
LOG(fatal) << "MagneticField::createFieldMap: Wrong dipole current (" << diCur << " A)!";
}
}

Expand All @@ -575,14 +575,14 @@ MagneticField* MagneticField::createFieldMap(Float_t l3Cur, Float_t diCur, Int_t
sclDip = 0;
map = MagFieldParam::k5kGUniform;
} else {
LOG(FATAL) << "MagneticField::createFieldMap: Wrong L3 current (" << l3Cur << " A)!";
LOG(fatal) << "MagneticField::createFieldMap: Wrong L3 current (" << l3Cur << " A)!";
}
}

if (sclDip != 0 && map != MagFieldParam::k5kGUniform) {
if ((l3Cur <= zero) ||
((convention == kConvLHC && l3Pol != diPol) || (convention == kConvDCS2008 && l3Pol == diPol))) {
LOG(FATAL) << "MagneticField::createFieldMap: Wrong combination for L3/Dipole polarities ("
LOG(fatal) << "MagneticField::createFieldMap: Wrong combination for L3/Dipole polarities ("
<< (l3Pol > 0 ? '+' : '-') << "/" << (diPol > 0 ? '+' : '-') << ") for convention "
<< getPolarityConvention();
}
Expand Down Expand Up @@ -611,7 +611,7 @@ MagneticField* MagneticField::createFieldMap(Float_t l3Cur, Float_t diCur, Int_t
} else if (btypestr.Contains(ionprotonBeam)) {
btype = MagFieldParam::kBeamTypeAp;
} else {
LOG(INFO) << "Assume no LHC magnet field for the beam type " << beamtype;
LOG(info) << "Assume no LHC magnet field for the beam type " << beamtype;
}
char ttl[80];
snprintf(ttl, 79, "L3: %+5d Dip: %+4d kA; %s | Polarities in %s convention", (int)TMath::Sign(l3Cur, float(sclL3)),
Expand Down Expand Up @@ -651,15 +651,15 @@ void MagneticField::Print(Option_t* opt) const
{
TString opts = opt;
opts.ToLower();
LOG(INFO) << "MagneticField::Print: " << GetName() << ":" << GetTitle();
LOG(INFO) << "MagneticField::Print: Solenoid (" << getFactorSolenoid() << "*)"
LOG(info) << "MagneticField::Print: " << GetName() << ":" << GetTitle();
LOG(info) << "MagneticField::Print: Solenoid (" << getFactorSolenoid() << "*)"
<< ((mMapType == MagFieldParam::k5kG || mMapType == MagFieldParam::k5kGUniform) ? 5. : 2) << " kG, Dipole "
<< (mDipoleOnOffFlag ? "OFF" : "ON") << " (" << getFactorDipole() << ") "
<< (mMapType == MagFieldParam::k5kGUniform ? " |Constant Field!" : "");
if (opts.Contains("a")) {
LOG(INFO) << "MagneticField::Print: Machine B fields for " << getBeamTypeText() << " beam (" << mBeamEnergy
LOG(info) << "MagneticField::Print: Machine B fields for " << getBeamTypeText() << " beam (" << mBeamEnergy
<< " GeV): QGrad: " << mQuadrupoleGradient << " Dipole: " << mDipoleField;
LOG(INFO) << "MagneticField::Print: Uses " << getParameterName() << " of " << getDataFileName();
LOG(info) << "MagneticField::Print: Uses " << getParameterName() << " of " << getDataFileName();
}
}

Expand Down
8 changes: 4 additions & 4 deletions Common/Field/src/MagneticWrapperChebyshev.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ void MagneticWrapperChebyshev::getTPCIntegralCylindrical(const Double_t* rphiz,
return;
}
if (id >= mNumberOfParameterizationTPC) {
LOG(ERROR) << "MagneticWrapperChebyshev::getTPCIntegralCylindrical: Wrong TPCParam segment " << id;
LOG(error) << "MagneticWrapperChebyshev::getTPCIntegralCylindrical: Wrong TPCParam segment " << id;
b[0] = b[1] = b[2] = 0;
return;
}
Expand All @@ -792,7 +792,7 @@ void MagneticWrapperChebyshev::getTPCRatIntegralCylindrical(const Double_t* rphi
return;
}
if (id >= mNumberOfParameterizationTPCRat) {
LOG(ERROR) << "MagneticWrapperChebyshev::getTPCRatIntegralCylindrical: Wrong TPCRatParam segment " << id;
LOG(error) << "MagneticWrapperChebyshev::getTPCRatIntegralCylindrical: Wrong TPCRatParam segment " << id;
b[0] = b[1] = b[2] = 0;
return;
}
Expand All @@ -808,7 +808,7 @@ void MagneticWrapperChebyshev::getTPCRatIntegralCylindrical(const Double_t* rphi
void checkExpected(char const* expected, TString& buffs)
{
if (!buffs.BeginsWith(expected)) {
LOG(ERROR) << R"(MagneticWrapperChebyshev::loadData: Expected: ")" << expected << R"( <name>", found ")" << buffs.Data() << "\"\nStop\n";
LOG(error) << R"(MagneticWrapperChebyshev::loadData: Expected: ")" << expected << R"( <name>", found ")" << buffs.Data() << "\"\nStop\n";
exit(1);
}
}
Expand Down Expand Up @@ -903,7 +903,7 @@ void MagneticWrapperChebyshev::loadData(const char* inpfile)
Chebyshev3DCalc::readLine(buffs, stream);

if (!buffs.BeginsWith("END ") && !buffs.Contains(GetName())) {
LOG(ERROR) << R"(MagneticWrapperChebyshev::loadData: Expected: "END )"
LOG(error) << R"(MagneticWrapperChebyshev::loadData: Expected: "END )"
<< GetName() << R"( ", found ")" << buffs.Data() << "\"\nStop\n";
exit(1);
}
Expand Down
8 changes: 4 additions & 4 deletions Common/Field/test/testMagneticField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE(MagneticField_test)
// create magnetic field
std::unique_ptr<MagneticField> fld = std::make_unique<MagneticField>("Maps", "Maps", 1., 1., o2::field::MagFieldParam::k5kG);
double bz0 = fld->solenoidField();
LOG(INFO) << "Created default magnetic field for " << bz0 << "kG";
LOG(info) << "Created default magnetic field for " << bz0 << "kG";
const double nomBz = 5.00685;
BOOST_CHECK_CLOSE(bz0, nomBz, 0.1);

Expand Down Expand Up @@ -71,13 +71,13 @@ BOOST_AUTO_TEST_CASE(MagneticField_test)
double sS = swSlow.CpuTime() / (ntst * repFactor);
double sF = swFast.CpuTime() / (ntst * repFactor);
double rat = sF > 0. ? sS / sF : -1;
LOG(INFO) << "Timing: Exact param: " << sS << " Fast param: " << sF
LOG(info) << "Timing: Exact param: " << sS << " Fast param: " << sF
<< "s/call -> factor " << rat;

// compare slow/fast param precision
double mean[3] = {0.}, rms[3] = {0.};
const char comp[] = "XYZ";
LOG(INFO) << "Relative precision of fast field wrt exact field";
LOG(info) << "Relative precision of fast field wrt exact field";
for (int it = ntst; it--;) {
fld->Field(xyz[it], bfast);
for (int i = 0; i < 3; i++) {
Expand All @@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE(MagneticField_test)
rms[i] /= ntst;
rms[i] -= mean[i] * mean[i];
rms[i] = TMath::Sqrt(rms[i]);
LOG(INFO) << "deltaB" << comp[i] << ": "
LOG(info) << "deltaB" << comp[i] << ": "
<< " mean=" << mean[i] << "(" << mean[i] / nomBz * 100. << "%)"
<< " RMS =" << rms[i] << "(" << rms[i] / nomBz * 100. << "%)";
BOOST_CHECK(TMath::Abs(mean[i] / nomBz) < 1.e-3);
Expand Down
2 changes: 1 addition & 1 deletion Common/MathUtils/include/MathUtils/fit.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ double fitGaus(size_t nBins, const T* arr, const T xMin, const T xMax, std::arra
auto m33i = m33.Inverse(res);
if (res) {
recover();
LOG(ERROR) << np << " points collected, matrix inversion failed " << m33;
LOG(error) << np << " points collected, matrix inversion failed " << m33;
return -10;
}
auto v = m33i * v3;
Expand Down
26 changes: 13 additions & 13 deletions Common/MathUtils/src/Chebyshev3D.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Chebyshev3D::Chebyshev3D(const char* funName, int dimOut, const Float_t* bmin, c
mUserMacro(nullptr)
{
if (dimOut < 1) {
LOG(ERROR) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "\nStop\n";
LOG(error) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "\nStop\n";
exit(1);
}
for (int i = 3; i--;) {
Expand Down Expand Up @@ -166,7 +166,7 @@ Chebyshev3D::Chebyshev3D(void (*ptr)(float*, float*), int dimOut, const Float_t*
mUserMacro(nullptr)
{
if (dimOut < 1) {
LOG(ERROR) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << " \nStop\n";
LOG(error) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << " \nStop\n";
exit(1);
}
for (int i = 3; i--;) {
Expand Down Expand Up @@ -196,7 +196,7 @@ Chebyshev3D::Chebyshev3D(void (*ptr)(float*, float*), int dimOut, const Float_t*
mUserMacro(nullptr)
{
if (dimOut < 1) {
LOG(ERROR) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "%d\nStop\n";
LOG(error) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "%d\nStop\n";
exit(1);
}
for (int i = 3; i--;) {
Expand Down Expand Up @@ -231,11 +231,11 @@ Chebyshev3D::Chebyshev3D(void (*ptr)(float*, float*), int dimOut, const Float_t*
mUserMacro(nullptr)
{
if (dimOut != 3) {
LOG(ERROR) << "Chebyshev3D: This constructor works only for 3D fits, " << mOutputArrayDimension << "D fit was requested\n";
LOG(error) << "Chebyshev3D: This constructor works only for 3D fits, " << mOutputArrayDimension << "D fit was requested\n";
exit(1);
}
if (dimOut < 1) {
LOG(ERROR) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "\nStop\n";
LOG(error) << "Chebyshev3D: Requested output dimension is " << mOutputArrayDimension << "\nStop\n";
exit(1);
}
for (int i = 3; i--;) {
Expand Down Expand Up @@ -332,7 +332,7 @@ void Chebyshev3D::prepareBoundaries(const Float_t* bmin, const Float_t* bmax)
mMaxBoundaries[i] = bmax[i];
mBoundaryMappingScale[i] = bmax[i] - bmin[i];
if (mBoundaryMappingScale[i] <= 0) {
LOG(FATAL) << "Boundaries for " << i << "-th dimension are not increasing: "
LOG(fatal) << "Boundaries for " << i << "-th dimension are not increasing: "
<< mMinBoundaries[i] << " " << mMaxBoundaries[i] << "\nStop\n";
}
mBoundaryMappingOffset[i] = bmin[i] + mBoundaryMappingScale[i] / 2.0;
Expand Down Expand Up @@ -370,7 +370,7 @@ void Chebyshev3D::setuserFunction(const char* name)
tmpst += "+"; // prepare filename to compile

if (gROOT->LoadMacro(tmpst.Data())) {
LOG(ERROR) << "SetUsrFunction: Failed to load user function from " << name << " \nStop\n";
LOG(error) << "SetUsrFunction: Failed to load user function from " << name << " \nStop\n";
exit(1);
}

Expand Down Expand Up @@ -466,7 +466,7 @@ void Chebyshev3D::defineGrid(const Int_t* npoints)
for (int id = 3; id--;) {
mNumberOfPoints[id] = npoints[id];
if (mNumberOfPoints[id] < kMinPoints) {
LOG(ERROR) << "DefineGrid: at " << id << "-th dimension " << mNumberOfPoints[id] << " point is requested, at least " << kMinPoints << " is needed\nStop\n";
LOG(error) << "DefineGrid: at " << id << "-th dimension " << mNumberOfPoints[id] << " point is requested, at least " << kMinPoints << " is needed\nStop\n";
exit(1);
}
ntot += mNumberOfPoints[id];
Expand Down Expand Up @@ -776,28 +776,28 @@ void Chebyshev3D::loadData(FILE* stream)
{
// load coefficients data from stream
if (!stream) {
LOG(FATAL) << "No stream provided.\nStop";
LOG(fatal) << "No stream provided.\nStop";
}
TString buffs;
Clear();
Chebyshev3DCalc::readLine(buffs, stream);
if (!buffs.BeginsWith("START")) {
LOG(FATAL) << R"(Expected: "START <fit_name>", found ")" << buffs.Data() << "\"\nStop\n";
LOG(fatal) << R"(Expected: "START <fit_name>", found ")" << buffs.Data() << "\"\nStop\n";
}
SetName(buffs.Data() + buffs.First(' ') + 1);

Chebyshev3DCalc::readLine(buffs, stream); // N output dimensions
mOutputArrayDimension = buffs.Atoi();
if (mOutputArrayDimension < 1) {
LOG(FATAL) << R"(Expected: '<number_of_output_dimensions>', found ")" << buffs.Data() << "\"\nStop\n";
LOG(fatal) << R"(Expected: '<number_of_output_dimensions>', found ")" << buffs.Data() << "\"\nStop\n";
}

setDimOut(mOutputArrayDimension);

Chebyshev3DCalc::readLine(buffs, stream); // Interpolation abs. precision
mPrecision = buffs.Atof();
if (mPrecision <= 0) {
LOG(FATAL) << R"(Expected: '<abs.precision>', found ")" << buffs.Data() << "\"\nStop\n";
LOG(fatal) << R"(Expected: '<abs.precision>', found ")" << buffs.Data() << "\"\nStop\n";
}

for (int i = 0; i < 3; i++) { // Lower boundaries of interpolation region
Expand All @@ -819,7 +819,7 @@ void Chebyshev3D::loadData(FILE* stream)
// check end_of_data record
Chebyshev3DCalc::readLine(buffs, stream);
if (!buffs.BeginsWith("END") || !buffs.Contains(GetName())) {
LOG(FATAL) << R"(Expected "END )" << GetName() << R"(", found ")" << buffs.Data() << "\".\nStop\n";
LOG(fatal) << R"(Expected "END )" << GetName() << R"(", found ")" << buffs.Data() << "\".\nStop\n";
}
}

Expand Down
Loading