Skip to content
Open
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
6 changes: 3 additions & 3 deletions Common/CCDB/macros/ctpRateF.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
if (runNumber == mRunNumber && mConfig != nullptr) {
return;
}
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
metadata["runNumber"] = std::to_string(runNumber);
mConfig = ccdb->getSpecific<o2::ctp::CTPConfiguration>("CTP/Config/Config", timeStamp, metadata);
if (mConfig == nullptr) {
Expand All @@ -64,7 +64,7 @@
if (runNumber == mRunNumber && mLHCIFdata != nullptr) {
return;
}
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
mLHCIFdata = ccdb->getSpecific<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", timeStamp, metadata);
if (mLHCIFdata == nullptr) {
LOG(fatal) << "GRPLHCIFData not in database, timestamp:" << timeStamp;
Expand All @@ -75,7 +75,7 @@
if (runNumber == mRunNumber && mScalers != nullptr) {
return;
}
std::map<string, string> metadata;
std::map<std::string, std::string> metadata;
metadata["runNumber"] = std::to_string(runNumber);
mScalers = ccdb->getSpecific<o2::ctp::CTPRunScalers>("CTP/Calib/Scalers", timeStamp, metadata);
if (mScalers == nullptr) {
Expand All @@ -89,7 +89,7 @@
getCTPscalers(ccdb, timeStamp, runNumber);
getLHCIFdata(ccdb, timeStamp, runNumber);
std::vector<o2::ctp::CTPScalerRecordO2> recs = mScalers->getScalerRecordO2();
if (recs[0].scalersInps.size() == 48) {

Check failure on line 92 in Common/CCDB/macros/ctpRateF.C

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);
} else {
LOG(error) << "Inputs not available";
Expand Down Expand Up @@ -120,7 +120,7 @@
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName)
{
if (sourceName.find("ZNC") != std::string::npos) {
if (runNumber < 544448) {

Check failure on line 123 in Common/CCDB/macros/ctpRateF.C

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 @@ -130,7 +130,7 @@
} else if (sourceName == "T0SC") {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
} else if (sourceName == "T0VTX") {
if (runNumber < 534202) {

Check failure on line 133 in Common/CCDB/macros/ctpRateF.C

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
30 changes: 15 additions & 15 deletions Common/CCDB/macros/upload_event_selection_params.C
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ void upload_event_selection_params()
n++;
period[n] = "lhc15f_isolated_bunches";
par[n] = new EventSelectionParams(0);
par[n]->DisableOutOfBunchPileupCuts();
par[n]->disableOutOfBunchPileupCuts();
runFirst[n] = 225000;
runLast[n] = 225719;

n++;
period[n] = "lhc15f_isolated_bunches2";
par[n] = new EventSelectionParams(0);
par[n]->DisableOutOfBunchPileupCuts();
par[n]->disableOutOfBunchPileupCuts();
runFirst[n] = 226062;
runLast[n] = 226500;

Expand All @@ -100,12 +100,12 @@ void upload_event_selection_params()
par[n] = new EventSelectionParams(0);
runFirst[n] = 225753;
runLast[n] = 225768;
par[n]->SetOnVsOfParams(-372.579114, 9.415265, -6.65857, 0.546801);
par[n]->setOnVsOfParams(-372.579114, 9.415265, -6.65857, 0.546801);

n++;
period[n] = "lhc15f_50ns_trains2_missing_V0C3";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-372.579114, 9.415265, -6.65857, 0.546801);
par[n]->setOnVsOfParams(-372.579114, 9.415265, -6.65857, 0.546801);
par[n]->fV0CasymA = 0;
par[n]->fV0CasymB = 0;
runFirst[n] = 226530;
Expand All @@ -114,42 +114,42 @@ void upload_event_selection_params()
n++;
period[n] = "lhc15h";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-245.12, 6.86754, -6.65857, 0.546801);
par[n]->setOnVsOfParams(-245.12, 6.86754, -6.65857, 0.546801);
runFirst[n] = 232914;
runLast[n] = 233859;

n++;
period[n] = "lhc15h_isolated_bunches";
par[n] = new EventSelectionParams(0);
par[n]->DisableOutOfBunchPileupCuts();
par[n]->disableOutOfBunchPileupCuts();
runFirst[n] = 233912;
runLast[n] = 234050;

n++;
period[n] = "lhc15i";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-223.155660, 7.117266, -6.218793, 0.543201);
par[n]->setOnVsOfParams(-223.155660, 7.117266, -6.218793, 0.543201);
runFirst[n] = 235196;
runLast[n] = 236866;

n++;
period[n] = "lhc15j";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-222.631866, 7.431432, -6.610850, 0.587165);
par[n]->setOnVsOfParams(-222.631866, 7.431432, -6.610850, 0.587165);
runFirst[n] = 236892;
runLast[n] = 238621;

n++;
period[n] = "lhc15l";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-198.639921, 7.454714, -5.018572, 0.585245);
par[n]->setOnVsOfParams(-198.639921, 7.454714, -5.018572, 0.585245);
runFirst[n] = 239188;
runLast[n] = 241544;

n++;
period[n] = "lhc15n";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-336.279729, 10.694535, -4.144493, 0.851104);
par[n]->setOnVsOfParams(-336.279729, 10.694535, -4.144493, 0.851104);
runFirst[n] = 244340;
runLast[n] = 244628;

Expand All @@ -176,7 +176,7 @@ void upload_event_selection_params()
n++;
period[n] = "lhc16do";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-65.42, 7.43, -5.62, 0.85);
par[n]->setOnVsOfParams(-65.42, 7.43, -5.62, 0.85);
runFirst[n] = 252235;
runLast[n] = 264035;

Expand All @@ -201,7 +201,7 @@ void upload_event_selection_params()
n++;
period[n] = "pp2017";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-70, 5.2, -3.0, 0.76);
par[n]->setOnVsOfParams(-70, 5.2, -3.0, 0.76);
runFirst[n] = 270531;
runLast[n] = 280140;

Expand All @@ -214,21 +214,21 @@ void upload_event_selection_params()
n++;
period[n] = "pp2017pqr";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-70, 5.2, -3.0, 0.76);
par[n]->setOnVsOfParams(-70, 5.2, -3.0, 0.76);
runFirst[n] = 282008;
runLast[n] = 282704;

n++;
period[n] = "lhc18b_isolated_bunches";
par[n] = new EventSelectionParams(0);
par[n]->DisableOutOfBunchPileupCuts();
par[n]->disableOutOfBunchPileupCuts();
runFirst[n] = 284706;
runLast[n] = 285015;

n++;
period[n] = "lhc18b_trains";
par[n] = new EventSelectionParams(0);
par[n]->SetOnVsOfParams(-65., 4.3, -5.62, 0.85);
par[n]->setOnVsOfParams(-65., 4.3, -5.62, 0.85);
runFirst[n] = 285064;
runLast[n] = 285203;

Expand Down
5 changes: 3 additions & 2 deletions Common/Core/macros/testMetadataHelper.C
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ std::map<std::string, bool> buildMapForCommitHash(const std::string& hash)
return results;
}

void populateCCDBWithCommitAvailability(std::map<string, bool> hasHashMap,
const std::string commitHash const std::string ccdbUrl = "http://ccdb-test.cern.ch:8080/")
void populateCCDBWithCommitAvailability(std::map<std::string, bool> hasHashMap,
const std::string commitHash,
const std::string ccdbUrl = "http://ccdb-test.cern.ch:8080/")
{
// First, init the CCDB manager to test if the ccdb is already populated
o2::ccdb::CcdbApi api;
Expand Down
Loading