From cc9852d212e9bb8cbd0cb4567dd8d6f89feb24a6 Mon Sep 17 00:00:00 2001 From: mmusich Date: Fri, 28 May 2021 16:40:17 +0200 Subject: [PATCH] protect the case in which there is no input histogram to harvest --- .../SiStripChannelGain/src/SiStripGainsPCLHarvester.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc index 6537b4e41930f..9d83de340bd53 100644 --- a/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc +++ b/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLHarvester.cc @@ -258,6 +258,9 @@ void SiStripGainsPCLHarvester::gainQualityMonitor(DQMStore::IBooker& ibooker_, if (Gain != 1.) { std::vector charge_histos = APVGain::FetchMonitor(new_charge_histos, DetId, tTopo_); + + if (!Charge_Vs_Index) + continue; TH2S* chvsidx = (Charge_Vs_Index)->getTH2S(); int bin = chvsidx->GetXaxis()->FindBin(Index); TH1D* Proj = chvsidx->ProjectionY("proj", bin, bin);