3030#include " MCHMappingInterface/Segmentation.h"
3131#include " MCHMappingInterface/CathodeSegmentation.h"
3232#include " MCHRawElecMap/Mapper.h"
33+ #include " MCHCalibration/PedestalChannel.h"
3334#ifdef MCH_HAS_MAPPING_FACTORY
3435#include " MCHMappingFactory/CreateSegmentation.h"
3536#endif
@@ -303,13 +304,12 @@ void PedestalsTask::PlotPedestalDE(uint16_t solarID, uint8_t dsID, uint8_t chann
303304void PedestalsTask::monitorDataPedestals (o2::framework::ProcessingContext& ctx)
304305{
305306 ILOG (Info, Support) << " Plotting pedestals" << AliceO2::InfoLogger::InfoLogger::endm;
306- using ChannelPedestal = o2::mch::calibration::MCHChannelCalibrator::ChannelPedestal;
307307
308- auto pedestals = ctx.inputs ().get <gsl::span<ChannelPedestal >>(" pedestals" );
308+ auto pedestals = ctx.inputs ().get <gsl::span<o2::mch::calibration::PedestalChannel >>(" pedestals" );
309309 for (auto & p : pedestals) {
310- auto dsChID = p.mDsChId ;
311- double mean = p.mPedMean ;
312- double rms = p.mPedRms ;
310+ auto dsChID = p.dsChannelId ;
311+ double mean = p.mPedestal ;
312+ double rms = p.getRms () ;
313313
314314 auto solarID = dsChID.getSolarId ();
315315 auto dsID = dsChID.getDsId ();
@@ -322,23 +322,19 @@ void PedestalsTask::monitorDataPedestals(o2::framework::ProcessingContext& ctx)
322322void PedestalsTask::monitorDataDigits (o2::framework::ProcessingContext& ctx)
323323{
324324 auto digits = ctx.inputs ().get <gsl::span<o2::mch::calibration::PedestalDigit>>(" digits" );
325- mPedestalProcessor . process (digits);
325+ mPedestalData . fill (digits);
326326
327- auto pedestals = mPedestalProcessor .getPedestals ();
328- for (auto & p : pedestals) {
329- auto & pMat = p.second ;
330- for (size_t dsId = 0 ; dsId < pMat.size (); dsId++) {
331- auto & pRow = pMat[dsId];
332- for (size_t ch = 0 ; ch < pRow.size (); ch++) {
333- auto & pRecord = pRow[ch];
334-
335- if (pRecord.mEntries == 0 ) {
336- continue ;
337- }
327+ for (auto & p : mPedestalData ) {
338328
339- PlotPedestal (p.first , dsId, ch, pRecord. mPedestal , pRecord. getRms ());
340- }
329+ if (p.mEntries == 0 ) {
330+ continue ;
341331 }
332+
333+ PlotPedestal (p.dsChannelId .getSolarId (),
334+ p.dsChannelId .getDsId (),
335+ p.dsChannelId .getChannel (),
336+ p.mPedestal ,
337+ p.getRms ());
342338 }
343339}
344340
@@ -375,7 +371,7 @@ void PedestalsTask::reset()
375371 // clean all the monitor objects here
376372
377373 ILOG (Info, Support) << " Reseting the histogram" << AliceO2::InfoLogger::InfoLogger::endm;
378- mPedestalProcessor .reset ();
374+ mPedestalData .reset ();
379375}
380376
381377} // namespace muonchambers
0 commit comments