Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions PWGUD/Core/UDFSParser.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "Framework/Logger.h"
#include "UDFSParser.h"

#include "CommonConstants/LHCConstants.h"
#include "CommonDataFormat/BunchFilling.h"
#include "UDFSParser.h"
#include "Framework/Logger.h"

#include <vector>
#include <string>
#include <vector>

// -----------------------------------------------------------------------------
UDFSParser::UDFSParser(const char* filename)
Expand Down Expand Up @@ -55,7 +56,7 @@
if (inb1 || inb2) {
// 5 comma separated items
auto toks = tokenize(line);
if (toks.size() == 5) {

Check failure on line 59 in PWGUD/Core/UDFSParser.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.
if (!isNumber(toks[0])) {
continue;
}
Expand Down Expand Up @@ -103,7 +104,7 @@

// convert P2BCs to buckets
std::vector<int> buckets;
for (auto bcnum : P2BCs2use) {

Check failure on line 107 in PWGUD/Core/UDFSParser.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.
auto bucket = o2::constants::lhc::P2BC2LHCBunch(bcnum, o2::constants::lhc::BeamDirection(ibeam)) * 10;
LOGF(debug, "bcnum %d, bucket %d", bcnum, bucket);
buckets.push_back(bucket);
Expand All @@ -117,7 +118,7 @@
{
LOGF(info, "Number of colliding BCs: %d", fP2BCsBB.size());
LOGF(info, " P2BC, BucketA, BucketC");
for (auto bcnum : fP2BCsBB) {

Check failure on line 121 in PWGUD/Core/UDFSParser.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.
LOGF(info, " %d, %d, %d", bcnum,
o2::constants::lhc::P2BC2LHCBunch(bcnum, o2::constants::lhc::BeamDirection(0)),
o2::constants::lhc::P2BC2LHCBunch(bcnum, o2::constants::lhc::BeamDirection(1)));
Expand Down
10 changes: 6 additions & 4 deletions PWGUD/Core/UDGoodRunSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include <algorithm>
#include "PWGUD/Core/UDGoodRunSelector.h"

#include "Framework/Logger.h"

#include "rapidjson/document.h"
#include "rapidjson/filereadstream.h"
#include "PWGUD/Core/UDGoodRunSelector.h"

#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <string>
#include <vector>

class TFile;

Expand Down Expand Up @@ -137,7 +139,7 @@
}

// loop over all runPeriods
for (auto& item1 : item0.GetArray()) {

Check failure on line 142 in PWGUD/Core/UDGoodRunSelector.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 (!item1.IsObject()) {
LOGF(error, "Check the goodRuns file! %s must be objects!", itemName);
return false;
Expand All @@ -160,7 +162,7 @@
return false;
}
// update goodRuns and mrunMap
for (auto& item2 : item1[itemName].GetArray()) {

Check failure on line 165 in PWGUD/Core/UDGoodRunSelector.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.
runNumber = item2.GetInt();
if (runNumber < mrnMin) {
mrnMin = runNumber;
Expand Down
1 change: 1 addition & 0 deletions PWGUD/DataModel/UDIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
#define PWGUD_DATAMODEL_UDINDEX_H_

#include "UDTables.h"

#include "Framework/AnalysisDataModel.h"
namespace o2::aod
{
namespace udidx
{
DECLARE_SOA_ARRAY_INDEX_COLUMN(UDTrack, udtracks);

Check failure on line 29 in PWGUD/DataModel/UDIndex.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_ARRAY_INDEX_COLUMN(UDCollision, udcollisions);

Check failure on line 30 in PWGUD/DataModel/UDIndex.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} // namespace udidx
DECLARE_SOA_TABLE(UDMcParticlesToUDTracks, "AOD", "UDP2UDT", udidx::UDTrackIds);
DECLARE_SOA_TABLE(UDMcCollisionsToUDCollisions, "AOD", "UDMCC2UDC", udidx::UDCollisionIds);
Expand Down
Loading