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
2 changes: 1 addition & 1 deletion 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 @@ -76,7 +76,7 @@
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, 1).second);
} else {
LOG(error) << "Inputs not available";
Expand Down Expand Up @@ -109,7 +109,7 @@
delete mScalers;
delete mLHCIFdata;
}
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
mLHCIFdata = ccdb->getSpecific<parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", timeStamp, metadata);
if (mLHCIFdata == nullptr) {
LOG(fatal) << "GRPLHCIFData not in database, timestamp:" << timeStamp;
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/eventSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@
LOGP(warn, "Cross section for z={} + z={} @ {} GeV is not defined", beamZ1, beamZ2, sqrts);
}
// getting CTP config to extract lumi class indices (used for rate fetching and pileup correction)
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
metadata["runNumber"] = std::to_string(run);
auto config = ccdb->getSpecific<o2::ctp::CTPConfiguration>("CTP/Config/Config", ts, metadata);
auto classes = config->getCTPClasses();
Expand Down Expand Up @@ -1349,8 +1349,8 @@
double perBcRateTCE = static_cast<double>(mCounterTCE[i + 1] - mCounterTCE[i]) / nOrbits / nCollidingBCs;
double perBcRateZNC = static_cast<double>(mCounterZNC[i + 1] - mCounterZNC[i]) / nOrbits / nCollidingBCs;
double perBcRateZEM = static_cast<double>(mCounterZEM[i + 1] - mCounterZEM[i]) / nOrbits / nCollidingBCs;
double muTVX = (perBcRateTVX < 1 && perBcRateTVX > 1e-10) ? -std::log(1 - perBcRateTVX) : 0;

Check failure on line 1352 in Common/TableProducer/eventSelection.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.
double muTCE = (perBcRateTCE < 1 && perBcRateTCE > 1e-10) ? -std::log(1 - perBcRateTCE) : 0;

