FACT++  1.0
void FactGui::UpdateTriggerRate ( const FTM::DimTriggerRates sdata)
inlineprivate

Definition at line 1657 of file FactGui.h.

References FTM::DimTriggerRates::fTimeStamp, FTM::DimTriggerRates::fTriggerRate, and Time::RootTime().

1658  {
1659 #ifdef HAVE_ROOT
1660  TCanvas *c = fFtmRateCanv->GetCanvas();
1661 
1662  TH1 *h = (TH1*)c->FindObject("TimeFrame");
1663 
1664  if (sdata.fTimeStamp<=fTriggerRates.fTimeStamp)
1665  {
1666  fGraphFtmRate.Set(0);
1667 
1668  const double tm = Time().RootTime();
1669 
1670  h->SetBins(1, tm, tm+60);
1671  h->GetXaxis()->SetTimeFormat("%M'%S\"%F1995-01-01 00:00:00 GMT");
1672  h->GetXaxis()->SetTitle("Time");
1673 
1674  c->Modified();
1675  c->Update();
1676  return;
1677  }
1678 
1679  const double t1 = h->GetXaxis()->GetXmax();
1680  const double t0 = h->GetXaxis()->GetXmin();
1681 
1682  const double now = t0+sdata.fTimeStamp/1000000.;
1683 
1684  h->SetBins(h->GetNbinsX()+1, t0, now+1);
1685  fGraphFtmRate.SetPoint(fGraphFtmRate.GetN(), now, sdata.fTriggerRate);
1686 
1687  if (t1-t0>300)
1688  {
1689  h->GetXaxis()->SetTimeFormat("%Hh%M'%F1995-01-01 00:00:00 GMT");
1690  h->GetXaxis()->SetTitle("Time");
1691  }
1692 
1693  h->SetMinimum(0);
1694 
1695  c->Modified();
1696  c->Update();
1697 #endif
1698  }
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
FTM::DimTriggerRates fTriggerRates
Definition: FactGui.h:1655
double RootTime() const
Definition: Time.cc:222
TGraph fGraphFtmRate
Definition: FactGui.h:3539

+ Here is the call graph for this function: