|
25 | 25 | #include "Framework/TimingInfo.h" |
26 | 26 | #include "DataFormatsFV0/LookUpTable.h" |
27 | 27 |
|
| 28 | +#include "FITCommon/HelperHist.h" |
| 29 | +#include "FITCommon/HelperCommon.h" |
| 30 | +#include "FITCommon/HelperFIT.h" |
| 31 | + |
28 | 32 | namespace o2::quality_control_modules::fv0 |
29 | 33 | { |
30 | | - |
| 34 | +using namespace o2::quality_control_modules::fit; |
31 | 35 | DigitQcTask::~DigitQcTask() |
32 | 36 | { |
33 | 37 | delete mListHistGarbage; |
@@ -148,6 +152,7 @@ void DigitQcTask::initialize(o2::framework::InitContext& /*ctx*/) |
148 | 152 | { |
149 | 153 | ILOG(Debug, Devel) << "initialize DigitQcTask" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well. |
150 | 154 | mStateLastIR2Ch = {}; |
| 155 | + |
151 | 156 | mMapChTrgNames.insert({ o2::fv0::ChannelData::kNumberADC, "NumberADC" }); |
152 | 157 | mMapChTrgNames.insert({ o2::fv0::ChannelData::kIsDoubleEvent, "IsDoubleEvent" }); |
153 | 158 | mMapChTrgNames.insert({ o2::fv0::ChannelData::kIsTimeInfoNOTvalid, "IsTimeInfoNOTvalid" }); |
@@ -217,23 +222,23 @@ void DigitQcTask::initialize(o2::framework::InitContext& /*ctx*/) |
217 | 222 | mHistPmTcmSumAmpA = std::make_unique<TH2F>("PmTcmSumAmpA", "Comparison of sum of amplitudes A from PM and TCM;Sum of amplitudes(TCM), side A;PM - TCM", 2e2, 0, 1e4, 2e3, -1e3 - 0.5, 1e3 - 0.5); |
218 | 223 | mHistPmTcmAverageTimeA = std::make_unique<TH2F>("PmTcmAverageTimeA", "Comparison of average time A from PM and TCM;Average time(TCM), side A;PM - TCM", 410, -2050, 2050, 820, -410 - 0.5, 410 - 0.5); |
219 | 224 | mHistTriggersSw = std::make_unique<TH1F>("TriggersSoftware", "Triggers from software", mMapDigitTrgNames.size(), 0, mMapDigitTrgNames.size()); |
220 | | - mHistTriggersSoftwareVsTCM = std::make_unique<TH2F>("TriggersSoftwareVsTCM", "Comparison of triggers from software and TCM;;Trigger name", mMapDigitTrgNames.size(), 0, mMapDigitTrgNames.size(), 4, 0, 4); |
221 | | - mHistTriggersSoftwareVsTCM->SetOption("colz"); |
222 | | - mHistTriggersSoftwareVsTCM->SetStats(1); |
| 225 | + |
| 226 | + const auto mapBasicTrgBits = HelperTrgFIT::sMapBasicTrgBitsFV0; |
| 227 | + const std::map<unsigned int, std::string> mapTrgValidationStatus = { |
| 228 | + { TrgComparisonResult::kSWonly, "Sw only" }, |
| 229 | + { TrgComparisonResult::kTCMonly, "TCM only" }, |
| 230 | + { TrgComparisonResult::kNone, "neither TCM nor Sw" }, |
| 231 | + { TrgComparisonResult::kBoth, "both TCM and Sw" } |
| 232 | + }; |
| 233 | + mHistTriggersSoftwareVsTCM = helper::registerHist<TH2F>(getObjectsManager(), "COLZ", "TriggersSoftwareVsTCM", "Comparison of triggers from software and TCM;;Trigger name", mapBasicTrgBits, mapTrgValidationStatus); |
223 | 234 | for (const auto& entry : mMapDigitTrgNames) { |
224 | 235 | mHistOrbitVsTrg->GetYaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
225 | 236 | mHistTriggersCorrelation->GetXaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
226 | 237 | mHistTriggersCorrelation->GetYaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
227 | 238 | mHistBCvsTrg->GetYaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
228 | 239 | mHistTriggersSw->GetXaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
229 | | - mHistTriggersSoftwareVsTCM->GetXaxis()->SetBinLabel(entry.first + 1, entry.second.c_str()); |
230 | 240 | } |
231 | 241 | mHistTriggersSw->GetXaxis()->SetRange(1, 5); |
232 | | - mHistTriggersSoftwareVsTCM->GetXaxis()->SetRange(1, 5); |
233 | | - mHistTriggersSoftwareVsTCM->GetYaxis()->SetBinLabel(TrgComparisonResult::kSWonly + 1, "Sw only"); |
234 | | - mHistTriggersSoftwareVsTCM->GetYaxis()->SetBinLabel(TrgComparisonResult::kTCMonly + 1, "TCM only"); |
235 | | - mHistTriggersSoftwareVsTCM->GetYaxis()->SetBinLabel(TrgComparisonResult::kNone + 1, "neither TCM nor Sw"); |
236 | | - mHistTriggersSoftwareVsTCM->GetYaxis()->SetBinLabel(TrgComparisonResult::kBoth + 1, "both TCM and Sw"); |
237 | 242 |
|
238 | 243 | mListHistGarbage = new TList(); |
239 | 244 | mListHistGarbage->SetOwner(kTRUE); |
@@ -400,8 +405,6 @@ void DigitQcTask::initialize(o2::framework::InitContext& /*ctx*/) |
400 | 405 | getObjectsManager()->setDefaultDrawOptions(mHistPmTcmAverageTimeA.get(), "COLZ"); |
401 | 406 | getObjectsManager()->startPublishing(mHistTriggersCorrelation.get()); |
402 | 407 | getObjectsManager()->setDefaultDrawOptions(mHistTriggersCorrelation.get(), "COLZ"); |
403 | | - getObjectsManager()->startPublishing(mHistTriggersSoftwareVsTCM.get()); |
404 | | - getObjectsManager()->setDefaultDrawOptions(mHistTriggersSoftwareVsTCM.get(), "COLZ"); |
405 | 408 |
|
406 | 409 | for (int i = 0; i < getObjectsManager()->getNumberPublishedObjects(); i++) { |
407 | 410 | TH1* obj = dynamic_cast<TH1*>(getObjectsManager()->getMonitorObject(i)->getObject()); |
|
0 commit comments