Skip to content
Open
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
3 changes: 2 additions & 1 deletion PWGDQ/Tasks/filterPPwithAssociation.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Use constant references for table subscriptions in process functions.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -29,6 +29,7 @@
#include <CCDB/BasicCCDBManager.h>
#include <DataFormatsParameters/GRPMagField.h>
#include <DetectorsBase/GeometryManager.h>
#include <DetectorsBase/MatLayerCylSet.h>
#include <DetectorsBase/Propagator.h>
#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
Expand All @@ -47,7 +48,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>

Check failure on line 51 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <map>
#include <memory>
#include <string>
Expand Down Expand Up @@ -128,7 +129,7 @@
void PrintBitMap(TMap map, int nbits)
{
for (int i = 0; i < nbits; i++) {
cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");

Check failure on line 132 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}

Expand Down Expand Up @@ -193,7 +194,7 @@
runEventSelection<gkEventFillMap>(collision);
}

void processDummy(MyEvents&)

Check failure on line 197 in PWGDQ/Tasks/filterPPwithAssociation.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 @@ -304,7 +305,7 @@
DefineHistograms(fHistMan, cutName.Data(), fConfigHistClassesMu.value); // define all histograms
}

VarManager::SetUseVars(fHistMan->GetUsedVars()); // provide the list of required variables so that VarManager knows what to fill
VarManager::SetUseVars(fHistMan->GetUsedVars()); // provide the list of required variables so that VarManager knows what to fill
fOutputList.setObject(fHistMan->GetMainHistogramList());
}

Expand Down Expand Up @@ -469,7 +470,7 @@
}
}

void processDummy(MyBarrelTracks&)

Check failure on line 473 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument MyBarrelTracks& is not const&.
{
// do nothing
}
Expand Down Expand Up @@ -537,7 +538,7 @@
for (int icut = 0; icut < fNBarrelCuts; ++icut) {
TString selStr = objArray->At(icut)->GetName();
std::unique_ptr<TObjArray> sel(selStr.Tokenize(":"));
if (sel->GetEntries() < 2 || sel->GetEntries() > 3) {

Check failure on line 541 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
// if "sel" contains 3 entries, it means the user provided both the track and pair cuts
Expand Down Expand Up @@ -719,7 +720,7 @@
uint32_t pairFilter = 0;
// count the number of barrel tracks fulfilling each cut
if constexpr (static_cast<bool>(TTrackFillMap)) {
for (auto trackAssoc : barrelAssocs) {

Check failure on line 723 in PWGDQ/Tasks/filterPPwithAssociation.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 (trackAssoc.isDQBarrelSelected() & (static_cast<uint32_t>(1) << i)) {
objCountersBarrel[i] += 1;
Expand Down Expand Up @@ -1083,7 +1084,7 @@
}
}

cout << "-------------------- In this TF, eventsFired / totalTriggered :: " << eventsFired << "/" << totalEventsTriggered << endl;

Check failure on line 1087 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

void processFilterMuonPP(MyEventsSelected const& collisions,
Expand Down Expand Up @@ -1202,11 +1203,11 @@
}
}

cout << "-------------------- In this TF, eventsFired / totalTriggered :: " << eventsFired << "/" << totalEventsTriggered << endl;

Check failure on line 1206 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

// TODO: dummy function for the case when no process function is enabled
void processDummy(MyEvents&)

Check failure on line 1210 in PWGDQ/Tasks/filterPPwithAssociation.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-process]

Argument MyEvents& is not const&.
{
// do nothing
}
Expand Down
Loading