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
12 changes: 4 additions & 8 deletions EventFiltering/Zorro.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 EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//

Check failure on line 11 in EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#include "Zorro.h"

Expand Down Expand Up @@ -185,15 +185,11 @@
mCCDB = ccdb;
mRunNumber = runNumber;
mBCtolerance = bcRange;
std::map<std::string, std::string> metadata;
metadata["runNumber"] = std::to_string(runNumber);
mRunDuration = mCCDB->getRunDuration(runNumber, true);
int64_t runTs = (mRunDuration.first / 2 + mRunDuration.second / 2);
auto ctp = ccdb->getForTimeStamp<std::vector<Long64_t>>("CTP/Calib/OrbitReset", runTs);
auto ctp = ccdb->getForRun<std::vector<Long64_t>>("CTP/Calib/OrbitReset", runNumber, false);

Check failure on line 188 in EventFiltering/Zorro.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
mOrbitResetTimestamp = (*ctp)[0];
mScalers = mCCDB->getSpecific<TH1D>(mBaseCCDBPath + "FilterCounters", runTs, metadata);
mSelections = mCCDB->getSpecific<TH1D>(mBaseCCDBPath + "SelectionCounters", runTs, metadata);
mInspectedTVX = mCCDB->getSpecific<TH1D>(mBaseCCDBPath + "InspectedTVX", runTs, metadata);
mScalers = mCCDB->getForRun<TH1D>(mBaseCCDBPath + "FilterCounters", runNumber, true);
mSelections = mCCDB->getForRun<TH1D>(mBaseCCDBPath + "SelectionCounters", runNumber, true);
mInspectedTVX = mCCDB->getForRun<TH1D>(mBaseCCDBPath + "InspectedTVX", runNumber, true);
setupHelpers(timestamp);
mLastBCglobalId = 0;
mLastSelectedIdx = 0;
Expand Down Expand Up @@ -235,8 +231,8 @@
mLastBCglobalId = bcGlobalId;
for (size_t i = mLastSelectedIdx; i < mBCranges.size(); i++) {
if (!mBCranges[i].isOutside(bcFrame)) {
for (int iMask{0}; iMask < 2; ++iMask) {

Check failure on line 234 in EventFiltering/Zorro.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.
for (int iTOI{0}; iTOI < 64; ++iTOI) {

Check failure on line 235 in EventFiltering/Zorro.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 (mZorroHelpers->at(i).selMask[iMask] & (1ull << iTOI)) {
mLastResult.set(iMask * 64 + iTOI, 1);
if (mAnalysedTriggers && !mAccountedBCranges[i]) {
Expand Down
Loading