FACT++  1.0
void FactGui::UpdateRateScan ( uint32_t  th,
const float *  rates 
)
inlineprivate

Definition at line 2331 of file FactGui.h.

References i.

2332  {
2333 #ifdef HAVE_ROOT
2334  TCanvas *c = fRateScanCanv->GetCanvas();
2335 
2336  TH1 *h = (TH1*)c->FindObject("Frame");
2337 
2338  if (fGraphRateScan[0].GetN()==0 || th<fGraphRateScan[0].GetX()[fGraphRateScan[0].GetN()-1])
2339  {
2340  h->SetBins(1, th<10 ? 0 : th-10, th+10);
2341  h->SetMinimum(1);
2342  h->SetMaximum(rates[0]*2);
2343 
2344  for (int i=0; i<201; i++)
2345  {
2346  fGraphRateScan[i].Set(0);
2347  fGraphRateScan[i].SetPoint(fGraphRateScan[i].GetN(), th, rates[i]);
2348  }
2349 
2350  c->SetGrid();
2351  c->SetLogy();
2352 
2353  c->Modified();
2354  c->Update();
2355  return;
2356  }
2357 
2358  const double dac = h->GetXaxis()->GetXmin();
2359  h->SetBins(h->GetNbinsX()+1, dac, th+10);
2360 
2361  for (int i=0; i<201; i++)
2362  fGraphRateScan[i].SetPoint(fGraphRateScan[i].GetN(), th, rates[i]);
2363 
2364  c->Modified();
2365  c->Update();
2366 #endif
2367  }
int i
Definition: db_dim_client.c:21
TGraph fGraphRateScan[201]
Definition: FactGui.h:2329