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
2 changes: 1 addition & 1 deletion PWGDQ/Core/MCSignalLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@
return signal;
}

if (!nameStr.compare("eeKaonFromLambdaB")) {
if (!nameStr.compare("eeKaonFromLambdaB")) {
MCProng pronge(3, {11, 443, 5122}, {true, true, true}, {false, false, false}, {0, 0, 0}, {0, 0, 0}, {false, false, false});
MCProng prongKaon(2, {321, 5122}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false});
signal = new MCSignal(name, "Kaon and electron pair from lambda B", {pronge, pronge, prongKaon}, {2, 2, 1});
Expand Down Expand Up @@ -1698,7 +1698,7 @@
// Get the common ancestors array
std::vector<int8_t> commonAncestors;
if (signal.HasMember("commonAncestors")) {
for (auto& v : signal.FindMember("commonAncestors")->value.GetArray()) {

Check warning on line 1701 in PWGDQ/Core/MCSignalLibrary.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.
commonAncestors.push_back(v.GetInt());
LOG(debug) << "common ancestor " << v.GetInt();
}
Expand Down Expand Up @@ -1773,13 +1773,13 @@
return false;
}
std::vector<uint32_t> nSourceBits;
for (auto& ii : prongJSON->FindMember("sourceBits")->value.GetArray()) {

Check warning on line 1776 in PWGDQ/Core/MCSignalLibrary.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 (!ii.IsArray()) {
LOG(fatal) << "The sourceBits field should be an array of arrays of MCProng::Source";
return false;
}
nSourceBits.push_back(ii.GetArray().Size());
for (auto& iii : ii.GetArray()) {

Check warning on line 1782 in PWGDQ/Core/MCSignalLibrary.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 (MCProng::fgSourceNames.find(iii.GetString()) == MCProng::fgSourceNames.end()) {
LOG(fatal) << "Source " << iii.GetString() << " not implemented in MCProng";
return false;
Expand All @@ -1792,7 +1792,7 @@
return false;
}
int iElem = 0;
for (auto& ii : prongJSON->FindMember("excludeSource")->value.GetArray()) {

Check warning on line 1795 in PWGDQ/Core/MCSignalLibrary.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 (!ii.IsArray()) {
LOG(fatal) << "The excludeSource field should be an array of arrays of bool";
return false;
Expand Down Expand Up @@ -1870,13 +1870,13 @@
LOG(debug) << "n: " << n;
// Get the array of PDG codes
std::vector<int> pdgs;
for (auto& pdg : prongJSON->FindMember("pdgs")->value.GetArray()) {

Check warning on line 1873 in PWGDQ/Core/MCSignalLibrary.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.
pdgs.push_back(pdg.GetInt());
LOG(debug) << "pdgs: " << pdg.GetInt();
}
// get the array of booleans for check both charges option
std::vector<bool> checkBothCharges;
for (auto& ii : prongJSON->FindMember("checkBothCharges")->value.GetArray()) {

Check warning on line 1879 in PWGDQ/Core/MCSignalLibrary.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.
checkBothCharges.push_back(ii.GetBool());
LOG(debug) << "check both charges " << ii.GetBool();
}
Expand All @@ -1884,7 +1884,7 @@
// get the array of booleans for the excludePDG option, defaults to false
std::vector<bool> excludePDG;
if (prongJSON->HasMember("excludePDG")) {
for (auto& ii : prongJSON->FindMember("excludePDG")->value.GetArray()) {

Check warning on line 1887 in PWGDQ/Core/MCSignalLibrary.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.
excludePDG.push_back(ii.GetBool());
LOG(debug) << "exclude pdg " << ii.GetBool();
}
Expand All @@ -1897,9 +1897,9 @@
// get the source bits, and transform from string to int
std::vector<std::vector<int>> sourceBitsVec;
if (prongJSON->HasMember("sourceBits")) {
for (auto& ii : prongJSON->FindMember("sourceBits")->value.GetArray()) {

Check warning on line 1900 in PWGDQ/Core/MCSignalLibrary.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.
std::vector<int> sourceBits;
for (auto& iii : ii.GetArray()) {

Check warning on line 1902 in PWGDQ/Core/MCSignalLibrary.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.
sourceBits.push_back(MCProng::fgSourceNames[iii.GetString()]);
LOG(debug) << "source bit " << iii.GetString();
}
Expand All @@ -1909,7 +1909,7 @@
// prepare the exclusion source options if specified
std::vector<std::vector<bool>> excludeSourceVec;
if (prongJSON->HasMember("excludeSource")) {
for (auto& ii : prongJSON->FindMember("excludeSource")->value.GetArray()) {

Check warning on line 1912 in PWGDQ/Core/MCSignalLibrary.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.
std::vector<bool> excludeSource;
for (auto& iii : ii.GetArray()) {
excludeSource.push_back(iii.GetBool());
Expand Down
Loading