From e8af170857862387efa4c86ab6b3180a4f51cfc5 Mon Sep 17 00:00:00 2001 From: shahoian Date: Wed, 1 Dec 2021 23:35:04 +0100 Subject: [PATCH 1/2] Add NameConf::mCCDBServer and NameConf::getCCDBServer() --- .../Common/include/DetectorsCommonDataFormats/NameConf.h | 4 ++++ DataFormats/Detectors/Common/src/NameConf.cxx | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/NameConf.h b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/NameConf.h index 18a50004d2e88..99653cf9d7f8e 100644 --- a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/NameConf.h +++ b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/NameConf.h @@ -125,6 +125,9 @@ class NameConf : public o2::conf::ConfigurableParamHelper return o2::utils::Str::concat_string(d.getName(), "/", ALIGNPATH); } + // Default CCDB server + static std::string getCCDBServer(); + private: // helper method to build filenames static std::string buildFileName(const std::string_view prefix, const std::string_view delimiter, const std::string_view defPrefix, const std::string_view defName, @@ -161,6 +164,7 @@ class NameConf : public o2::conf::ConfigurableParamHelper std::string mDirMatLUT = "none"; // directory for material LUT std::string mDirCollContext = "none"; // directory for collision context std::string mDirTFIDINFO = "none"; // directory for TFIDInfo vector + std::string mCCDBServer = "http://alice-ccdb.cern.ch/"; // default CCDB server O2ParamDef(NameConf, "NameConf"); }; diff --git a/DataFormats/Detectors/Common/src/NameConf.cxx b/DataFormats/Detectors/Common/src/NameConf.cxx index f1ef5a8886853..2cda2b0fe8001 100644 --- a/DataFormats/Detectors/Common/src/NameConf.cxx +++ b/DataFormats/Detectors/Common/src/NameConf.cxx @@ -112,3 +112,9 @@ std::string NameConf::getTFIDInfoFileName(const std::string_view prefix) { return buildFileName(prefix, "_", "o2", TFIDINFO, ROOT_EXT_STRING, Instance().mDirTFIDINFO); } + +// Default CCDB server +std::string NameConf::getCCDBServer() +{ + return Instance().mCCDBServer; +} From 97fe6bbc774d7ecdde6046c31c2aba41356003ca Mon Sep 17 00:00:00 2001 From: shahoian Date: Wed, 1 Dec 2021 23:35:36 +0100 Subject: [PATCH 2/2] Set CCDB server defaults via NameConf::getCCDBServer() --- Common/SimConfig/include/SimConfig/DigiParams.h | 3 ++- .../Detectors/FIT/FDD/include/DataFormatsFDD/LookUpTable.h | 4 ++-- .../Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h | 6 +++--- .../Detectors/FIT/FV0/include/DataFormatsFV0/LookUpTable.h | 4 ++-- Detectors/AOD/src/AODProducerWorkflowSpec.cxx | 6 +++--- Detectors/Base/include/DetectorsBase/Aligner.h | 2 -- Detectors/Base/src/Aligner.cxx | 6 +++--- Detectors/CPV/base/include/CPVBase/CPVSimParams.h | 3 ++- Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h | 3 ++- Detectors/CPV/simulation/src/RawCreator.cxx | 5 +---- Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx | 3 ++- Detectors/CTP/simulation/include/CTPSimulation/Digitizer.h | 3 ++- Detectors/DCS/testWorkflow/src/dcs-proxy.cxx | 4 +++- .../calibration/testWorkflow/EMCALChannelCalibratorSpec.h | 3 ++- .../include/EMCALWorkflow/EMCALDCSDataProcessorSpec.h | 3 ++- Detectors/FIT/FT0/calibration/testWorkflow/slew_upload.cxx | 6 ++++-- .../FT0/workflow/include/FT0Workflow/ReconstructionSpec.h | 3 ++- Detectors/FIT/FT0/workflow/src/ft0-reco-workflow.cxx | 4 ++-- .../macros/makeChannelTimeOffsetFV0CalibObjectInCCDB.C | 2 +- .../macros/readChannelTimeOffsetFV0CalibObjectFromCCDB.C | 2 +- .../FV0/workflow/include/FV0Workflow/ReconstructionSpec.h | 4 ++-- Detectors/FIT/FV0/workflow/src/ReconstructionSpec.cxx | 1 - Detectors/FIT/FV0/workflow/src/fv0-reco-workflow.cxx | 5 ++--- Detectors/FIT/macros/CMakeLists.txt | 2 +- Detectors/FIT/macros/uploadLookUpTable.C | 2 +- .../tofworkflow/src/tof-reco-workflow.cxx | 5 ++--- Detectors/HMPID/workflow/src/PedestalsCalculationSpec.cxx | 3 ++- Detectors/MUON/MCH/Calibration/src/PedestalCalibSpec.h | 3 ++- .../calib/include/PHOSCalibWorkflow/PHOSEnergyCalibDevice.h | 2 +- .../include/PHOSCalibWorkflow/PHOSHGLGRatioCalibDevice.h | 2 +- .../include/PHOSCalibWorkflow/PHOSPedestalCalibDevice.h | 2 +- .../include/PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h | 2 +- .../include/PHOSCalibWorkflow/PHOSRunbyrunCalibrator.h | 4 ++-- .../calib/include/PHOSCalibWorkflow/PHOSTurnonCalibDevice.h | 2 +- .../calib/include/PHOSCalibWorkflow/PHOSTurnonCalibrator.h | 4 ++-- Detectors/PHOS/calib/src/phos-calib-workflow.cxx | 4 ++-- Detectors/PHOS/simulation/src/RawWriter.cxx | 3 ++- Detectors/PHOS/workflow/src/CellConverterSpec.cxx | 3 ++- Detectors/TOF/calibration/include/TOFCalibration/CalibTOF.h | 2 +- .../calibration/include/TOFCalibration/LHCClockCalibrator.h | 3 ++- .../TOF/calibration/testWorkflow/TOFChannelCalibratorSpec.h | 3 ++- .../workflow/include/TOFWorkflowUtils/TOFClusterizerSpec.h | 2 +- .../TPC/calibration/include/TPCCalibration/IDCCCDBHelper.h | 3 ++- .../TPC/workflow/include/TPCWorkflow/TPCFactorizeIDCSpec.h | 3 ++- .../include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h | 3 ++- Detectors/TRD/calibration/src/CalibratorVdExB.cxx | 3 ++- Detectors/ZDC/simulation/src/digi2raw.cxx | 3 +-- Detectors/ZDC/workflow/include/ZDCWorkflow/DigitRecoSpec.h | 3 ++- .../ZDC/workflow/include/ZDCWorkflow/ZDCDataReaderDPLSpec.h | 3 ++- Detectors/ZDC/workflow/src/DigitRecoSpec.cxx | 4 ++-- Detectors/ZDC/workflow/src/ZDCDataReaderDPLSpec.cxx | 3 ++- Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx | 3 +-- 52 files changed, 92 insertions(+), 77 deletions(-) diff --git a/Common/SimConfig/include/SimConfig/DigiParams.h b/Common/SimConfig/include/SimConfig/DigiParams.h index 5602e88012cab..12cee43b811ed 100644 --- a/Common/SimConfig/include/SimConfig/DigiParams.h +++ b/Common/SimConfig/include/SimConfig/DigiParams.h @@ -16,6 +16,7 @@ #include "CommonUtils/ConfigurableParam.h" #include "CommonUtils/ConfigurableParamHelper.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include namespace o2 @@ -26,7 +27,7 @@ namespace conf // Global parameters for digitization struct DigiParams : public o2::conf::ConfigurableParamHelper { - std::string ccdb = "http://ccdb-test.cern.ch:8080"; // URL for CCDB acces + std::string ccdb = o2::base::NameConf::getCCDBServer(); std::string digitizationgeometry = ""; // with with geometry file to digitize -> leave empty as this needs to be filled by the digitizer workflow std::string grpfile = ""; // which GRP file to use --> leave empty as this needs to be filled by the digitizer workflow bool mctruth = true; // whether to create labels diff --git a/DataFormats/Detectors/FIT/FDD/include/DataFormatsFDD/LookUpTable.h b/DataFormats/Detectors/FIT/FDD/include/DataFormatsFDD/LookUpTable.h index b9275a8fba398..39aa6cfb07e74 100644 --- a/DataFormats/Detectors/FIT/FDD/include/DataFormatsFDD/LookUpTable.h +++ b/DataFormats/Detectors/FIT/FDD/include/DataFormatsFDD/LookUpTable.h @@ -27,6 +27,7 @@ #include // std::setfill, std::setw - for stream formating #include #include "FDDBase/Constants.h" +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -214,9 +215,8 @@ class SingleLUT : public LUT public: static constexpr char sDetectorName[] = "FDD"; - static constexpr char sDefaultCCDBpath[] = "http://ccdb-test.cern.ch:8080/"; static constexpr char sDefaultLUTpath[] = "FDD/LookUpTable"; - inline static std::string sCurrentCCDBpath = sDefaultCCDBpath; + inline static std::string sCurrentCCDBpath = o2::base::NameConf::getCCDBServer(); inline static std::string sCurrentLUTpath = sDefaultLUTpath; //Before instance() call, setup url and path static void setCCDBurl(const std::string& url) { sCurrentCCDBpath = url; } diff --git a/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h index 26bfa36cbd45b..c80e9cdf4b0ac 100644 --- a/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h +++ b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/LookUpTable.h @@ -23,6 +23,7 @@ #include "CCDB/BasicCCDBManager.h" #include "FT0Base/Constants.h" #include "DataFormatsFIT/LookUpTable.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include #include #include @@ -214,7 +215,7 @@ class LookUpTable std::vector lut_data; auto& mgr = o2::ccdb::BasicCCDBManager::instance(); - mgr.setURL("http://ccdb-test.cern.ch:8080"); + mgr.setURL(o2::base::NameConf::getCCDBServer()); auto hvch = mgr.get>("FT0/LookUpTable"); size_t max = 0; for (auto const& chan : *hvch) { @@ -371,9 +372,8 @@ class SingleLUT : public LUT public: static constexpr char sDetectorName[] = "FT0"; - static constexpr char sDefaultCCDBpath[] = "http://ccdb-test.cern.ch:8080/"; static constexpr char sDefaultLUTpath[] = "FT0/LookUpTableNew"; - inline static std::string sCurrentCCDBpath = sDefaultCCDBpath; + inline static std::string sCurrentCCDBpath = o2::base::NameConf::getCCDBServer(); inline static std::string sCurrentLUTpath = sDefaultLUTpath; //Before instance() call, setup url and path static void setCCDBurl(const std::string& url) { sCurrentCCDBpath = url; } diff --git a/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/LookUpTable.h b/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/LookUpTable.h index c601e7e54bcc3..141b7d7828e43 100644 --- a/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/LookUpTable.h +++ b/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/LookUpTable.h @@ -27,6 +27,7 @@ #include // std::setfill, std::setw - for stream formating #include #include "FV0Base/Constants.h" +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -210,9 +211,8 @@ class SingleLUT : public LUT public: static constexpr char sDetectorName[] = "FV0"; - static constexpr char sDefaultCCDBpath[] = "http://ccdb-test.cern.ch:8080/"; static constexpr char sDefaultLUTpath[] = "FV0/LookUpTable"; - inline static std::string sCurrentCCDBpath = sDefaultCCDBpath; + inline static std::string sCurrentCCDBpath = o2::base::NameConf::getCCDBServer(); inline static std::string sCurrentLUTpath = sDefaultLUTpath; //Before instance() call, setup url and path static void setCCDBurl(const std::string& url) { sCurrentCCDBpath = url; } diff --git a/Detectors/AOD/src/AODProducerWorkflowSpec.cxx b/Detectors/AOD/src/AODProducerWorkflowSpec.cxx index cad33d4f4dadc..cc1742a3b883a 100644 --- a/Detectors/AOD/src/AODProducerWorkflowSpec.cxx +++ b/Detectors/AOD/src/AODProducerWorkflowSpec.cxx @@ -21,6 +21,7 @@ #include "DataFormatsMCH/TrackMCH.h" #include "DataFormatsMFT/TrackMFT.h" #include "DataFormatsTPC/TrackTPC.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include "DetectorsBase/GeometryManager.h" #include "CCDB/BasicCCDBManager.h" #include "CommonConstants/PhysicsConstants.h" @@ -137,10 +138,9 @@ uint64_t AODProducerWorkflowDPL::getTFNumber(const o2::InteractionRecord& tfStar o2::ccdb::CcdbApi ccdb_api; const std::string rct_path = "RCT/RunInformation/"; const std::string start_orbit_path = "Trigger/StartOrbit"; - const std::string url = "http://ccdb-test.cern.ch:8080"; - mgr.setURL(url); - ccdb_api.init(url); + mgr.setURL(o2::base::NameConf::getCCDBServer()); + ccdb_api.init(o2::base::NameConf::getCCDBServer()); std::map* mapStartOrbit = mgr.get>(start_orbit_path); int64_t ts = 0; diff --git a/Detectors/Base/include/DetectorsBase/Aligner.h b/Detectors/Base/include/DetectorsBase/Aligner.h index 76ea1bb2bde77..0b378dcfa33cb 100644 --- a/Detectors/Base/include/DetectorsBase/Aligner.h +++ b/Detectors/Base/include/DetectorsBase/Aligner.h @@ -28,7 +28,6 @@ namespace base class Aligner : public o2::conf::ConfigurableParamHelper { public: - const std::string& getCCDB() const { return mCCDB; } const std::string& getDetectors() const { return mDetectors; } long getTimeStamp() const; o2::detectors::DetID::mask_t getDetectorsMask() const; @@ -37,7 +36,6 @@ class Aligner : public o2::conf::ConfigurableParamHelper void applyAlignment(long timestamp = 0, o2::detectors::DetID::mask_t addMask = o2::detectors::DetID::FullMask) const; private: - std::string mCCDB = "http://ccdb-test.cern.ch:8080"; // URL for CCDB acces std::string mDetectors = "all"; // comma-separated list of modules to align, "all" or "none" long mTimeStamp = 0; // assigned TimeStamp or now() if 0 diff --git a/Detectors/Base/src/Aligner.cxx b/Detectors/Base/src/Aligner.cxx index 15e0a6f1af640..8838321b5fefc 100644 --- a/Detectors/Base/src/Aligner.cxx +++ b/Detectors/Base/src/Aligner.cxx @@ -44,7 +44,7 @@ void Aligner::applyAlignment(long timestamp, DetID::mask_t addMask) const if (timestamp == 0) { timestamp = getTimeStamp(); } - ccdbmgr.setURL(getCCDB()); + ccdbmgr.setURL(o2::base::NameConf::getCCDBServer()); ccdbmgr.setTimestamp(timestamp); DetID::mask_t done, skipped; DetID::mask_t detGeoMask(gGeoManager->GetUniqueID()); @@ -55,7 +55,7 @@ void Aligner::applyAlignment(long timestamp, DetID::mask_t addMask) const std::string path = o2::base::NameConf::getAlignmentPath({id}); auto algV = ccdbmgr.get>(path); if (!algV) { - throw std::runtime_error(fmt::format("Failed to fetch alignment from {}:{}", getCCDB(), path)); + throw std::runtime_error(fmt::format("Failed to fetch alignment from {}:{}", o2::base::NameConf::getCCDBServer(), path)); } if (!algV->empty()) { done.set(id); @@ -64,7 +64,7 @@ void Aligner::applyAlignment(long timestamp, DetID::mask_t addMask) const skipped.set(id); } } - std::string log = fmt::format("Alignment from {} for timestamp {}: ", getCCDB(), timestamp); + std::string log = fmt::format("Alignment from {} for timestamp {}: ", o2::base::NameConf::getCCDBServer(), timestamp); if (done.any()) { log += fmt::format("applied to [{}]", DetID::getNames(done)); } diff --git a/Detectors/CPV/base/include/CPVBase/CPVSimParams.h b/Detectors/CPV/base/include/CPVBase/CPVSimParams.h index 7dc9e0c0cc525..d212f0cbbc9f0 100644 --- a/Detectors/CPV/base/include/CPVBase/CPVSimParams.h +++ b/Detectors/CPV/base/include/CPVBase/CPVSimParams.h @@ -14,6 +14,7 @@ #include "CommonUtils/ConfigurableParam.h" #include "CommonUtils/ConfigurableParamHelper.h" +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -23,7 +24,7 @@ namespace cpv // (mostly used in GEANT stepping and Digitizer) struct CPVSimParams : public o2::conf::ConfigurableParamHelper { - std::string mCCDBPath = "http://ccdb-test.cern.ch:8080"; ///< use "localtest" to avoid connecting ccdb server, otherwise use ccdb-test.cern.ch + std::string mCCDBPath = o2::base::NameConf::getCCDBServer(); ///< use "localtest" to avoid connecting ccdb server, otherwise use ccdb-test.cern.ch //Parameters used in conversion of deposited energy to APD response int mnCellX = 128; diff --git a/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h b/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h index 9467047aafb22..8f0975f542986 100644 --- a/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h +++ b/Detectors/CPV/simulation/include/CPVSimulation/RawWriter.h @@ -29,6 +29,7 @@ #include "DataFormatsCPV/CalibParams.h" #include "DataFormatsCPV/Pedestals.h" #include "DataFormatsCPV/BadChannelMap.h" +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -95,7 +96,7 @@ class RawWriter std::vector mPadCharge[kNcc][kNDilogic][kNGasiplex]; ///< list of signals per event FileFor_t mFileFor = FileFor_t::kFullDet; ///< Granularity of the output files std::string mOutputLocation = "./"; ///< Rawfile name - std::string mCcdbUrl = "http://ccdb-test.cern.ch:8080"; ///< CCDB Url + std::string mCcdbUrl = o2::base::NameConf::getCCDBServer(); ///< CCDB Url CalibParams* mCalibParams = nullptr; ///< CPV calibration Pedestals* mPedestals = nullptr; ///< CPV pedestals BadChannelMap* mBadMap = nullptr; ///< CPV bad channel map diff --git a/Detectors/CPV/simulation/src/RawCreator.cxx b/Detectors/CPV/simulation/src/RawCreator.cxx index 35bbd7e48d82e..53ad683c42f5b 100644 --- a/Detectors/CPV/simulation/src/RawCreator.cxx +++ b/Detectors/CPV/simulation/src/RawCreator.cxx @@ -51,7 +51,6 @@ int main(int argc, const char** argv) add_option("file-for,f", bpo::value()->default_value("all"), "single file per: all,cru,link"); add_option("output-dir,o", bpo::value()->default_value("./"), "output directory for raw data"); add_option("debug,d", bpo::value()->default_value(0), "Select debug output level [0 = no debug output]"); - add_option("ccdb-url,c", bpo::value()->default_value("http://ccdb-test.cern.ch:8080"), "CCDB Url ['localtest' for local testing]"); add_option("hbfutils-config,u", bpo::value()->default_value(std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE)), "config file for HBFUtils (or none)"); add_option("configKeyValues", bpo::value()->default_value(""), "comma-separated configKeyValues"); @@ -83,8 +82,6 @@ int main(int argc, const char** argv) outputdir = vm["output-dir"].as(), filefor = vm["file-for"].as(); - auto ccdbUrl = vm["ccdb-url"].as(); - // if needed, create output directory if (!std::filesystem::exists(outputdir)) { if (!std::filesystem::create_directories(outputdir)) { @@ -112,7 +109,7 @@ int main(int argc, const char** argv) o2::cpv::RawWriter rawwriter; rawwriter.setOutputLocation(outputdir.data()); rawwriter.setFileFor(granularity); - rawwriter.setCcdbUrl(ccdbUrl.data()); + rawwriter.setCcdbUrl(o2::base::NameConf::getCCDBServer().c_str()); rawwriter.init(); rawwriter.getWriter().setContinuousReadout(grp->isDetContinuousReadOut(o2::detectors::DetID::CPV)); // must be set explicitly diff --git a/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx b/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx index f05aae32f25d2..25d80c000bd6f 100644 --- a/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx +++ b/Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx @@ -24,6 +24,7 @@ #include "CCDB/BasicCCDBManager.h" #include "CPVBase/Geometry.h" #include "CommonUtils/VerbosityConfig.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::cpv::reco_workflow; @@ -284,7 +285,7 @@ o2::framework::DataProcessorSpec o2::cpv::reco_workflow::getRawToDigitConverterS o2::framework::adaptFromTask(), o2::framework::Options{ {"pedestal", o2::framework::VariantType::Bool, false, {"do not subtract pedestals from digits"}}, - {"ccdb-url", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB Url"}}, + {"ccdb-url", o2::framework::VariantType::String, o2::base::NameConf::getCCDBServer(), {"CCDB Url"}}, {"no-gain-calibration", o2::framework::VariantType::Bool, false, {"do not apply gain calibration"}}, {"no-bad-channel-map", o2::framework::VariantType::Bool, false, {"do not mask bad channels"}}, }}; diff --git a/Detectors/CTP/simulation/include/CTPSimulation/Digitizer.h b/Detectors/CTP/simulation/include/CTPSimulation/Digitizer.h index 0f08d9adb18c6..bd28fc1d69884 100644 --- a/Detectors/CTP/simulation/include/CTPSimulation/Digitizer.h +++ b/Detectors/CTP/simulation/include/CTPSimulation/Digitizer.h @@ -19,6 +19,7 @@ #include "DataFormatsCTP/Digits.h" #include "DataFormatsCTP/Configuration.h" #include "CCDB/BasicCCDBManager.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include namespace o2 @@ -36,7 +37,7 @@ class Digitizer void init(); private: // CTP configuration - std::string mCCDBServer = "http://ccdb-test.cern.ch:8080"; + std::string mCCDBServer = o2::base::NameConf::getCCDBServer(); CTPConfiguration* mCTPConfiguration = nullptr; ClassDefNV(Digitizer, 2); }; diff --git a/Detectors/DCS/testWorkflow/src/dcs-proxy.cxx b/Detectors/DCS/testWorkflow/src/dcs-proxy.cxx index c48a1de3f465b..079408984d195 100644 --- a/Detectors/DCS/testWorkflow/src/dcs-proxy.cxx +++ b/Detectors/DCS/testWorkflow/src/dcs-proxy.cxx @@ -46,6 +46,7 @@ void customize(std::vector& workflowOptions) workflowOptions.push_back(ConfigParamSpec{"test-mode", VariantType::Bool, false, {"test mode"}}); workflowOptions.push_back(ConfigParamSpec{"ccdb-url", VariantType::String, "http://ccdb-test.cern.ch:8080", {"url of CCDB to get the detectors DPs configuration"}}); workflowOptions.push_back(ConfigParamSpec{"detector-list", VariantType::String, "TOF, MCH", {"list of detectors for which to process DCS"}}); + workflowOptions.push_back(ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}); } #include "Framework/runDataProcessing.h" @@ -55,8 +56,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config) bool verbose = config.options().get("verbose"); bool testMode = config.options().get("test-mode"); - std::string url = config.options().get("ccdb-url"); std::string detectorList = config.options().get("detector-list"); + o2::conf::ConfigurableParam::updateFromString(config.options().get("configKeyValues")); + std::string url = config.options().get("ccdb-url"); std::unordered_map dpid2DataDesc; diff --git a/Detectors/EMCAL/calibration/testWorkflow/EMCALChannelCalibratorSpec.h b/Detectors/EMCAL/calibration/testWorkflow/EMCALChannelCalibratorSpec.h index 057be2c59bece..03741c9578755 100644 --- a/Detectors/EMCAL/calibration/testWorkflow/EMCALChannelCalibratorSpec.h +++ b/Detectors/EMCAL/calibration/testWorkflow/EMCALChannelCalibratorSpec.h @@ -27,6 +27,7 @@ #include "Framework/WorkflowSpec.h" #include "CCDB/CcdbApi.h" #include "CCDB/CcdbObjectInfo.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -128,7 +129,7 @@ DataProcessorSpec getEMCALChannelCalibDeviceSpec() AlgorithmSpec{adaptFromTask()}, Options{ {"do-EMCAL-channel-calib-in-test-mode", VariantType::Bool, false, {"to run in test mode for simplification"}}, - {"ccdb-path", VariantType::String, "http://ccdb-test.cern.ch:8080", {"Path to CCDB"}}, + {"ccdb-path", VariantType::String, o2::base::NameConf::getCCDBServer(), {"Path to CCDB"}}, {"useScaledHistoForBadChannelMap", VariantType::Bool, false, {"Use scaled histogram for bad channel extraction"}}}}; } diff --git a/Detectors/EMCAL/workflow/include/EMCALWorkflow/EMCALDCSDataProcessorSpec.h b/Detectors/EMCAL/workflow/include/EMCALWorkflow/EMCALDCSDataProcessorSpec.h index 98ff372656596..cbcca749b1376 100644 --- a/Detectors/EMCAL/workflow/include/EMCALWorkflow/EMCALDCSDataProcessorSpec.h +++ b/Detectors/EMCAL/workflow/include/EMCALWorkflow/EMCALDCSDataProcessorSpec.h @@ -33,6 +33,7 @@ #include "Framework/WorkflowSpec.h" #include "Framework/Task.h" #include "Framework/Logger.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -204,7 +205,7 @@ DataProcessorSpec getEMCALDCSDataProcessorSpec() Inputs{{"input", "DCS", "EMCDATAPOINTS"}}, outputs, AlgorithmSpec{adaptFromTask()}, - Options{{"ccdb-path", VariantType::String, "http://ccdb-test.cern.ch:8080", {"Path to CCDB"}}, + Options{{"ccdb-path", VariantType::String, o2::base::NameConf::getCCDBServer(), {"Path to CCDB"}}, {"use-ccdb-to-configure", VariantType::Bool, false, {"Use CCDB to configure"}}, {"use-verbose-mode", VariantType::Bool, false, {"Use verbose mode"}}, {"DPs-update-interval", VariantType::Int64, 600ll, {"Interval (in s) after which to update the DPs CCDB entry"}}}}; diff --git a/Detectors/FIT/FT0/calibration/testWorkflow/slew_upload.cxx b/Detectors/FIT/FT0/calibration/testWorkflow/slew_upload.cxx index 95432df99a130..3bd064520190e 100644 --- a/Detectors/FIT/FT0/calibration/testWorkflow/slew_upload.cxx +++ b/Detectors/FIT/FT0/calibration/testWorkflow/slew_upload.cxx @@ -54,6 +54,7 @@ int main(int argc, char** argv) add_option("input-file", bpo::value()->default_value("collFT0.root"), "verbosity level"); add_option("merged-file", bpo::value()->default_value("FT0slewGraphs.root"), "input merged file"); add_option("number-of-files", bpo::value()->default_value(1), "number of files to merge"); + add_option("configKeyValues", bpo::value()->default_value(""), "comma-separated configKeyValues"); opt_all.add(opt_general).add(opt_hidden); bpo::store(bpo::command_line_parser(argc, argv).options(opt_all).positional(opt_pos).run(), vm); @@ -73,6 +74,7 @@ int main(int argc, char** argv) std::cerr << e.what() << ", application will now exit" << std::endl; exit(2); } + o2::conf::ConfigurableParam::updateFromString(vm["configKeyValues"].as()); // o2::conf::ConfigurableParam::updateFromString(vm["configKeyValues"].as()); slew_upload(vm["input-file"].as(), @@ -104,8 +106,8 @@ void slew_upload(const std::string& inFileName, const std::string& mergedFileNam gr.Print(); CcdbApi api; std::map metadata; // can be empty - api.init("http://ccdb-test.cern.ch:8080/"); // or http://localhost:8080 for a local installation - // store abitrary user object in strongly typed manner + api.init(o2::base::NameConf::getCCDBServer()); // or http://localhost:8080 for a local installation + // store abitrary user object in strongly typed manner api.storeAsTFileAny(&graphs, "FT0/SlewingCorr", metadata); // diff --git a/Detectors/FIT/FT0/workflow/include/FT0Workflow/ReconstructionSpec.h b/Detectors/FIT/FT0/workflow/include/FT0Workflow/ReconstructionSpec.h index 45a91ae947ec0..6b2300074e7f5 100644 --- a/Detectors/FIT/FT0/workflow/include/FT0Workflow/ReconstructionSpec.h +++ b/Detectors/FIT/FT0/workflow/include/FT0Workflow/ReconstructionSpec.h @@ -21,6 +21,7 @@ #include "CCDB/BasicCCDBManager.h" #include "FT0Base/Geometry.h" #include "TStopwatch.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -42,7 +43,7 @@ class ReconstructionDPL : public Task private: bool mUseMC = false; - const std::string mCCDBpath = "http://alice-ccdb.cern.ch"; + const std::string mCCDBpath = o2::base::NameConf::getCCDBServer(); std::vector mRecPoints; std::vector mRecChData; o2::ft0::CollisionTimeRecoTask mReco; diff --git a/Detectors/FIT/FT0/workflow/src/ft0-reco-workflow.cxx b/Detectors/FIT/FT0/workflow/src/ft0-reco-workflow.cxx index d48d801b4f48b..a47e777815f02 100644 --- a/Detectors/FIT/FT0/workflow/src/ft0-reco-workflow.cxx +++ b/Detectors/FIT/FT0/workflow/src/ft0-reco-workflow.cxx @@ -13,6 +13,7 @@ #include "CommonUtils/ConfigurableParam.h" #include "DetectorsRaw/HBFUtilsInitializer.h" #include "Framework/CallbacksPolicy.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include using namespace o2::framework; @@ -29,7 +30,6 @@ void customize(std::vector& workflowOptions) // option allowing to set parameters std::vector options{ {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation even if available"}}, - {"ccdb-path-ft0", o2::framework::VariantType::String, "http://o2-ccdb.internal/", {"CCDB path"}}, {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input readers"}}, {"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writers"}}, {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}}; @@ -52,7 +52,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) o2::conf::ConfigurableParam::writeINI("o2-ft0-recoflow_configuration.ini"); auto useMC = !configcontext.options().get("disable-mc"); - auto ccdbpath = configcontext.options().get("ccdb-path-ft0"); + auto ccdbpath = o2::base::NameConf::getCCDBServer(); auto disableRootInp = configcontext.options().get("disable-root-input"); auto disableRootOut = configcontext.options().get("disable-root-output"); diff --git a/Detectors/FIT/FV0/calibration/macros/makeChannelTimeOffsetFV0CalibObjectInCCDB.C b/Detectors/FIT/FV0/calibration/macros/makeChannelTimeOffsetFV0CalibObjectInCCDB.C index 81556e835d49f..18added080226 100644 --- a/Detectors/FIT/FV0/calibration/macros/makeChannelTimeOffsetFV0CalibObjectInCCDB.C +++ b/Detectors/FIT/FV0/calibration/macros/makeChannelTimeOffsetFV0CalibObjectInCCDB.C @@ -17,7 +17,7 @@ #include "CCDB/CcdbApi.h" #endif -int makeChannelTimeOffsetFV0CalibObjectInCCDB(const std::string url = "http://o2-ccdb.internal/") +int makeChannelTimeOffsetFV0CalibObjectInCCDB(const std::string url = "http://alice-ccdb.cern.ch/") { o2::ccdb::CcdbApi api; api.init(url); diff --git a/Detectors/FIT/FV0/calibration/macros/readChannelTimeOffsetFV0CalibObjectFromCCDB.C b/Detectors/FIT/FV0/calibration/macros/readChannelTimeOffsetFV0CalibObjectFromCCDB.C index 5f803c1ca7943..5be557c769298 100644 --- a/Detectors/FIT/FV0/calibration/macros/readChannelTimeOffsetFV0CalibObjectFromCCDB.C +++ b/Detectors/FIT/FV0/calibration/macros/readChannelTimeOffsetFV0CalibObjectFromCCDB.C @@ -18,7 +18,7 @@ #endif // Macro retrieves only latest set of calibrations -int readChannelTimeOffsetFV0CalibObjectFromCCDB(const std::string url = "http://o2-ccdb.internal/") +int readChannelTimeOffsetFV0CalibObjectFromCCDB(const std::string url = "http://alice-ccdb.cern.ch/") { o2::ccdb::CcdbApi api; api.init(url); diff --git a/Detectors/FIT/FV0/workflow/include/FV0Workflow/ReconstructionSpec.h b/Detectors/FIT/FV0/workflow/include/FV0Workflow/ReconstructionSpec.h index d76b5dd84cf23..6530c40b73eef 100644 --- a/Detectors/FIT/FV0/workflow/include/FV0Workflow/ReconstructionSpec.h +++ b/Detectors/FIT/FV0/workflow/include/FV0Workflow/ReconstructionSpec.h @@ -42,7 +42,7 @@ class ReconstructionDPL : public Task private: bool mUseMC = true; - std::string mCCDBpath = "http://o2-ccdb.internal/"; + std::string mCCDBpath = ""; std::vector mRecPoints; std::vector mRecChData; o2::fv0::BaseRecoTask mReco; @@ -51,7 +51,7 @@ class ReconstructionDPL : public Task }; /// create a processor spec -framework::DataProcessorSpec getReconstructionSpec(bool useMC = true, const std::string ccdbpath = "http://o2-ccdb.internal/"); +framework::DataProcessorSpec getReconstructionSpec(bool useMC = true, const std::string ccdbpath = "http://alice-ccdb.cern.ch/"); } // namespace fv0 } // namespace o2 diff --git a/Detectors/FIT/FV0/workflow/src/ReconstructionSpec.cxx b/Detectors/FIT/FV0/workflow/src/ReconstructionSpec.cxx index 4a088788c303f..6504adff84b10 100644 --- a/Detectors/FIT/FV0/workflow/src/ReconstructionSpec.cxx +++ b/Detectors/FIT/FV0/workflow/src/ReconstructionSpec.cxx @@ -38,7 +38,6 @@ void ReconstructionDPL::init(InitContext& ic) void ReconstructionDPL::run(ProcessingContext& pc) { auto& mCCDBManager = o2::ccdb::BasicCCDBManager::instance(); - // mCCDBManager.setURL("http://ccdb-test.cern.ch:8080"); mCCDBManager.setURL(mCCDBpath); LOG(debug) << " set-up CCDB " << mCCDBpath; mTimer.Start(false); diff --git a/Detectors/FIT/FV0/workflow/src/fv0-reco-workflow.cxx b/Detectors/FIT/FV0/workflow/src/fv0-reco-workflow.cxx index 6fde4a007fb6f..d2fd959d255a7 100644 --- a/Detectors/FIT/FV0/workflow/src/fv0-reco-workflow.cxx +++ b/Detectors/FIT/FV0/workflow/src/fv0-reco-workflow.cxx @@ -13,6 +13,7 @@ #include "CommonUtils/ConfigurableParam.h" #include "DetectorsRaw/HBFUtilsInitializer.h" #include "Framework/CallbacksPolicy.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -28,7 +29,6 @@ void customize(std::vector& workflowOptions) // option allowing to set parameters std::vector options{ {"disable-mc", o2::framework::VariantType::Bool, false, {"disable MC propagation even if available"}}, - {"ccdb-path-fv0", o2::framework::VariantType::String, "http://o2-ccdb.internal/", {"CCDB path"}}, {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input readers"}}, {"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writers"}}, {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}}; @@ -49,12 +49,11 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) o2::conf::ConfigurableParam::writeINI("o2-fv0-recoflow_configuration.ini"); auto useMC = !configcontext.options().get("disable-mc"); - auto ccdbpath = configcontext.options().get("ccdb-path-fv0"); auto disableRootInp = configcontext.options().get("disable-root-input"); auto disableRootOut = configcontext.options().get("disable-root-output"); LOG(info) << "WorkflowSpec getRecoWorkflow useMC " << useMC; - auto wf = o2::fv0::getRecoWorkflow(useMC, ccdbpath, disableRootInp, disableRootOut); + auto wf = o2::fv0::getRecoWorkflow(useMC, o2::base::NameConf::getCCDBServer(), disableRootInp, disableRootOut); // configure dpl timer to inject correct firstTFOrbit: start from the 1st orbit of TF containing 1st sampled orbit o2::raw::HBFUtilsInitializer hbfIni(configcontext, wf); diff --git a/Detectors/FIT/macros/CMakeLists.txt b/Detectors/FIT/macros/CMakeLists.txt index 8b5f5e9c6e606..008dde0c69e6e 100644 --- a/Detectors/FIT/macros/CMakeLists.txt +++ b/Detectors/FIT/macros/CMakeLists.txt @@ -17,7 +17,7 @@ o2_add_test_root_macro(readFT0digits.C LABELS fit) o2_add_test_root_macro(uploadLookUpTable.C PUBLIC_LINK_LIBRARIES O2::DataFormatsFT0 - LABELS fit) + LABELS fit COMPILE_ONLY) o2_add_test_root_macro(FT0digits2raw.C PUBLIC_LINK_LIBRARIES O2::FT0Simulation O2::DataFormatsFT0 diff --git a/Detectors/FIT/macros/uploadLookUpTable.C b/Detectors/FIT/macros/uploadLookUpTable.C index 3dac7aa984ede..49e057717088f 100644 --- a/Detectors/FIT/macros/uploadLookUpTable.C +++ b/Detectors/FIT/macros/uploadLookUpTable.C @@ -10,7 +10,7 @@ //o2::ft0::HVchannel::HVBoard readHVBoard(std::string_view str); -void uploadLookUpTable(const std::string url = "http://o2-ccdb.internal/") +void uploadLookUpTable(const std::string url = "http://alice-ccdb.cern.ch/") { using o2::ccdb::BasicCCDBManager; using o2::ccdb::CcdbApi; diff --git a/Detectors/GlobalTrackingWorkflow/tofworkflow/src/tof-reco-workflow.cxx b/Detectors/GlobalTrackingWorkflow/tofworkflow/src/tof-reco-workflow.cxx index ef58a5723fc55..fda240febefa4 100644 --- a/Detectors/GlobalTrackingWorkflow/tofworkflow/src/tof-reco-workflow.cxx +++ b/Detectors/GlobalTrackingWorkflow/tofworkflow/src/tof-reco-workflow.cxx @@ -52,7 +52,6 @@ void customize(std::vector& workflowOptions) {"tof-sectors", o2::framework::VariantType::String, "0-17", {"TOF sector range, e.g. 5-7,8,9 ,TBI"}}, {"tof-lanes", o2::framework::VariantType::Int, 1, {"number of parallel lanes up to the matcher, TBI"}}, {"use-ccdb", o2::framework::VariantType::Bool, false, {"enable access to ccdb tof calibration objects"}}, - {"ccdb-url-tof", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB Url"}}, {"input-desc", o2::framework::VariantType::String, "CRAWDATA", {"Input specs description string"}}, {"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input readers"}}, {"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writers"}}, @@ -138,7 +137,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) auto isCalibFromCluster = cfgc.options().get("calib-cluster"); auto isCosmics = cfgc.options().get("cosmics"); auto ignoreDistStf = cfgc.options().get("ignore-dist-stf"); - auto ccdb_url = cfgc.options().get("ccdb-url-tof"); + auto ccdb_url = o2::base::NameConf::getCCDBServer(); LOG(debug) << "TOF RECO WORKFLOW configuration"; LOG(debug) << "TOF input = " << cfgc.options().get("input-type"); @@ -148,7 +147,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) LOG(debug) << "TOF lanes = " << cfgc.options().get("tof-lanes"); LOG(debug) << "TOF use-ccdb = " << cfgc.options().get("use-ccdb"); if (useCCDB) { - LOG(debug) << "CCDB url = " << cfgc.options().get("ccdb-url-tof"); + LOG(debug) << "CCDB url = " << ccdb_url; } LOG(debug) << "TOF disable-root-input = " << disableRootInput; LOG(debug) << "TOF disable-root-output = " << disableRootOutput; diff --git a/Detectors/HMPID/workflow/src/PedestalsCalculationSpec.cxx b/Detectors/HMPID/workflow/src/PedestalsCalculationSpec.cxx index 798c8f65ff758..3194ea832695c 100644 --- a/Detectors/HMPID/workflow/src/PedestalsCalculationSpec.cxx +++ b/Detectors/HMPID/workflow/src/PedestalsCalculationSpec.cxx @@ -52,6 +52,7 @@ #include "HMPIDBase/Geo.h" #include "HMPIDReconstruction/HmpidDecoder2.h" #include "HMPIDWorkflow/PedestalsCalculationSpec.h" +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -334,7 +335,7 @@ o2::framework::DataProcessorSpec getPedestalsCalculationSpec(std::string inputSp AlgorithmSpec{adaptFromTask()}, Options{{"files-basepath", VariantType::String, "/tmp/hmpPedThr", {"Name of the Base Path of Pedestals/Thresholds files."}}, {"use-ccdb", VariantType::Bool, false, {"Register the Pedestals/Threshold values into the CCDB"}}, - {"ccdb-uri", VariantType::String, "http://ccdb-test.cern.ch:8080", {"URI for the CCDB access."}}, + {"ccdb-uri", VariantType::String, o2::base::NameConf::getCCDBServer(), {"URI for the CCDB access."}}, {"fast-decode", VariantType::Bool, false, {"Use the fast algorithm. (error 0.8%)"}}, {"pedestals-tag", VariantType::String, "Latest", {"The tag applied to this set of pedestals/threshold values"}}, {"sigmacut", VariantType::Float, 4.0f, {"Sigma values for the Thresholds calculation."}}}}; diff --git a/Detectors/MUON/MCH/Calibration/src/PedestalCalibSpec.h b/Detectors/MUON/MCH/Calibration/src/PedestalCalibSpec.h index 9aa91681209c7..e24fddbe80952 100644 --- a/Detectors/MUON/MCH/Calibration/src/PedestalCalibSpec.h +++ b/Detectors/MUON/MCH/Calibration/src/PedestalCalibSpec.h @@ -26,6 +26,7 @@ #include "Framework/WorkflowSpec.h" #include "CCDB/CcdbApi.h" #include "CCDB/CcdbObjectInfo.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -180,7 +181,7 @@ DataProcessorSpec getMCHPedestalCalibSpec(const char* specName, const std::strin {"max-delay", VariantType::Int, 1, {"number of slots in past to consider"}}, {"pedestal-threshold", VariantType::Float, 200.0f, {"maximum allowed pedestal value"}}, {"noise-threshold", VariantType::Float, 2.0f, {"maximum allowed noise value"}}, - {"ccdb-path", VariantType::String, "http://ccdb-test.cern.ch:8080", {"Path to CCDB"}}}}; + {"ccdb-path", VariantType::String, o2::base::NameConf::getCCDBServer(), {"Path to CCDB"}}}}; } } // namespace framework diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSEnergyCalibDevice.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSEnergyCalibDevice.h index 9d6f25b21143f..d9fc8fcc66b78 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSEnergyCalibDevice.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSEnergyCalibDevice.h @@ -49,7 +49,7 @@ class PHOSEnergyCalibDevice : public o2::framework::Task private: static constexpr short kMaxCluInEvent = 64; /// maximal number of clusters per event to separate digits from them (6 bits in digit map) bool mUseCCDB = false; - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; ///< CCDB server path + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; ///< CCDB server path std::string mdigitsfilename = "./CalibDigits.root"; bool mPostHistos = true; /// post colllected histos to ccdb long mRunStartTime = 0; /// start time of the run (sec) diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSHGLGRatioCalibDevice.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSHGLGRatioCalibDevice.h index aa57b1431fdd6..d9e867f8ba574 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSHGLGRatioCalibDevice.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSHGLGRatioCalibDevice.h @@ -59,7 +59,7 @@ class PHOSHGLGRatioCalibDevice : public o2::framework::Task bool mUpdateCCDB = true; /// set is close to current and can update it static constexpr short kMinorChange = 10; /// ignore if number of channels changed smaller than... long mRunStartTime = 0; /// start time of the run (sec) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; ///< CCDB server path + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; ///< CCDB server path std::unique_ptr mCalibParams; //! Final calibration object short mMinLG = 20; /// minimal LG ampl used in ratio short minimalStatistics = 100; /// minimal statistics per channel diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSPedestalCalibDevice.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSPedestalCalibDevice.h index 93dd2ec152da5..18feb963e8597 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSPedestalCalibDevice.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSPedestalCalibDevice.h @@ -52,7 +52,7 @@ class PHOSPedestalCalibDevice : public o2::framework::Task bool mUpdateCCDB = true; /// set is close to current and can update it static constexpr short kMinorChange = 10; /// ignore if number of channels changed smaller than... long mRunStartTime = 0; /// start time of the run (sec) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; /// CCDB path to retrieve current CCDB objects for comparison + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; /// CCDB path to retrieve current CCDB objects for comparison std::unique_ptr mPedestals; //! Final calibration object std::unique_ptr mOldPed; //! Pedestals currently stored in CCDB for comparisoin std::unique_ptr mMeanHG; //! Mean values in High Gain channels diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h index f862f7ece4eb0..9e83edefcfa43 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h @@ -46,7 +46,7 @@ class PHOSRunbyrunCalibDevice private: bool mUseCCDB = false; long mRunStartTime = 0; /// start time of the run (sec) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; /// CCDB path to retrieve current CCDB objects for comparison + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; /// CCDB path to retrieve current CCDB objects for comparison std::array mRunByRun; /// Final calibration object std::unique_ptr mCalibrator; /// Agregator of calibration TimeFrameSlots }; diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibrator.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibrator.h index e6094308c1512..c89c38e017dc6 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibrator.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSRunbyrunCalibrator.h @@ -60,7 +60,7 @@ class PHOSRunbyrunSlot bool mUseCCDB = false; long mRunStartTime = 0; /// start time of the run (sec) float mPtCut = 1.5; /// ptmin of a pair cut (GeV/c) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; /// CCDB path to retrieve current CCDB objects for comparison + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; /// CCDB path to retrieve current CCDB objects for comparison std::array mReMi; /// Real and Mixed inv mass distributions per module std::unique_ptr mBuffer; /// Buffer for current and previous events std::unique_ptr mBadMap; /// Latest bad channels map @@ -98,7 +98,7 @@ class PHOSRunbyrunCalibrator final : public o2::calibration::TimeSlotCalibration private: bool mUseCCDB = false; long mRunStartTime = 0; /// start time of the run (sec) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; /// CCDB path to retrieve current CCDB objects for comparison + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; /// CCDB path to retrieve current CCDB objects for comparison std::array mRunByRun; /// Final calibration object std::array mReMi; /// Real and Mixed inv mass distributions per module diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibDevice.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibDevice.h index a8c9b58f56aaf..2390e0769207c 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibDevice.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibDevice.h @@ -46,7 +46,7 @@ class PHOSTurnonCalibDevice : public o2::framework::Task private: bool mUseCCDB = false; - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; ///< CCDB server path + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; ///< CCDB server path long mRunStartTime = 0; /// start time of the run (sec) std::unique_ptr mTriggerMap; /// Final calibration object std::unique_ptr mCalibrator; /// Agregator of calibration TimeFrameSlots diff --git a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibrator.h b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibrator.h index e1656c2a19af8..bf7934a40fcff 100644 --- a/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibrator.h +++ b/Detectors/PHOS/calib/include/PHOSCalibWorkflow/PHOSTurnonCalibrator.h @@ -59,7 +59,7 @@ class PHOSTurnonSlot private: bool mUseCCDB = false; long mRunStartTime = 0; /// start time of the run (sec) - std::string mCCDBPath{"http://ccdb-test.cern.ch:8080"}; ///< CCDB server path + std::string mCCDBPath{"http://alice-ccdb.cern.ch"}; ///< CCDB server path std::bitset mFiredTiles; //! Container for bad trigger cells, 1 means bad sell std::bitset mNoisyTiles; //! Container for bad trigger cells, 1 means bad sell std::unique_ptr mTurnOnHistos; //! Collection of histos to fill @@ -91,7 +91,7 @@ class PHOSTurnonCalibrator final : public o2::calibration::TimeSlotCalibration mTurnOnHistos; //! Collection of histos to fill std::unique_ptr mTriggerMap; diff --git a/Detectors/PHOS/calib/src/phos-calib-workflow.cxx b/Detectors/PHOS/calib/src/phos-calib-workflow.cxx index 50f82e2afd510..d26ba7a0d7ea4 100644 --- a/Detectors/PHOS/calib/src/phos-calib-workflow.cxx +++ b/Detectors/PHOS/calib/src/phos-calib-workflow.cxx @@ -16,6 +16,7 @@ #include "PHOSCalibWorkflow/PHOSRunbyrunCalibDevice.h" #include "Framework/DataProcessorSpec.h" #include "CommonUtils/ConfigurableParam.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -33,7 +34,6 @@ void customize(std::vector& workflowOptions) // workflowOptions.push_back(ConfigParamSpec{"not-use-ccdb", o2::framework::VariantType::Bool, false, {"enable access to ccdb phos calibration objects"}}); workflowOptions.push_back(ConfigParamSpec{"forceupdate", o2::framework::VariantType::Bool, false, {"update ccdb even difference to previous object large"}}); - workflowOptions.push_back(ConfigParamSpec{"ccdbpath", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB address to get current objects"}}); workflowOptions.push_back(ConfigParamSpec{"digitspath", o2::framework::VariantType::String, "./CalibDigits.root", {"path and name of file to store calib. digits"}}); workflowOptions.push_back(ConfigParamSpec{"ptminmgg", o2::framework::VariantType::Float, 1.5f, {"minimal pt to fill mgg calib histos"}}); @@ -59,8 +59,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) auto doBadMap = configcontext.options().get("badmap"); auto useCCDB = !configcontext.options().get("not-use-ccdb"); auto forceUpdate = configcontext.options().get("forceupdate"); - auto path = configcontext.options().get("ccdbpath"); auto dpath = configcontext.options().get("digitspath"); + auto path = o2::base::NameConf::getCCDBServer(); float ptMin = configcontext.options().get("ptminmgg"); float eMinHGTime = configcontext.options().get("eminhgtime"); diff --git a/Detectors/PHOS/simulation/src/RawWriter.cxx b/Detectors/PHOS/simulation/src/RawWriter.cxx index bf7fd570abf7d..e375d12ffa511 100644 --- a/Detectors/PHOS/simulation/src/RawWriter.cxx +++ b/Detectors/PHOS/simulation/src/RawWriter.cxx @@ -19,6 +19,7 @@ #include "PHOSBase/Mapping.h" #include "PHOSBase/PHOSSimParams.h" #include "CCDB/CcdbApi.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::phos; @@ -68,7 +69,7 @@ void RawWriter::digitsToRaw(gsl::span digitsbranch, gsl::span metadata; - ccdb.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation + ccdb.init(o2::base::NameConf::getCCDBServer()); // or http://localhost:8080 for a local installation auto tr = triggerbranch.begin(); double eventTime = -1; // if(tr!=triggerbranch.end()){ diff --git a/Detectors/PHOS/workflow/src/CellConverterSpec.cxx b/Detectors/PHOS/workflow/src/CellConverterSpec.cxx index 0add198fb7d81..1cb28470274bd 100644 --- a/Detectors/PHOS/workflow/src/CellConverterSpec.cxx +++ b/Detectors/PHOS/workflow/src/CellConverterSpec.cxx @@ -21,6 +21,7 @@ #include "CommonDataFormat/InteractionRecord.h" #include "PHOSBase/PHOSSimParams.h" #include "CCDB/CcdbApi.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::phos::reco_workflow; @@ -71,7 +72,7 @@ void CellConverterSpec::run(framework::ProcessingContext& ctx) LOG(info) << "[PHOSCellConverter - run] getting BadMap object from ccdb"; o2::ccdb::CcdbApi ccdb; std::map metadata; // do we want to store any meta data? - ccdb.init("http://ccdb-test.cern.ch:8080"); // or http://localhost:8080 for a local installation + ccdb.init(o2::base::NameConf::getCCDBServer()); // or http://localhost:8080 for a local installation long bcTime = -1; //TODO!!! Convert BC time to time o2::InteractionRecord bcTime = digitsTR.front().getBCData() ; mBadMap = ccdb.retrieveFromTFileAny("PHOS/BadMap", metadata, bcTime); if (!mBadMap) { diff --git a/Detectors/TOF/calibration/include/TOFCalibration/CalibTOF.h b/Detectors/TOF/calibration/include/TOFCalibration/CalibTOF.h index fe014c6a9747b..c9005bb8ca688 100644 --- a/Detectors/TOF/calibration/include/TOFCalibration/CalibTOF.h +++ b/Detectors/TOF/calibration/include/TOFCalibration/CalibTOF.h @@ -138,7 +138,7 @@ class CalibTOF bool mInitDone = false; ///< flag init already done bool mFillCCDB = false; ///< flag init already doneto decide whether to fill or not the CCDB - std::string mCCDBpath = "http://ccdb-test.cern.ch:8080"; ///< path to CCDB + std::string mCCDBpath = "http://alice-ccdb.cern.ch"; ///< path to CCDB ///========== Parameters to be set externally, e.g. from CCDB ==================== diff --git a/Detectors/TOF/calibration/include/TOFCalibration/LHCClockCalibrator.h b/Detectors/TOF/calibration/include/TOFCalibration/LHCClockCalibrator.h index b53ed8f23db45..a63b184aeae57 100644 --- a/Detectors/TOF/calibration/include/TOFCalibration/LHCClockCalibrator.h +++ b/Detectors/TOF/calibration/include/TOFCalibration/LHCClockCalibrator.h @@ -17,6 +17,7 @@ #include "DataFormatsTOF/CalibInfoTOF.h" #include "TOFBase/CalibTOFapi.h" #include "DataFormatsTOF/CalibLHCphaseTOF.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include "TOFBase/Geo.h" #include "CCDB/CcdbObjectInfo.h" #include @@ -63,7 +64,7 @@ class LHCClockCalibrator final : public o2::calibration::TimeSlotCalibration; public: - LHCClockCalibrator(int minEnt = 500, int nb = 1000, float r = 24400, const std::string path = "http://ccdb-test.cern.ch:8080") : mMinEntries(minEnt), mNBins(nb), mRange(r) { mCalibTOFapi.setURL(path); } + LHCClockCalibrator(int minEnt = 500, int nb = 1000, float r = 24400, const std::string path = o2::base::NameConf::getCCDBServer()) : mMinEntries(minEnt), mNBins(nb), mRange(r) { mCalibTOFapi.setURL(path); } ~LHCClockCalibrator() final = default; bool hasEnoughData(const Slot& slot) const final { return slot.getContainer()->entries >= mMinEntries; } void initOutput() final; diff --git a/Detectors/TOF/calibration/testWorkflow/TOFChannelCalibratorSpec.h b/Detectors/TOF/calibration/testWorkflow/TOFChannelCalibratorSpec.h index b256b86e11b3a..848781b6447ad 100644 --- a/Detectors/TOF/calibration/testWorkflow/TOFChannelCalibratorSpec.h +++ b/Detectors/TOF/calibration/testWorkflow/TOFChannelCalibratorSpec.h @@ -15,6 +15,7 @@ /// @file TOFChannelCalibratorSpec.h /// @brief Device to calibrate TOF channles (offsets) +#include "DetectorsCommonDataFormats/NameConf.h" #include "TOFCalibration/TOFChannelCalibrator.h" #include "DetectorsCalibration/Utils.h" #include "DataFormatsTOF/CalibInfoTOF.h" @@ -259,7 +260,7 @@ DataProcessorSpec getTOFChannelCalibDeviceSpec(bool useCCDB, bool attachChannelO {"nbins", VariantType::Int, 1000, {"number of bins for t-texp"}}, {"range", VariantType::Float, 24000.f, {"range for t-text"}}, {"do-TOF-channel-calib-in-test-mode", VariantType::Bool, false, {"to run in test mode for simplification"}}, - {"ccdb-path", VariantType::String, "http://ccdb-test.cern.ch:8080", {"Path to CCDB"}}, + {"ccdb-path", VariantType::String, o2::base::NameConf::getCCDBServer(), {"Path to CCDB"}}, {"update-at-end-of-run-only", VariantType::Bool, false, {"to update the CCDB only at the end of the run; has priority over calibrating in time slots"}}, {"tf-per-slot", VariantType::Int64, INFINITE_TF_int64, {"number of TFs per calibration time slot"}}, {"max-delay", VariantType::Int64, 0ll, {"number of slots in past to consider"}}, diff --git a/Detectors/TOF/workflow/include/TOFWorkflowUtils/TOFClusterizerSpec.h b/Detectors/TOF/workflow/include/TOFWorkflowUtils/TOFClusterizerSpec.h index f1c7de932e0b8..5f506195398a8 100644 --- a/Detectors/TOF/workflow/include/TOFWorkflowUtils/TOFClusterizerSpec.h +++ b/Detectors/TOF/workflow/include/TOFWorkflowUtils/TOFClusterizerSpec.h @@ -19,7 +19,7 @@ namespace o2 namespace tof { -o2::framework::DataProcessorSpec getTOFClusterizerSpec(bool useMC, bool useCCDB = 0, bool doCalib = 0, bool isCosmic = 0, std::string ccdb_url = "http://ccdb-test.cern.ch:8080"); +o2::framework::DataProcessorSpec getTOFClusterizerSpec(bool useMC, bool useCCDB = 0, bool doCalib = 0, bool isCosmic = 0, std::string ccdb_url = ""); } // end namespace tof } // end namespace o2 diff --git a/Detectors/TPC/calibration/include/TPCCalibration/IDCCCDBHelper.h b/Detectors/TPC/calibration/include/TPCCalibration/IDCCCDBHelper.h index a2fb9f643ab8c..c590e4259430a 100644 --- a/Detectors/TPC/calibration/include/TPCCalibration/IDCCCDBHelper.h +++ b/Detectors/TPC/calibration/include/TPCCalibration/IDCCCDBHelper.h @@ -19,6 +19,7 @@ #include "DataFormatsTPC/Defs.h" #include "TPCBase/Sector.h" #include "CCDB/BasicCCDBManager.h" +#include "DetectorsCommonDataFormats/NameConf.h" #include "Rtypes.h" namespace o2::tpc @@ -51,7 +52,7 @@ class IDCCCDBHelper public: /// constructor /// \param uri path to CCDB - IDCCCDBHelper(const char* uri = "http://ccdb-test.cern.ch:8080") { mCCDBManager.setURL(uri); } + IDCCCDBHelper(const char* uri = o2::base::NameConf::getCCDBServer().c_str()) { mCCDBManager.setURL(uri); } /// update timestamp (time frame) void setTimeStamp(const long long timestamp) { mCCDBManager.setTimestamp(timestamp); } diff --git a/Detectors/TPC/workflow/include/TPCWorkflow/TPCFactorizeIDCSpec.h b/Detectors/TPC/workflow/include/TPCWorkflow/TPCFactorizeIDCSpec.h index 8fb86fb6707ac..ec98dfc80f308 100644 --- a/Detectors/TPC/workflow/include/TPCWorkflow/TPCFactorizeIDCSpec.h +++ b/Detectors/TPC/workflow/include/TPCWorkflow/TPCFactorizeIDCSpec.h @@ -33,6 +33,7 @@ #include "TPCCalibration/IDCGroupingParameter.h" #include "TPCWorkflow/TPCDistributeIDCSpec.h" #include "TPCBase/CRU.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; using o2::header::gDataOriginTPC; @@ -278,7 +279,7 @@ DataProcessorSpec getTPCFactorizeIDCSpec(const int lane, const std::vector>(crus, timeframes, timeframesDeltaIDC, groupPads, groupRows, groupLastRowsThreshold, groupLastPadsThreshold, compression, debug, senddebug)}, - Options{{"ccdb-uri", VariantType::String, "http://ccdb-test.cern.ch:8080", {"URI for the CCDB access."}}, + Options{{"ccdb-uri", VariantType::String, o2::base::NameConf::getCCDBServer(), {"URI for the CCDB access."}}, {"update-not-grouping-parameter", VariantType::Bool, false, {"Do NOT Update/Writing grouping parameters to CCDB."}}}}; // end DataProcessorSpec spec.rank = lane; return spec; diff --git a/Detectors/TPC/workflow/include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h b/Detectors/TPC/workflow/include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h index c7dc7b09b84ea..c79e96de6340a 100644 --- a/Detectors/TPC/workflow/include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h +++ b/Detectors/TPC/workflow/include/TPCWorkflow/TPCFourierTransformAggregatorSpec.h @@ -30,6 +30,7 @@ #include "TPCWorkflow/TPCDistributeIDCSpec.h" #include "TPCBase/CRU.h" #include "Framework/WorkflowSpec.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; using o2::header::gDataOriginTPC; @@ -144,7 +145,7 @@ DataProcessorSpec getTPCFourierTransformAggregatorSpec(const std::vector(crus, timeframes, nFourierCoefficientsStore, rangeIDC, debug, senddebug)}, - Options{{"ccdb-uri", VariantType::String, "http://ccdb-test.cern.ch:8080", {"URI for the CCDB access."}}}}; // end DataProcessorSpec + Options{{"ccdb-uri", VariantType::String, o2::base::NameConf::getCCDBServer(), {"URI for the CCDB access."}}}}; // end DataProcessorSpec } } // namespace o2::tpc diff --git a/Detectors/TRD/calibration/src/CalibratorVdExB.cxx b/Detectors/TRD/calibration/src/CalibratorVdExB.cxx index 317afd157048e..870837be553f6 100644 --- a/Detectors/TRD/calibration/src/CalibratorVdExB.cxx +++ b/Detectors/TRD/calibration/src/CalibratorVdExB.cxx @@ -22,6 +22,7 @@ #include #include #include +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::trd::constants; @@ -154,7 +155,7 @@ void CalibratorVdExB::finalizeSlot(Slot& slot) // write results to CCDB o2::ccdb::CcdbApi ccdb; - ccdb.init("http://ccdb-test.cern.ch:8080"); + ccdb.init(o2::base::NameConf::getCCDBServer()); // ccdb.init("http://localhost:8080"); std::map metadata; // TODO: do we want to store any meta data? CalVdriftExB calObject; diff --git a/Detectors/ZDC/simulation/src/digi2raw.cxx b/Detectors/ZDC/simulation/src/digi2raw.cxx index 3d3a8221a8c59..d794d95e45857 100644 --- a/Detectors/ZDC/simulation/src/digi2raw.cxx +++ b/Detectors/ZDC/simulation/src/digi2raw.cxx @@ -58,7 +58,6 @@ int main(int argc, char** argv) add_option("input-file,i", bpo::value()->default_value("zdcdigits.root"), "input ZDC digits file"); add_option("file-for,f", bpo::value()->default_value("all"), "single file per: all,flp,cru,link"); add_option("output-dir,o", bpo::value()->default_value("./"), "output directory for raw data"); - add_option("ccdb-url,c", bpo::value()->default_value(""), "url of the ccdb repository"); uint32_t defRDH = o2::raw::RDHUtils::getVersion(); add_option("rdh-version,r", bpo::value()->default_value(defRDH), "RDH version to use"); add_option("hbfutils-config,u", bpo::value()->default_value(std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE)), "config file for HBFUtils (or none)"); @@ -88,7 +87,7 @@ int main(int argc, char** argv) } o2::conf::ConfigurableParam::updateFromString(vm["configKeyValues"].as()); - std::string ccdb_url = vm["ccdb-url"].as(); + std::string ccdb_url = o2::base::NameConf::getCCDBServer(); auto& dopt = o2::conf::DigiParams::Instance(); std::string ccdbHost = dopt.ccdb; if (ccdb_url.length() > 0) { diff --git a/Detectors/ZDC/workflow/include/ZDCWorkflow/DigitRecoSpec.h b/Detectors/ZDC/workflow/include/ZDCWorkflow/DigitRecoSpec.h index 6cbdf616041a1..3cc863acddf2e 100644 --- a/Detectors/ZDC/workflow/include/ZDCWorkflow/DigitRecoSpec.h +++ b/Detectors/ZDC/workflow/include/ZDCWorkflow/DigitRecoSpec.h @@ -21,6 +21,7 @@ #include "Framework/Task.h" #include "ZDCReconstruction/DigiReco.h" #include +#include "DetectorsCommonDataFormats/NameConf.h" namespace o2 { @@ -39,7 +40,7 @@ class DigitRecoSpec : public o2::framework::Task private: DigiReco mDR; // Reconstruction object - std::string mccdbHost{"http://ccdb-test.cern.ch:8080"}; // Alternative ccdb server + std::string mccdbHost{o2::base::NameConf::getCCDBServer()}; // Alternative ccdb server int mVerbosity = 0; // Verbosity level during recostruction bool mDebugOut = false; // Save temporary reconstruction structures on root file bool mInitialized = false; // Connect once to CCDB during initialization diff --git a/Detectors/ZDC/workflow/include/ZDCWorkflow/ZDCDataReaderDPLSpec.h b/Detectors/ZDC/workflow/include/ZDCWorkflow/ZDCDataReaderDPLSpec.h index 91306aa73a566..3007e535d95b2 100644 --- a/Detectors/ZDC/workflow/include/ZDCWorkflow/ZDCDataReaderDPLSpec.h +++ b/Detectors/ZDC/workflow/include/ZDCWorkflow/ZDCDataReaderDPLSpec.h @@ -14,6 +14,7 @@ #ifndef O2_ZDCDATAREADERDPLSPEC_H #define O2_ZDCDATAREADERDPLSPEC_H +#include "DetectorsCommonDataFormats/NameConf.h" #include "CCDB/BasicCCDBManager.h" #include "CCDB/CCDBTimeStampUtils.h" #include "Framework/DataProcessorSpec.h" @@ -53,7 +54,7 @@ class ZDCDataReaderDPLSpec : public Task void run(ProcessingContext& pc) final; private: - std::string mccdbHost = "http://ccdb-test.cern.ch:8080"; + std::string mccdbHost = o2::base::NameConf::getCCDBServer(); bool mVerifyTrigger = true; RawReaderZDC mRawReader; }; diff --git a/Detectors/ZDC/workflow/src/DigitRecoSpec.cxx b/Detectors/ZDC/workflow/src/DigitRecoSpec.cxx index 6577ca999d0a3..7faafabe4d06d 100644 --- a/Detectors/ZDC/workflow/src/DigitRecoSpec.cxx +++ b/Detectors/ZDC/workflow/src/DigitRecoSpec.cxx @@ -28,7 +28,7 @@ #include "DataFormatsZDC/OrbitData.h" #include "DataFormatsZDC/RecEvent.h" #include "ZDCBase/ModuleConfig.h" - +#include "DetectorsCommonDataFormats/NameConf.h" #include "CCDB/BasicCCDBManager.h" #include "CCDB/CCDBTimeStampUtils.h" #include "ZDCReconstruction/RecoConfigZDC.h" @@ -232,7 +232,7 @@ framework::DataProcessorSpec getDigitRecoSpec(const int verbosity = 0, const boo inputs, outputs, AlgorithmSpec{adaptFromTask(verbosity, enableDebugOut)}, - o2::framework::Options{{"ccdb-url", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB Url"}}}}; + o2::framework::Options{{"ccdb-url", o2::framework::VariantType::String, o2::base::NameConf::getCCDBServer(), {"CCDB Url"}}}}; } } // namespace zdc diff --git a/Detectors/ZDC/workflow/src/ZDCDataReaderDPLSpec.cxx b/Detectors/ZDC/workflow/src/ZDCDataReaderDPLSpec.cxx index dfcb77f09ce7c..decc9f2f03259 100644 --- a/Detectors/ZDC/workflow/src/ZDCDataReaderDPLSpec.cxx +++ b/Detectors/ZDC/workflow/src/ZDCDataReaderDPLSpec.cxx @@ -13,6 +13,7 @@ #include "ZDCWorkflow/ZDCDataReaderDPLSpec.h" #include "CommonUtils/VerbosityConfig.h" +#include "DetectorsCommonDataFormats/NameConf.h" using namespace o2::framework; @@ -103,7 +104,7 @@ framework::DataProcessorSpec getZDCDataReaderDPLSpec(const RawReaderZDC& rawRead inputSpec, outputSpec, adaptFromTask(rawReader, verifyTrigger), - Options{{"ccdb-url", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB Url"}}}}; + Options{{"ccdb-url", o2::framework::VariantType::String, o2::base::NameConf::getCCDBServer(), {"CCDB Url"}}}}; } } // namespace zdc } // namespace o2 diff --git a/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx b/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx index 38547d002b957..dc5046e32d2c2 100644 --- a/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx +++ b/Steer/DigitizerWorkflow/src/SimpleDigitizerWorkflow.cxx @@ -183,7 +183,6 @@ void customize(std::vector& workflowOptions) // option to use/not use CCDB for TOF workflowOptions.push_back(ConfigParamSpec{"use-ccdb-tof", o2::framework::VariantType::Bool, false, {"enable access to ccdb tof calibration objects"}}); - workflowOptions.push_back(ConfigParamSpec{"ccdb-url-tof", o2::framework::VariantType::String, "http://ccdb-test.cern.ch:8080", {"CCDB Url"}}); // option to use or not use the Trap Simulator after digitisation (debate of digitization or reconstruction is for others) workflowOptions.push_back(ConfigParamSpec{"disable-trd-trapsim", VariantType::Bool, false, {"disable the trap simulation of the TRD"}}); @@ -515,7 +514,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext) // the TOF part if (isEnabled(o2::detectors::DetID::TOF)) { auto useCCDB = configcontext.options().get("use-ccdb-tof"); - auto ccdb_url_tof = configcontext.options().get("ccdb-url-tof"); + auto ccdb_url_tof = o2::base::NameConf::getCCDBServer(); detList.emplace_back(o2::detectors::DetID::TOF); // connect the TOF digitization specs.emplace_back(o2::tof::getTOFDigitizerSpec(fanoutsize++, useCCDB, mctruth, ccdb_url_tof.c_str()));