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
1 change: 0 additions & 1 deletion PWGDQ/Tasks/filterPP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no
//
#include <iostream>

Check warning on line 14 in PWGDQ/Tasks/filterPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Including iostream is discouraged. Use O2 logging instead.
#include <vector>
#include <map>
#include <string>
Expand Down Expand Up @@ -163,7 +163,7 @@
runEventSelection<gkEventFillMap>(collision, bcs);
}

void processDummy(MyEvents&)

Check warning on line 166 in PWGDQ/Tasks/filterPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument MyEvents& is not const&.
{
// do nothing
}
Expand Down Expand Up @@ -214,7 +214,7 @@
fHistMan->SetDefaultVarNames(VarManager::fgVariableNames, VarManager::fgVariableUnits);

TString cutNames = "TrackBarrel_BeforeCuts;";
for (auto& cut : fTrackCuts) {

Check warning on line 217 in PWGDQ/Tasks/filterPP.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.
cutNames += Form("TrackBarrel_%s;", cut.GetName());
fCutHistNames.push_back(Form("TrackBarrel_%s", cut.GetName()));
}
Expand Down Expand Up @@ -254,7 +254,7 @@
trackSel.reserve(tracksBarrel.size());

VarManager::ResetValues(0, VarManager::kNBarrelTrackVariables);
for (auto& track : tracksBarrel) {

Check warning on line 257 in PWGDQ/Tasks/filterPP.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.
filterMap = static_cast<uint32_t>(0);
if (!track.has_collision()) {
trackSel(static_cast<uint32_t>(0));
Expand Down Expand Up @@ -340,7 +340,7 @@
VarManager::ResetValues(0, VarManager::kNMuonTrackVariables);
// fill event information which might be needed in histograms or cuts that combine track and event properties

for (auto& muon : muons) {

Check warning on line 343 in PWGDQ/Tasks/filterPP.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.
filterMap = static_cast<uint32_t>(0);
if (!muon.has_collision()) {
trackSel(static_cast<uint32_t>(0));
Expand Down Expand Up @@ -516,7 +516,7 @@

std::vector<int> objCountersBarrel(fNBarrelCuts, 0); // init all counters to zero
// count the number of barrel tracks fulfilling each cut
for (auto track : tracksBarrel) {

Check warning on line 519 in PWGDQ/Tasks/filterPP.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 (int i = 0; i < fNBarrelCuts; ++i) {
if (track.isDQBarrelSelected() & (static_cast<uint32_t>(1) << i)) {
objCountersBarrel[i] += 1;
Expand Down Expand Up @@ -549,7 +549,7 @@
// run pairing if there is at least one selection that requires it
uint32_t pairFilter = 0;
if (pairingMask > 0) {
for (auto& [t1, t2] : combinations(tracksBarrel, tracksBarrel)) {

Check warning on line 552 in PWGDQ/Tasks/filterPP.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.
// check the pairing mask and that the tracks share a cut bit
pairFilter = pairingMask & t1.isDQBarrelSelected() & t2.isDQBarrelSelected();
if (pairFilter == 0) {
Expand Down Expand Up @@ -580,7 +580,7 @@

std::vector<int> objCountersMuon(fNMuonCuts, 0); // init all counters to zero
// count the number of muon tracks fulfilling each selection
for (auto muon : muons) {

Check warning on line 583 in PWGDQ/Tasks/filterPP.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 (int i = 0; i < fNMuonCuts; ++i) {
if (muon.isDQMuonSelected() & (static_cast<uint32_t>(1) << i)) {
objCountersMuon[i] += 1;
Expand Down Expand Up @@ -613,7 +613,7 @@
// run pairing if there is at least one selection that requires it
pairFilter = 0;
if (pairingMask > 0) {
for (auto& [t1, t2] : combinations(muons, muons)) {

Check warning on line 616 in PWGDQ/Tasks/filterPP.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.
// check the pairing mask and that the tracks share a cut bit
pairFilter = pairingMask & t1.isDQMuonSelected() & t2.isDQMuonSelected();
if (pairFilter == 0) {
Expand Down Expand Up @@ -702,7 +702,7 @@
// Define here the histograms for all the classes required in analysis.
//
std::unique_ptr<TObjArray> objArray(histClasses.Tokenize(";"));
for (Int_t iclass = 0; iclass < objArray->GetEntries(); ++iclass) {

Check warning on line 705 in PWGDQ/Tasks/filterPP.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root-entity]

Consider replacing ROOT entities with equivalents from standard C++ or from O2.
TString classStr = objArray->At(iclass)->GetName();
histMan->AddHistClass(classStr.Data());

Expand All @@ -728,4 +728,3 @@
}
}
}

Loading