Changeset 8818 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 01/18/08 17:06:02 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MCaos.cc
r8376 r8818 2 2 3 3 #include <fstream> 4 #include <iomanip>5 4 6 5 #include <TSystem.h> … … 12 11 #include <TCanvas.h> 13 12 13 #include "MLog.h" 14 #include "MLogManip.h" 15 14 16 #include "MTime.h" 17 #include "MPointing.h" 15 18 16 19 #include "Led.h" … … 19 22 #include "FilterLed.h" 20 23 21 #include "coord.h"22 23 24 using namespace std; 24 25 … … 28 29 if (!fin) 29 30 { 30 cout<< "ERROR - Cannot open " << name << endl;31 gLog << err << "ERROR - Cannot open " << name << endl; 31 32 return; 32 33 } … … 34 35 fPositions.Clear(); 35 36 36 cout<< " Reading " << name << ":" << endl;37 cout<< "------------------------------" << endl;37 gLog << all << " Reading " << name << ":" << endl; 38 gLog << inf << "------------------------------" << endl; 38 39 while (1) 39 40 { … … 43 44 break; 44 45 45 cout<< " Led #" << fPositions.GetEntriesFast() << ": ";46 cout<< setw(3) << px << " ";47 cout<< setw(3) << py << " (";48 cout<< setw(3) << ox << ", ";49 cout<< setw(3) << oy << ")" << endl;46 gLog << " Led #" << fPositions.GetEntriesFast() << ": "; 47 gLog << setw(3) << px << " "; 48 gLog << setw(3) << py << " ("; 49 gLog << setw(3) << ox << ", "; 50 gLog << setw(3) << oy << ")" << endl; 50 51 AddPosition(px, py, ox, oy); 51 52 } 52 cout<< "Found " << fPositions.GetEntriesFast() << " leds." << endl;53 gLog << all << "Found " << fPositions.GetEntriesFast() << " leds." << endl; 53 54 } 54 55 … … 74 75 fFile = NULL; 75 76 76 cout << "Error:Cannot open file '" << name << "'" << endl;77 gLog << err << "ERROR - Cannot open file '" << name << "'" << endl; 77 78 } 78 79 … … 87 88 tree->Branch("EvtTime.", &fEvtTime, "fEvtTime/D"); 88 89 89 cout<< "Root file '" << name << "' open." << endl;90 gLog << inf << "Root file '" << name << "' open." << endl; 90 91 } 91 92 … … 102 103 fFile = NULL; 103 104 104 cout<< "Root file closed (n=" << n << ")" << endl;105 gLog << inf << "Root file closed (n=" << n << ")" << endl; 105 106 106 107 if (n<1) 107 108 { 108 109 gSystem->Unlink(name); 109 cout<< "Root file deleted - no entries." << endl;110 gLog << warn << "Root file deleted - no entries." << endl; 110 111 } 111 112 }
Note:
See TracChangeset
for help on using the changeset viewer.