FACT++  1.0
void MCaos::ReadResources ( const char *  name = "leds.txt")

Definition at line 13 of file MCaos.cc.

Referenced by AddPosition(), and MStarguider::MStarguider().

14 {
15  ifstream fin(name);
16  if (!fin)
17  {
18  cout << "ERROR - Cannot open " << name << endl;
19  return;
20  }
21 
22  fPositions.clear();
23 
24  cout << " Reading " << name << ":" << endl;
25  cout << "------------------------------" << endl;
26  while (1)
27  {
28  double px, py, phi;
29  fin >> px >> py >> phi;
30  if (!fin)
31  break;
32 
33  cout << " Led #" << fPositions.size() << ": ";
34  cout << setw(3) << px << " ";
35  cout << setw(3) << py << " (";
36  cout << setw(3) << phi << ")\n";
37  AddPosition(px, py, phi);
38  }
39  cout << "Found " << fPositions.size() << " leds." << endl;
40 }
void AddPosition(float x, float y, float phi)
Definition: MCaos.h:38
std::vector< Led > fPositions
Definition: MCaos.h:11

+ Here is the caller graph for this function: