Skip to content

Commit

Permalink
protect the case in which there is no input histogram to harvest
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed May 28, 2021
1 parent 04dede8 commit cc9852d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ void SiStripGainsPCLHarvester::gainQualityMonitor(DQMStore::IBooker& ibooker_,

if (Gain != 1.) {
std::vector<MonitorElement*> 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);
Expand Down

0 comments on commit cc9852d

Please sign in to comment.