From 01e7a58aa40c51b191c79b8f64a75960ec5881d9 Mon Sep 17 00:00:00 2001 From: mlesch Date: Tue, 19 Nov 2024 17:33:51 +0100 Subject: [PATCH] TPC: AtmosPressure Reductor WIP 2 --- Modules/TPC/CMakeLists.txt | 1 + .../TPC/run/tpcQCAtmosPressureTrending.json | 80 +++++++++++++++++++ Modules/TPC/src/AtmosPressureReductor.cxx | 8 +- 3 files changed, 85 insertions(+), 4 deletions(-) create mode 100644 Modules/TPC/run/tpcQCAtmosPressureTrending.json diff --git a/Modules/TPC/CMakeLists.txt b/Modules/TPC/CMakeLists.txt index 1d25d4792..c17064206 100644 --- a/Modules/TPC/CMakeLists.txt +++ b/Modules/TPC/CMakeLists.txt @@ -185,4 +185,5 @@ install(FILES run/tpcQCPID_sampled.json run/tpcQCTrending_separationpower.json run/tpcQCTimeGainCalibTrending.json run/tpcDCSPTempTrending.json + run/tpcQCAtmosPressureTrending.json DESTINATION etc) diff --git a/Modules/TPC/run/tpcQCAtmosPressureTrending.json b/Modules/TPC/run/tpcQCAtmosPressureTrending.json new file mode 100644 index 000000000..bf7be4988 --- /dev/null +++ b/Modules/TPC/run/tpcQCAtmosPressureTrending.json @@ -0,0 +1,80 @@ +{ + "qc": { + "config": { + "database": { + "implementation": "CCDB", + "host": "ccdb-test.cern.ch:8080", + "username": "not_applicable", + "password": "not_applicable", + "name": "not_applicable" + }, + "Activity": { + "number": "", + "type": "", + "start": "", + "end": "" + }, + "monitoring": { + "url": "infologger:///debug?qc" + }, + "consul": { + "url": "" + }, + "conditionDB": { + "url": "ccdb-test.cern.ch:8080" + }, + "postprocessing": { + "periodSeconds": "10" + } + }, + "postprocessing": { + "AtmosPressure": { + "active": "true", + "resumeTrend": "false", + "className": "o2::quality_control::postprocessing::TrendingTask", + "moduleName": "QualityControl", + "detectorName": "TPC", + "producePlotsOnUpdate": "true", + "dataSources": [ + { + "type": "condition", + "path": "GLO/Config/", + "names": [ "EnvVars" ], + "reductorName": "o2::quality_control_modules::tpc::AtmosPressureReductor", + "moduleName": "QcTPC" + } + ], + "plots": [ + { + "name": "atmosPressure1_Trending", + "title": "Trend of atmospheric pressure 1 over time", + "varexp": "EnvVars.pressure1:time", + "selection": "", + "option": "*L", + "graphAxisLabel": "atmos. Pressure:time", + "graphErrors": "EnvVars.errPressure1:0" + }, + { + "name": "atmosPressure2_Trending", + "title": "Trend of atmospheric pressure 2 over time", + "varexp": "EnvVars.pressure2:time", + "selection": "", + "option": "*L", + "graphAxisLabel": "atmos. Pressure:time", + "graphErrors": "EnvVars.errPressure2:0" + } + ], + "initTrigger": [ + "userorcontrol" + ], + "updateTrigger": [ + "foreachlatest:ccdb:GLO/Config/EnvVars/" + ], + "stopTrigger": [ + "userorcontrol" + ] + } + } + } + } + \ No newline at end of file diff --git a/Modules/TPC/src/AtmosPressureReductor.cxx b/Modules/TPC/src/AtmosPressureReductor.cxx index acd4132b8..4f7da87d9 100644 --- a/Modules/TPC/src/AtmosPressureReductor.cxx +++ b/Modules/TPC/src/AtmosPressureReductor.cxx @@ -38,16 +38,16 @@ bool AtmosPressureReductor::update(ConditionRetriever& retriever) // pressure 1 for (const auto& [time, p] : env->mEnvVars["CavernAtmosPressure"]) { - pressureValues.push_back(p); + pressureValues.emplace_back(p); } - calcMeanAndStddev(pressureValues, mStats.pressure1, mStats.errPressure1); + //calcMeanAndStddev(pressureValues, mStats.pressure1, mStats.errPressure1); pressureValues.clear(); // pressure 2 for (const auto& [time, p] : env->mEnvVars["CavernAtmosPressure2"]) { - pressureValues.push_back(p); + pressureValues.emplace_back(p); } - calcMeanAndStddev(pressureValues, mStats.pressure2, mStats.errPressure2); + //calcMeanAndStddev(pressureValues, mStats.pressure2, mStats.errPressure2); return true; } return false;