Skip to content

Commit

Permalink
TPC: AtmosPressure Reductor WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mlesch committed Dec 10, 2024
1 parent 9f91bdb commit 01e7a58
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 4 deletions.
1 change: 1 addition & 0 deletions Modules/TPC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
80 changes: 80 additions & 0 deletions Modules/TPC/run/tpcQCAtmosPressureTrending.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
}

8 changes: 4 additions & 4 deletions Modules/TPC/src/AtmosPressureReductor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 01e7a58

Please sign in to comment.