FACT++  1.0
void TPointGui::LoadStars ( TString  fname = "tpoint.txt")
private

Definition at line 656 of file TPointGui.cc.

References fFileNameStars, fOriginal, Tools::Form(), LoadCollection(), and size.

Referenced by LoadCollection(), ProcessMessage(), and TPointGui().

657 {
658  if (fname.EndsWith(".col"))
659  {
660  LoadCollection(fname);
661  fFileNameStars = fname;
662  SetWindowName(Form("Telesto (%s)", fFileNameStars.Data()));
663  return;
664  }
665 
666  const Int_t size = fOriginal.GetSize();
667 
668  ifstream fin(fname);
669 
670  while (fin && fin.get()!='\n');
671  while (fin && fin.get()!='\n');
672  while (fin && fin.get()!='\n');
673  if (!fin)
674  {
675  cout << "File '" << fname << "' not found!" << endl;
676  return;
677  }
678 
679  TPointStar set(fname);
680 
681  while (1)
682  {
683  fin >> set; // Read data from file [deg], it is stored in [rad]
684  if (!fin)
685  break;
686 
687 // if (set.GetRawZd()>60)
688 // continue;
689 
690  fOriginal.Add(new TPointStar(set));
691  }
692 
693  cout << "Found " << fOriginal.GetSize()-size;
694  cout << " sets of coordinates in " << fname;
695  cout << " (Total=" << fOriginal.GetSize() << ")" << endl;
696 
697  fFileNameStars = fname;
698  SetWindowName(Form("Telesto (%s)", fFileNameStars.Data()));
699 }
void LoadCollection(TString fname)
Definition: TPointGui.cc:624
TList fOriginal
Definition: TPointGui.h:41
std::string Form(const char *fmt,...)
Definition: tools.cc:45
int size
Definition: db_dim_server.c:17
TString fFileNameStars
Definition: TPointGui.h:47

+ Here is the call graph for this function:

+ Here is the caller graph for this function: