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
4 changes: 2 additions & 2 deletions Common/CCDB/ctpRateFetcher.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 Common/CCDB/ctpRateFetcher.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 Common/CCDB/ctpRateFetcher.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 Common/CCDB/ctpRateFetcher.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 Common/CCDB/ctpRateFetcher.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 Common/CCDB/ctpRateFetcher.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include "ctpRateFetcher.h"

#include <map>
Expand All @@ -26,7 +26,7 @@
{
setupRun(runNumber, ccdb, timeStamp);
if (sourceName.find("ZNC") != std::string::npos) {
if (runNumber < 544448) {

Check failure on line 29 in Common/CCDB/ctpRateFetcher.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.
return fetchCTPratesInputs(ccdb, timeStamp, runNumber, 25) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
} else {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "C1ZNC-B-NOPF-CRU", 6) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
Expand All @@ -36,7 +36,7 @@
} else if (sourceName == "T0SC") {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
} else if (sourceName == "T0VTX") {
if (runNumber < 534202) {

Check failure on line 39 in Common/CCDB/ctpRateFetcher.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.
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0", 3); // 2022
} else {
double_t ret = fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF");
Expand Down Expand Up @@ -69,15 +69,15 @@
LOG(warn) << "Trigger class " << className << " not found in CTPConfiguration";
return -1.;
}
auto rate{mScalers->getRateGivenT(timeStamp * 1.e-3, classIndex, inputType)};
auto rate{mScalers->getRateGivenT(timeStamp * 1.e-3, classIndex, inputType, 1)};
return pileUpCorrection(rate.second);
}

double ctpRateFetcher::fetchCTPratesInputs(o2::ccdb::BasicCCDBManager* /*ccdb*/, uint64_t timeStamp, int /*runNumber*/, int input)
{
std::vector<ctp::CTPScalerRecordO2> recs = mScalers->getScalerRecordO2();
if (recs[0].scalersInps.size() == 48) {

Check failure on line 79 in Common/CCDB/ctpRateFetcher.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.
return pileUpCorrection(mScalers->getRateGivenT(timeStamp * 1.e-3, input, 7).second);
return pileUpCorrection(mScalers->getRateGivenT(timeStamp * 1.e-3, input, 7, 1).second);
} else {
LOG(error) << "Inputs not available";
return -1.;
Expand Down
Loading