Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 4586)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 4587)
@@ -1,3 +1,10 @@
                                                                   -*-*- END -*-*-
+
+ 2004/08/12 - Thomas Bretz
+
+   * tpoint/gui.C:
+     - implemented TGFSFileDialog for reading the star data
+
+
 
  2004/08/05 - Thomas Bretz
Index: trunk/MagicSoft/Cosy/tpoint/gui.C
===================================================================
--- trunk/MagicSoft/Cosy/tpoint/gui.C	(revision 4586)
+++ trunk/MagicSoft/Cosy/tpoint/gui.C	(revision 4587)
@@ -10,4 +10,5 @@
 #include <TGLabel.h>
 #include <TGButton.h>
+#include <TGFileDialog.h>
 
 #include <TF1.h>
@@ -749,9 +750,9 @@
     }
 
-    void LoadStars()
+    void LoadStars(TString fname="tpoint.txt")
     {
         const Int_t size = fOriginal.GetSize();
 
-        ifstream fin("tpoint.txt");
+        ifstream fin(fname);
 
         while (fin && fin.get()!='\n');
@@ -760,5 +761,5 @@
         if (!fin)
         {
-            cout << "File 'tpoint.txt' not found!" << endl;
+            cout << "File '" << fname << "' not found!" << endl;
             return;
         }
@@ -777,4 +778,34 @@
         cout << "Found " << fOriginal.GetSize()-size << " sets of coordinates ";
         cout << "(Total=" << fOriginal.GetSize() << ")" << endl;
+    }
+
+    // --------------------------------------------------------------------------
+    //
+    //  Opens an open dialog
+    //
+    TString OpenDialog()
+    {
+        static const char *gOpenTypes[] =
+        {
+            "TPoint files", "*.txt",
+            "All files",    "*",
+            NULL,           NULL
+        };
+
+        static TString dir(".");
+
+        TGFileInfo fi; // fFileName and fIniDir deleted in ~TGFileInfo
+
+        fi.fFileTypes = (const char**)gOpenTypes;
+        fi.fIniDir    = StrDup(dir);
+
+        new TGFileDialog(fClient->GetRoot(), this, kFDOpen, &fi);
+
+        if (!fi.fFilename)
+            return 0;
+
+        dir = fi.fIniDir;
+
+        return fi.fFilename;
     }
 
@@ -809,5 +840,5 @@
                     return kTRUE;
                 case kTbLoadStars:
-                    LoadStars();
+                    LoadStars(OpenDialog());
                     DisplayData();
                     return kTRUE;
Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4586)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4587)
@@ -20,81 +20,91 @@
                                                  -*-*- END OF LINE -*-*-
 
-    2004/08/12: Hendrik Bartko
-    * msignal/MExtractor.[h,cc]:
-      - add SetNamePedContainer to set the name of the pedestal
-        container
-
-    * msignal/MExtractTime.[h,cc]:
-      - add SetNamePedContainer to set the name of the pedestal
-        container
-
-    * mbadpixels/MBadPixelsCalc.[h,cc]
-      - add SetNamePedPhotContainer to set the name of the pedphot
-        container
-
-    * mbadpixels/MBadPixelsTreat.[h,cc]
-      - add SetNamePedPhotContainer to set the name of the pedphot
-        container
-
-    * mimage/MImgCleanStd.[h,cc]
-      - add SetNamePedPhotContainer to set the name of the pedphot
-        container
+  2004/08/12: Thomas Bretz
+
+   * mreport/MReportFileReadCC.cc:
+     - fixed a bug in CheckFileHeader which caused a condition to
+       be wrongly evaluated
+
+
+
+  2004/08/12: Hendrik Bartko
+
+   * msignal/MExtractor.[h,cc]:
+     - add SetNamePedContainer to set the name of the pedestal
+       container
+
+   * msignal/MExtractTime.[h,cc]:
+     - add SetNamePedContainer to set the name of the pedestal
+       container
+
+   * mbadpixels/MBadPixelsCalc.[h,cc]
+     - add SetNamePedPhotContainer to set the name of the pedphot
+       container
+
+   * mbadpixels/MBadPixelsTreat.[h,cc]
+     - add SetNamePedPhotContainer to set the name of the pedphot
+       container
+
+   * mimage/MImgCleanStd.[h,cc]
+     - add SetNamePedPhotContainer to set the name of the pedphot
+       container
+
 
 
   2004/08/12 : Wolfgang Wittek
 
