Skip to content

Commit

Permalink
fix trending and set a default value to thresholds (#2377)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucia Anna Tarasovicova <lucia.anna.husova@cern.ch>
  • Loading branch information
lhusova and Lucia Anna Tarasovicova authored Aug 2, 2024
1 parent a57944a commit 1ad7dd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Modules/CTP/include/CTP/RawDataReaderCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface
void clearIndexVectors();
long int mTimestamp;
float mThreshold = -1; // threshold for BCs
float mThresholdRateBad; // threshold for the relative change in ctp input and class rates
float mThresholdRateMedium; // threshold for the relative change in ctp input and class rates
float mThresholdRateRatioBad; // threshold for the relative change in ctp input and class ratios
float mThresholdRateRatioMedium; // threshold for the relative change in ctp input and class ratios
float mThresholdRateBad = -1; // threshold for the relative change in ctp input and class rates
float mThresholdRateMedium = -1; // threshold for the relative change in ctp input and class rates
float mThresholdRateRatioBad = -1; // threshold for the relative change in ctp input and class ratios
float mThresholdRateRatioMedium = -1; // threshold for the relative change in ctp input and class ratios
bool mFlagRatio = false; // flag that a ratio plot is checked
bool mFlagInput = false; // flag that an input plot is checked
TH1D* mHistInputPrevious = nullptr; // histogram storing ctp input rates from previous cycle
Expand All @@ -73,7 +73,7 @@ class RawDataReaderCheck : public o2::quality_control::checker::CheckInterface
std::bitset<o2::constants::lhc::LHCMaxBunches> mLHCBCs; // LHC filling scheme
const char* ctpinputs[49] = { " T0A", " T0C", " TVX", " TSC", " TCE", " VBA", " VOR", " VIR", " VNC", " VCH", "11", "12", " UCE", "DMC", " USC", " UVX", " U0C", " U0A", "COS", "LAS", "EMC", " PH0", "23", "24", "ZED", "ZNC", "PHL", "PHH", "PHM", "30", "31", "32", "33", "34", "35", "36", "EJ1", "EJ2", "EG1", "EG2", "DJ1", "DG1", "DJ2", "DG2", "45", "46", "47", "48", "49" }; // ctp input names

ClassDefOverride(RawDataReaderCheck, 6);
ClassDefOverride(RawDataReaderCheck, 7);
};

} // namespace o2::quality_control_modules::ctp
Expand Down
10 changes: 5 additions & 5 deletions Modules/CTP/src/CTPTrendingTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void CTPTrendingTask::initCTP(Trigger& t)
std::string run = std::to_string(t.activity.mId);
std::string CCDBHost;
try {
CCDBHost = std::stof(mCustomParameters.at("ccdbName", "default"));
CCDBHost = mCustomParameters.at("ccdbName", "default");
} catch (const std::exception& e) {
CCDBHost = "https://alice-ccdb.cern.ch";
}
Expand Down Expand Up @@ -180,11 +180,11 @@ void CTPTrendingTask::initialize(Trigger t, framework::ServiceRegistryRef servic
void CTPTrendingTask::update(Trigger t, framework::ServiceRegistryRef services)
{
auto& qcdb = services.get<repository::DatabaseInterface>();
if (mCTPconfigFound) {
if (!mCTPconfigFound) {
initCTP(t);
if (mCTPconfigFound) {
return;
}
}
if (!mCTPconfigFound) {
return;
}
trendValues(t, qcdb);
generatePlots();
Expand Down

0 comments on commit 1ad7dd2

Please sign in to comment.