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

Definition at line 1732 of file FactGui.h.

References FTM::DimTriggerRates::fBoardRate, FTM::DimTriggerRates::fPatchRate, FTM::DimTriggerRates::fTimeStamp, i, and Set().

1733  {
1734 #ifdef HAVE_ROOT
1735  if (fTimeStamp0<0)
1736  {
1737  fTimeStamp0 = sdata.fTimeStamp;
1738  return;
1739  }
1740 
1741  TCanvas *c = fFtmRateCanv->GetCanvas();
1742 
1743  TH1 *h = (TH1*)c->FindObject("TimeFrame");
1744 
1745  const double tdiff = sdata.fTimeStamp-fTimeStamp0;
1746  fTimeStamp0 = sdata.fTimeStamp;
1747 
1748  if (tdiff<0)
1749  {
1750  for (int i=0; i<160; i++)
1751  fGraphPatchRate[i].Set(0);
1752  for (int i=0; i<40; i++)
1753  fGraphBoardRate[i].Set(0);
1754 
1755  return;
1756  }
1757 
1758  //const double t1 = h->GetXaxis()->GetXmax();
1759  const double t0 = h->GetXaxis()->GetXmin();
1760 
1761  for (int i=0; i<160; i++)
1762  if (fFtuStatus[i/4]>0)
1763  fGraphPatchRate[i].SetPoint(fGraphPatchRate[i].GetN(),
1764  t0+sdata.fTimeStamp/1000000., sdata.fPatchRate[i]);
1765  for (int i=0; i<40; i++)
1766  if (fFtuStatus[i]>0)
1767  fGraphBoardRate[i].SetPoint(fGraphBoardRate[i].GetN(),
1768  t0+sdata.fTimeStamp/1000000., sdata.fBoardRate[i]);
1769 
1770  c->Modified();
1771  c->Update();
1772 #endif
1773  }
TGraph fGraphPatchRate[160]
Definition: FactGui.h:3540
int i
Definition: db_dim_client.c:21
float fBoardRate[40]
Definition: HeadersFTM.h:589
bool Set(bool &rc, const QString &value)
TGraph fGraphBoardRate[40]
Definition: FactGui.h:3541
valarray< int8_t > fFtuStatus
Definition: FactGui.h:71
int64_t fTimeStamp0
Definition: FactGui.h:1725
float fPatchRate[160]
Definition: HeadersFTM.h:590

+ Here is the call graph for this function: