Skip to content
Merged
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
4 changes: 2 additions & 2 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@
hm->AddHistogram(histClass, "MCVtxX_VtxY", "Vtx X vs Vtx Y", false, 200, -0.2, 0.2, VarManager::kMCVtxX, 200, -0.2, 0.2, VarManager::kMCVtxY);
hm->AddHistogram(histClass, "MCVtxZ", "Vtx Z", false, 60, -15.0, 15.0, VarManager::kMCVtxZ);
hm->AddHistogram(histClass, "MCVtxZ_VtxX", "Vtx X vs Vtx Z", false, 60, -15.0, 15.0, VarManager::kMCVtxZ, 200, -0.2, 0.2, VarManager::kMCVtxX);
hm->AddHistogram(histClass, "MCVtxX_VtxY", "Vtx X vs Vtx Y", false, 200, 15.0, 15.0, VarManager::kMCVtxZ, 200, -0.2, 0.2, VarManager::kMCVtxY);
hm->AddHistogram(histClass, "MCImpPar", "MC impact param", false, 20, 0.0, 20.0, VarManager::kMCEventImpParam);
hm->AddHistogram(histClass, "MCVtxZ_VtxY", "Vtx Y vs Vtx Z", false, 200, 15.0, 15.0, VarManager::kMCVtxZ, 200, -0.2, 0.2, VarManager::kMCVtxY);
hm->AddHistogram(histClass, "MCImpPar", "MC impact param", false, 200, 0.0, 20.0, VarManager::kMCEventImpParam);
hm->AddHistogram(histClass, "MCCentrFT0C", "MC Centrality FT0C", false, 100, 0.0, 100.0, VarManager::kMCEventCentrFT0C);
hm->AddHistogram(histClass, "MultMCNParticlesEta05", "MultMCNParticlesEta05", false, 150, 0.0, 150.0, VarManager::kMultMCNParticlesEta05);
hm->AddHistogram(histClass, "MultMCNParticlesEta08", "MultMCNParticlesEta08", false, 150, 0.0, 150.0, VarManager::kMultMCNParticlesEta08);
Expand Down Expand Up @@ -2110,7 +2110,7 @@
hm->AddHistogram(histClass, "Eta_Pt_Dilepton", "", false, 100, -2.0, 2.0, VarManager::kDeltaEta, 200, 0.0, 20.0, VarManager::kPairPtDau);
hm->AddHistogram(histClass, "Eta_Pt_Photon", "", false, 100, -2.0, 2.0, VarManager::kEta, 200, 0.0, 20.0, VarManager::kPt);
hm->AddHistogram(histClass, "Eta_Pt_lepton1", "", false, 100, -2.0, 2.0, VarManager::kEta1, 200, 0.0, 20.0, VarManager::kPt);
hm->AddHistogram(histClass, "Eta_Pt_lepton2", "", false, 100, -2.0, 2.0, VarManager::kEta2, 200, 0.0, 20.0, VarManager::kPt);

Check failure on line 2113 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
}

if (!groupStr.CompareTo("photon")) {
Expand Down Expand Up @@ -2266,7 +2266,7 @@
}
}
}
if (isTH2 && isProfile && !hist->HasMember("varZ")) {

Check failure on line 2269 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(fatal) << "Missing varZ information for histogram";
return false;
}
Expand Down Expand Up @@ -2329,7 +2329,7 @@

rapidjson::Document document;
rapidjson::ParseResult ok = document.Parse(json);
if (!ok) {

Check failure on line 2332 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(fatal) << "JSON parse error: " << rapidjson::GetParseErrorFunc(ok.Code()) << " (" << ok.Offset() << ")";
TString str = "";
for (int i = ok.Offset() - 30; i < static_cast<int>(ok.Offset()) + 50; i++) {
Expand All @@ -2340,7 +2340,7 @@
LOG(fatal) << "**** Parsing error is somewhere here: " << str.Data() << endl;
return;
}

Check failure on line 2343 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (rapidjson::Value::ConstMemberIterator it = document.MemberBegin(); it != document.MemberEnd(); it++) {

const char* histName = it->name.GetString();
Expand All @@ -2354,27 +2354,27 @@
TString histTypeStr = hist.FindMember("type")->value.GetString();
bool isTH2 = (histTypeStr.CompareTo("TH2") == 0);
bool isTH3 = (histTypeStr.CompareTo("TH3") == 0);
bool isTHn = (histTypeStr.CompareTo("THn") == 0);

Check failure on line 2357 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
bool isConstantBinning = true;
if (!(hist.HasMember("xmin") && hist.HasMember("xmax"))) {
isConstantBinning = false;
}

Check failure on line 2362 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
// create an array of strings to store the different histogram classes
std::vector<const char*> histClasses;
for (auto& v : hist.FindMember("histClass")->value.GetArray()) {
histClasses.push_back(v.GetString());
}

Check failure on line 2367 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
const char* title = hist.FindMember("title")->value.GetString();

if (isTHn) {
int nDimensions = hist.FindMember("nDimensions")->value.GetInt();
LOG(debug) << "nDimensions: " << nDimensions;

int* vars = new int[nDimensions];

Check failure on line 2374 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int iDim = 0;
for (auto& v : hist.FindMember("vars")->value.GetArray()) {
LOG(debug) << "iDim " << iDim << ": " << v.GetString();

Check failure on line 2377 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
vars[iDim++] = VarManager::fgVarNamesMap[v.GetString()];
}

Expand All @@ -2385,7 +2385,7 @@
if (isConstantBinning) {
nBins = new int[nDimensions];
xmin = new double[nDimensions];
xmax = new double[nDimensions];

Check failure on line 2388 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int iDim = 0;
for (auto& v : hist.FindMember("nBins")->value.GetArray()) {
nBins[iDim++] = v.GetInt();
Expand Down
Loading