Skip to content
Closed
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 @@ -583,7 +583,7 @@
signal = new MCSignal(name, "Electrons from open charmed hadron decays with b hadron in decay history", {prong}, {-1});
return signal;
}
if (!nameStr.compare("eFromPromptLM1")) {
if (!nameStr.compare("eFromPromptLM1")) {
MCProng prong(2, {11, 100}, {true, true}, {false, false}, {0, 0}, {0, 0}, {false, false}, false, {502, 402}, {true, true});
prong.SetSourceBit(0, MCProng::kPhysicalPrimary);
signal = new MCSignal(name, "electron from light mesons group1 without B/D in decay history", {prong}, {-1});
Expand Down Expand Up @@ -1908,7 +1908,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 1911 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 @@ -1983,13 +1983,13 @@
return false;
}
std::vector<uint32_t> nSourceBits;
for (auto& ii : prongJSON->FindMember("sourceBits")->value.GetArray()) {

Check warning on line 1986 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 1992 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 @@ -2002,7 +2002,7 @@
return false;
}
int iElem = 0;
for (auto& ii : prongJSON->FindMember("excludeSource")->value.GetArray()) {

Check warning on line 2005 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 @@ -2080,13 +2080,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 2083 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 2089 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 @@ -2094,7 +2094,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 2097 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 @@ -2107,9 +2107,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 2110 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 2112 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 @@ -2119,7 +2119,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 2122 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