-    * manalysis/MSourcPosFromStarPos.[h,cc]
-      - replace MMcEvt by MPointingPos
-
-    * manalysis/MSigmabarCalc.[h,cc]
-      - replace MMcEvt by MPointingPos
-
-    * manalysis/MSigmabar.[h,cc]
-      - in member function Calc() return fSigmabarInner,
-        not fSigmabar
-      - update comments
-      - sigmabar is the sqrt of the average (pedRMS^2/area)
-
-    * manalysis/MPad.[h,cc]
-      - replace MMcEvt by MPointingPos
-      - remove bugs
-
-    * mfilter/MFSelBasic.[h,cc]
-      - replace MMcEvt by MPointingPos
-
-    * mfilter/Makefile
-      - add -I../mpointing
-
-
-    * mhist/MHSigmaTheta.[h,cc]
-      - replace MMcEvt by MPointingPos     
-      - replace 'MCerPhotPix cerpix' by 'MCerPhotPix &cerpix'
-      - add plot "Sigmabar(Outer) versus Theta"
-
-    * macros/ONOFFAnalysis.C
-      - Job A : got the padding working, work in progress
-
-
-  2004/08/11: Hendrik Bartko
-  * mcalib/MCalibrateData.[h,cc]:
-    - add SetPedestalType to choose whether to calibrate the pedestal 
-      for each run or each event
-    - add EnablePedestalType to enable to calibrate the pedestal for 
-      each run or each event
-    - add DisablePedestalType to disable to calibrate the pedestal for 
-      each run or each event
-    - add TestFlag test whether to do the run and / or event pedestal
-      calculation
-    - add SetNamePedADCRunContainer to change name of pedestal input 
-      container for run pedestals
-    - add SetNamePedADCEventContainer to change name of pedestal input 
-      container for event pedestals
-    - add SetNamePedPhotRunContainer to change name of pedestal output 
-      container for run pedestals
-    - add SetNamePedPhotEventContainer to change name of pedestal output 
-      container for run pedestals
-    - add CalibratePedestal, function to calibrate the chosen pedestal 
-    - added the calibration types kFlatCharge, kDummy as in MCalibrate
-
+   * manalysis/MSourcPosFromStarPos.[h,cc]
+     - replace MMcEvt by MPointingPos
+
+   * manalysis/MSigmabarCalc.[h,cc]
+     - replace MMcEvt by MPointingPos
+
+   * manalysis/MSigmabar.[h,cc]
+     - in member function Calc() return fSigmabarInner,
+       not fSigmabar
+     - update comments
+     - sigmabar is the sqrt of the average (pedRMS^2/area)
+
+   * manalysis/MPad.[h,cc]
+     - replace MMcEvt by MPointingPos
+     - remove bugs
+
+   * mfilter/MFSelBasic.[h,cc]
+     - replace MMcEvt by MPointingPos
+
+   * mfilter/Makefile
+     - add -I../mpointing
+
+   * mhist/MHSigmaTheta.[h,cc]
+     - replace MMcEvt by MPointingPos     
+     - replace 'MCerPhotPix cerpix' by 'MCerPhotPix &cerpix'
+     - add plot "Sigmabar(Outer) versus Theta"
+
+   * macros/ONOFFAnalysis.C
+     - Job A : got the padding working, work in progress
+
+
+
+ 2004/08/11: Hendrik Bartko
+
+   * mcalib/MCalibrateData.[h,cc]:
+     - add SetPedestalType to choose whether to calibrate the pedestal 
+       for each run or each event
+     - add EnablePedestalType to enable to calibrate the pedestal for 
+       each run or each event
+     - add DisablePedestalType to disable to calibrate the pedestal for 
+       each run or each event
+     - add TestFlag test whether to do the run and / or event pedestal
+       calculation
+     - add SetNamePedADCRunContainer to change name of pedestal input 
+       container for run pedestals
+     - add SetNamePedADCEventContainer to change name of pedestal input 
+       container for event pedestals
+     - add SetNamePedPhotRunContainer to change name of pedestal output 
+       container for run pedestals
+     - add SetNamePedPhotEventContainer to change name of pedestal output 
+       container for run pedestals
+     - add CalibratePedestal, function to calibrate the chosen pedestal 
+     - added the calibration types kFlatCharge, kDummy as in MCalibrate
 
    * mbadpixels/MBadPixelsCalc.cc:
@@ -105,5 +115,5 @@
 
 
-  2004/08/10: Thomas Bretz
+ 2004/08/10: Thomas Bretz
 
    * mreport/MReportFileReadCC.[h,cc]:
@@ -156,5 +166,5 @@
 
 
-  2004/08/10: Robert Wagner
+ 2004/08/10: Robert Wagner
 
    * mreport/MReportCamera.[h,cc]
@@ -166,5 +176,5 @@
 
 
-  2004/08/10: Markus Gaug
+ 2004/08/10: Markus Gaug
 
    * mcalib/MCalibrationTestCalc.[h,cc]
@@ -182,5 +192,5 @@
 
 
-  2004/08/10: Florian Goebel
+ 2004/08/10: Florian Goebel
 
    * mpedestal/MPedCalcFromLoGain.[h,cc]
@@ -194,5 +204,5 @@
 
 
-  2004/08/10: Nadia Tonello
+ 2004/08/10: Nadia Tonello
 
    * mbadpixels/MBadPixelsTreat.[h,cc]
Index: trunk/MagicSoft/Mars/mreport/MReportFileReadCC.cc
===================================================================
--- trunk/MagicSoft/Mars/mreport/MReportFileReadCC.cc	(revision 4586)
+++ trunk/MagicSoft/Mars/mreport/MReportFileReadCC.cc	(revision 4587)
@@ -91,5 +91,5 @@
 
     // report file matching a single run
-    if (str(TRegexp("^[CC Run [0-9]+ Control File]$")).IsNull())
+    if (!str(TRegexp("^[CC Run [0-9]+ Control File]$")).IsNull())
         run = atoi(str(TRegexp(" [0-9]+")).Data());
 
