Skip to content

Commit

Permalink
Add line indicating selected time bin
Browse files Browse the repository at this point in the history
  • Loading branch information
wiechula committed Jan 31, 2025
1 parent c1509f8 commit 71a5dd8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Detectors/TPC/monitor/src/SimpleEventDisplayGUI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,19 @@ void SimpleEventDisplayGUI::drawPadSignal(int event, int x, int y, TObject* o)
if (mCheckShowClusters->IsDown()) {
showClusters(roc, row);
}
const auto padTimeValsName = fmt::format("PadTimeVals{}", type[type.Length() - 1]);
TCanvas* cPadTimeVals = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(padTimeValsName.data());
if (cPadTimeVals) {
h = (TH1D*)gROOT->FindObject(("h" + padTimeValsName).data());
if (h) {
cPadTimeVals->cd();
delete cPadTimeVals->GetListOfPrimitives()->FindObject("TLine");
TLine l;
l.SetLineColor(kRed);
const auto timeBin = mSelTimeBin->GetNumberEntry()->GetIntNumber();
l.DrawLine(timeBin + 0.5, h->GetYaxis()->GetXmin(), timeBin + 0.5, h->GetYaxis()->GetXmax());
}
}
update(Form("%s;%sFFT;PadTimeVals%s;SingleTB", type.Data(), type.Data(), rocType.Data()));
}
// printf("bin=%03d.%03d(%03d)[%05d], name=%s, ROC=%02d content=%.1f, ev: %d\n",row,pad,cpad,chn,h->GetName(), roc, h->GetBinContent(binx,biny), event);
Expand Down

0 comments on commit 71a5dd8

Please sign in to comment.