From 9fe0d97f7c2c7ed395c2157bb8e2bd5588c4def3 Mon Sep 17 00:00:00 2001 From: iravasen Date: Wed, 4 Oct 2023 14:52:30 +0200 Subject: [PATCH] ITS DCS parser: added configurable url to retrieve RCT headers (#11978) * added configurable url to retrieve RCT headers * default ccdb to o2 ccdb internal --- .../ITS/workflow/include/ITSWorkflow/DCSParserSpec.h | 3 +++ Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSParserSpec.h b/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSParserSpec.h index 0f452dcd7e0d8..29cb5a660dab1 100644 --- a/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSParserSpec.h +++ b/Detectors/ITSMFT/ITS/workflow/include/ITSWorkflow/DCSParserSpec.h @@ -142,6 +142,9 @@ class ITSDCSParser : public Task // ITS Map o2::itsmft::ChipMappingITS mp; + + // CCDB url for RCT headers + std::string mCcdbUrlRct = "http://o2-ccdb.internal"; }; // Create a processor spec diff --git a/Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx b/Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx index 53618ae55851b..8cd631d0a719d 100644 --- a/Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx +++ b/Detectors/ITSMFT/ITS/workflow/src/DCSParserSpec.cxx @@ -36,6 +36,8 @@ void ITSDCSParser::init(InitContext& ic) this->mCcdbUrl = ic.options().get("ccdb-url"); + this->mCcdbUrlRct = ic.options().get("ccdb-url-rct"); + this->mVerboseOutput = ic.options().get("verbose"); return; @@ -469,7 +471,7 @@ void ITSDCSParser::pushToCCDB(ProcessingContext& pc) long tstart = 0, tend = 0; // retireve run start/stop times from CCDB o2::ccdb::CcdbApi api; - api.init("http://alice-ccdb.cern.ch"); + api.init(mCcdbUrlRct); // Initialize empty metadata object for search std::map metadata; std::map headers = api.retrieveHeaders( @@ -582,7 +584,9 @@ void ITSDCSParser::appendDeadChipObj() unsigned short int globchipID = getGlobalChipID(hicPos, hS, chipInMod); this->mDeadMap.maskFullChip(globchipID); - LOG(info) << "Masking dead chip " << globchipID; + if (mVerboseOutput) { + LOG(info) << "Masking dead chip " << globchipID; + } } } @@ -660,7 +664,8 @@ DataProcessorSpec getITSDCSParserSpec() AlgorithmSpec{adaptFromTask()}, Options{ {"verbose", VariantType::Bool, false, {"Use verbose output mode"}}, - {"ccdb-url", VariantType::String, "", {"CCDB url, default is empty (i.e. send output to CCDB populator workflow)"}}}}; + {"ccdb-url", VariantType::String, "", {"CCDB url, default is empty (i.e. send output to CCDB populator workflow)"}}, + {"ccdb-url-rct", VariantType::String, "", {"CCDB url from where to get RCT object for headers, default is o2-ccdb.internal. Use http://alice-ccdb.cern.ch for local tests"}}}}; } } // namespace its } // namespace o2