Check failure on line 1353 in Common/TableProducer/eventSelection.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.
double muZNC = (perBcRateZNC < 1 && perBcRateZNC > 1e-10) ? -std::log(1 - perBcRateZNC) : 0;
double muZEM = (perBcRateZEM < 1 && perBcRateZEM > 1e-10) ? -std::log(1 - perBcRateZEM) : 0;
LOGP(debug, "orbit={} muTVX={} muTCE={} muZNC={} muZEM={}", mOrbits[i], muTVX, muTCE, muZNC, muZEM);
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/qVectorsTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct qVectorsTable {
Produces<aod::QvectorBTotVecs> qVectorBTotVec;
/////////////////////////////////////////////////////////////////

std::unordered_map<string, bool> useDetector = {
std::unordered_map<std::string, bool> useDetector = {
{"QvectorBTots", cfgUseBTot},
{"QvectorBNegs", cfgUseBNeg},
{"QvectorBPoss", cfgUseBPos},
Expand Down
2 changes: 1 addition & 1 deletion Common/Tools/PID/handleParamTPCResponse.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool initOptionsAndParse(bpo::options_description& options, int argc, char* argv
"paramMultNormalization", bpo::value<float>()->default_value(11000.), "Multiplicity Normalization")(
"paramnClNormalization", bpo::value<float>()->default_value(152.), "Maximum nClusters for normalisation (159 for run 2, 152 for run 3)")(
"useDefaultParam", bpo::value<bool>()->default_value(true), "Use default sigma parametrisation")(
"mode", bpo::value<string>()->default_value(""), "Running mode ('read' from file, 'write' to file, 'pull' from CCDB, 'push' to CCDB)")(
"mode", bpo::value<std::string>()->default_value(""), "Running mode ('read' from file, 'write' to file, 'pull' from CCDB, 'push' to CCDB)")(
"help,h", "Produce help message.");
setStandardOpt(options);
try {
Expand Down
2 changes: 1 addition & 1 deletion DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ struct DetectorOccupancyQaTask {
int nCollInTimeWindowSelIfTOF = 0;
double multFT0CmainCollision = 0.f;
double multFT0CInTimeWindow = 0.f;
map<int64_t, int32_t> mUniqueBC;
std::map<int64_t, int32_t> mUniqueBC;

bool sel = col.selection_bit(kIsTriggerTVX);

Expand Down
4 changes: 2 additions & 2 deletions EventFiltering/PWGCF/CFFilterQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ struct CFFilterQA {

std::vector<double> setValuesBB(aod::BCsWithTimestamps::iterator const& bunchCrossing, const std::string ccdbPath)
{
map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto h = ccdbApi.retrieveFromTFileAny<TH1F>(ccdbPath, metadata, bunchCrossing.timestamp());
// auto h = ccdb->getForTimeStamp<TH1F>(ccdbPath, bunchCrossing.timestamp()); //check if possible to use this without getting fatal
if (!h) {
Expand All @@ -1055,7 +1055,7 @@ struct CFFilterQA {

std::vector<double> setValuesAvg(aod::BCsWithTimestamps::iterator const& bunchCrossing, const std::string ccdbPath)
{
map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto h = ccdbApi.retrieveFromTFileAny<TH1F>(ccdbPath, metadata, bunchCrossing.timestamp());
// auto h = ccdb->getForTimeStamp<TH1F>(ccdbPath, bunchCrossing.timestamp()); //check if possible to use this without getting fatal
if (!h) {
Expand Down
2 changes: 1 addition & 1 deletion EventFiltering/PWGLF/filterf1proton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ struct filterf1proton {

std::vector<double> setValuesBB(o2::ccdb::CcdbApi& ccdbApi, aod::BCsWithTimestamps::iterator const& bunchCrossing, const std::string ccdbPath)
{
map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto h = ccdbApi.retrieveFromTFileAny<TH1F>(ccdbPath, metadata, bunchCrossing.timestamp());
// auto h = ccdb->getForTimeStamp<TH1F>(ccdbPath, bunchCrossing.timestamp()); // check if possible to use this without getting fatal
if (!h) {
Expand Down
8 changes: 4 additions & 4 deletions PWGDQ/TableProducer/tableMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ struct TableMaker {

struct : ConfigurableGroup {
Configurable<bool> fConfigRunZorro{"cfgRunZorro", false, "Enable event selection with zorro"};
Configurable<string> fConfigZorroTrigMask{"cfgZorroTriggerMask", "fDiMuon", "DQ Trigger masks: fSingleE,fLMeeIMR,fLMeeHMR,fDiElectron,fSingleMuLow,fSingleMuHigh,fDiMuon"};
Configurable<std::string> fConfigZorroTrigMask{"cfgZorroTriggerMask", "fDiMuon", "DQ Trigger masks: fSingleE,fLMeeIMR,fLMeeHMR,fDiElectron,fSingleMuLow,fSingleMuHigh,fDiMuon"};
Configurable<bool> fConfigRunZorroSel{"cfgRunZorroSel", false, "Select events with trigger mask"};
Configurable<uint64_t> fBcTolerance{"cfgBcTolerance", 100, "Number of BCs of margin for software triggers"};
} useZorro;

struct : ConfigurableGroup {
Configurable<string> fConfigCcdbUrl{"useCCDBConfigurations.ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<string> fConfigCcdbPathTPC{"useCCDBConfigurations.ccdb-path-tpc", "Users/z/zhxiong/TPCPID/PostCalib", "base path to the ccdb object"};
Configurable<string> fConfigCcdbPathZorro{"useCCDBConfigurations.ccdb-path-zorro", "/Users/m/mpuccio/EventFiltering/OTS/", "base path to the ccdb object for zorro"};
Configurable<std::string> fConfigCcdbUrl{"useCCDBConfigurations.ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<std::string> fConfigCcdbPathTPC{"useCCDBConfigurations.ccdb-path-tpc", "Users/z/zhxiong/TPCPID/PostCalib", "base path to the ccdb object"};
Configurable<std::string> fConfigCcdbPathZorro{"useCCDBConfigurations.ccdb-path-zorro", "/Users/m/mpuccio/EventFiltering/OTS/", "base path to the ccdb object for zorro"};
} useCCDBConfigurations;

Configurable<int64_t> fConfigNoLaterThan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ struct TableMakerMC {
VarManager::SetupMuonMagField();
}
}
std::map<string, string> metadataRCT, header;
std::map<std::string, std::string> metadataRCT, header;
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1);
uint64_t sor = std::atol(header["SOR"].c_str());
uint64_t eor = std::atol(header["EOR"].c_str());
Expand Down
8 changes: 4 additions & 4 deletions PWGDQ/TableProducer/tableMaker_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ struct TableMaker {

// CCDB connection configurables
struct : ConfigurableGroup {
Configurable<string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<string> fConfigCcdbPathTPC{"ccdb-path-tpc", "Users/z/zhxiong/TPCPID/PostCalib", "base path to the ccdb object"};
Configurable<string> fConfigCcdbPathZorro{"ccdb-path-zorro", "/Users/m/mpuccio/EventFiltering/OTS/Chunked/", "base path to the ccdb object for zorro"};
Configurable<std::string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<std::string> fConfigCcdbPathTPC{"ccdb-path-tpc", "Users/z/zhxiong/TPCPID/PostCalib", "base path to the ccdb object"};
Configurable<std::string> fConfigCcdbPathZorro{"ccdb-path-zorro", "/Users/m/mpuccio/EventFiltering/OTS/Chunked/", "base path to the ccdb object for zorro"};
Configurable<int64_t> fConfigNoLaterThan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
Configurable<std::string> fConfigGeoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
Configurable<std::string> fConfigGrpMagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Expand Down Expand Up @@ -1317,7 +1317,7 @@ struct TableMaker {
VarManager::SetupMuonMagField();
}
}
std::map<string, string> metadataRCT, header;
std::map<std::string, std::string> metadataRCT, header;
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", bcs.begin().runNumber()), metadataRCT, -1);
uint64_t sor = std::atol(header["SOR"].c_str());
uint64_t eor = std::atol(header["EOR"].c_str());
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/Tasks/muonDCA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct muonExtrap {
Produces<ReducedMuonsDca> dcaTable;
Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
Configurable<string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<std::string> fConfigCcdbUrl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Service<o2::ccdb::BasicCCDBManager> fCCDB;
o2::parameters::GRPMagField* grpmag = nullptr; // for run 3, we access GRPMagField from GLO/Config/GRPMagField
Expand Down
4 changes: 2 additions & 2 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ struct AnalysisEventSelection {
void runEventSelection(TEvents const& events)
{
if (events.size() > 0 && events.begin().runNumber() != fCurrentRun) {
std::map<string, string> metadataRCT, header;
std::map<std::string, std::string> metadataRCT, header;
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", events.begin().runNumber()), metadataRCT, -1);
uint64_t sor = std::atol(header["SOR"].c_str());
uint64_t eor = std::atol(header["EOR"].c_str());
Expand Down Expand Up @@ -641,7 +641,7 @@ struct AnalysisTrackSelection {
LOGF(fatal, "GRP object is not available in CCDB at timestamp=%llu", events.begin().timestamp());
}

std::map<string, string> metadataRCT, header;
std::map<std::string, std::string> metadataRCT, header;
header = fCCDBApi.retrieveHeaders(Form("RCT/Info/RunInformation/%i", events.begin().runNumber()), metadataRCT, -1);
uint64_t sor = std::atol(header["SOR"].c_str());
uint64_t eor = std::atol(header["EOR"].c_str());
Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct skimmerPrimaryMuon {
}
mRunNumber = bc.runNumber();

std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, mRunNumber);
auto ts = soreor.first;
auto grpmag = ccdbApi.retrieveFromTFileAny<o2::parameters::GRPMagField>(grpmagPath, metadata, ts);
Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/Tasks/matchingMFT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct matchingMFT {
}
mRunNumber = bc.runNumber();
LOGF(info, "mRunNumber = %d", mRunNumber);
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdbApi, mRunNumber);
auto ts = soreor.first;
auto grpmag = ccdbApi.retrieveFromTFileAny<o2::parameters::GRPMagField>(grpmagPath, metadata, ts);
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Resonances/f1protonreducedtable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ struct f1protonreducedtable {

std::vector<double> setValuesBB(o2::ccdb::CcdbApi& ccdbApi, aod::BCsWithTimestamps::iterator const& bunchCrossing, const std::string ccdbPath)
{
map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto h = ccdbApi.retrieveFromTFileAny<TH1F>(ccdbPath, metadata, bunchCrossing.timestamp());
// auto h = ccdb->getForTimeStamp<TH1F>(ccdbPath, bunchCrossing.timestamp()); // check if possible to use this without getting fatal
if (!h) {
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/TableProducer/Resonances/filterf1proton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ struct filterf1proton {

std::vector<double> setValuesBB(o2::ccdb::CcdbApi& ccdbApi, aod::BCsWithTimestamps::iterator const& bunchCrossing, const std::string ccdbPath)
{
map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto h = ccdbApi.retrieveFromTFileAny<TH1F>(ccdbPath, metadata, bunchCrossing.timestamp());
// auto h = ccdb->getForTimeStamp<TH1F>(ccdbPath, bunchCrossing.timestamp()); // check if possible to use this without getting fatal
if (!h) {
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct HStrangeCorrelation {
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};

// event filtering
Configurable<string> zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"};
Configurable<std::string> zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"};

Zorro zorro;
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
Expand Down
2 changes: 1 addition & 1 deletion PWGUD/TableProducer/fwdTrackPropagation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct FwdTrackPropagation {

if (run != fRun) {
fRun = run;
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
auto soreor = o2::ccdb::BasicCCDBManager::getRunDuration(fCCDBApi, run);
auto ts = soreor.first;
auto grpmag = fCCDBApi.retrieveFromTFileAny<o2::parameters::GRPMagField>("GLO/Config/GRPMagField", metadata, ts);
Expand Down
Loading