FACT++  1.0
void TPointGui::DrawHorizon ( TVirtualPad *  pad,
const char *  fname = "drive/horizon.dat" 
) const
private

Definition at line 550 of file TPointGui.cc.

Referenced by Fit().

551 {
552  TView *view = pad->GetView();
553 
554  if (!view)
555  {
556  cout << "No View!" << endl;
557  return;
558  }
559 
560  ifstream fin(fname);
561  if (!fin)
562  {
563  cout << "ERROR - " << fname << " not found." << endl;
564  return;
565  }
566 
567  TPolyLine poly;
568  poly.SetLineWidth(2);
569  poly.SetLineColor(12);
570  poly.SetLineStyle(8);
571 
572  while (1)
573  {
574  TString line;
575  line.ReadLine(fin);
576  if (!fin)
577  break;
578 
579  Float_t az, alt;
580  sscanf(line.Data(), "%f %f", &az, &alt);
581 
582  Float_t zd = 90-alt;
583 
584  az *= TMath::DegToRad();
585  zd /= 90;
586 
587  Double_t x[6] = { zd*cos(az), zd*sin(az), 0, 0, 0, 0};
588  view->WCtoNDC(x, x+3);
589  poly.SetNextPoint(-x[3], x[4]);
590  }
591 
592  poly.DrawClone()->SetBit(kCanDelete);
593 
594 }

+ Here is the caller graph for this function: