Skip to content

Commit

Permalink
[PWGCF] DptDpt - Improve load corrections logs when issues (AliceO2Gr…
Browse files Browse the repository at this point in the history
…oup#8873)

Co-authored-by: Victor <[email protected]>
  • Loading branch information
2 people authored and Archita-Dash committed Dec 11, 2024
1 parent b83a2c2 commit b5caab0
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions PWGCF/Tasks/dptdptcorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ struct DptDptCorrelationsTask {
{
using namespace correlationstask;

LOGF(info, "Stored NUA&NUE corrections for %d track ids", corrs.size());
LOGF(info, "Storing NUA&NUE corrections for %d track ids", corrs.size());
for (uint i = 0; i < corrs.size(); ++i) {
if (corrs[i] != nullptr) {
if (nNoOfDimensions != corrs[i]->GetDimension()) {
LOGF(fatal, " Corrections receved dimensions %d for track id %d different than expected %d", corrs[i]->GetDimension(), i, nNoOfDimensions);
LOGF(fatal, " Corrections received dimensions %d for track id %d different than expected %d", corrs[i]->GetDimension(), i, nNoOfDimensions);
} else {
LOGF(info, " Storing NUA&NUE corrections %s for track id %d with %d dimensions %s",
corrs[i] != nullptr ? corrs[i]->GetName() : "nullptr", i, nNoOfDimensions, corrs[i] != nullptr ? "yes" : "no");
Expand Down Expand Up @@ -332,7 +332,7 @@ struct DptDptCorrelationsTask {
}
}
}
LOGF(info, "Average NUA&NUE correction for track id %d: %f", i, avg / nbins);
LOGF(info, " Average NUA&NUE correction for track id %d: %f", i, avg / nbins);
}
}
ccdbstored = true;
Expand Down Expand Up @@ -1201,7 +1201,7 @@ struct DptDptCorrelationsTask {
{
using namespace correlationstask;

static constexpr std::string_view kStrDim[] = {"", "2D", "3D", "4D"};
static constexpr std::string_view kStrDim[] = {"", "", "2D", "3D", "4D"};
return kStrDim[nNoOfDimensions].data();
}

Expand Down Expand Up @@ -1255,13 +1255,13 @@ struct DptDptCorrelationsTask {
} else {
std::vector<TH1*> corrs{tnames.size(), nullptr};
for (uint isp = 0; isp < tnames.size(); ++isp) {
corrs[isp] = reinterpret_cast<TH1*>(ccdblst->FindObject(
TString::Format("correction%s_%02d-%02d_%s",
getDimensionStr(),
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]),
tnames[isp].c_str())
.Data()));
auto hName = TString::Format("correction%s_%02d-%02d_%s", getDimensionStr(), static_cast<int>(fCentMultMin[ixDCE]), static_cast<int>(fCentMultMax[ixDCE]), tnames[isp].c_str());
corrs[isp] = reinterpret_cast<TH1*>(ccdblst->FindObject(hName.Data()));
if (corrs[isp] != nullptr) {
LOGF(info, "Loaded %s", corrs[isp]->GetName());
} else {
LOGF(warning, "No correction histogram for species %d with name %s", isp, hName.Data());
}
}
storeTrackCorrections(corrs);
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
Expand Down Expand Up @@ -1330,13 +1330,13 @@ struct DptDptCorrelationsTask {
} else {
std::vector<TH1*> corrs{tnames.size(), nullptr};
for (uint isp = 0; isp < tnames.size(); ++isp) {
corrs[isp] = reinterpret_cast<TH1*>(ccdblst->FindObject(
TString::Format("correction%s_%02d-%02d_%s",
getDimensionStr(),
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]),
tnames[isp].c_str())
.Data()));
auto hName = TString::Format("correction%s_%02d-%02d_%s", getDimensionStr(), static_cast<int>(fCentMultMin[ixDCE]), static_cast<int>(fCentMultMax[ixDCE]), tnames[isp].c_str());
corrs[isp] = reinterpret_cast<TH1*>(ccdblst->FindObject(hName.Data()));
if (corrs[isp] != nullptr) {
LOGF(info, "Loaded %s", corrs[isp]->GetName());
} else {
LOGF(warning, "No correction histogram for species %d with name %s", isp, hName.Data());
}
}
dataCEME[ixDCE]->storeTrackCorrections(corrs);
std::vector<TH2*> ptavgs{tnames.size(), nullptr};
Expand Down

0 comments on commit b5caab0

Please sign in to comment.