Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 8972)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 8973)
@@ -1,3 +1,10 @@
                                                                   -*-*- END -*-*-
+
+ 2008/06/18 Thomas Bretz
+
+  * telesto.cc, tpoint/TPointGui.[h,cc]:
+     - added option to start with a pointing model
+
+
 
  2008/06/17 Thomas Bretz
Index: trunk/MagicSoft/Cosy/telesto.cc
===================================================================
--- trunk/MagicSoft/Cosy/telesto.cc	(revision 8972)
+++ trunk/MagicSoft/Cosy/telesto.cc	(revision 8973)
@@ -45,8 +45,8 @@
     gLog << all << endl;
     gLog << "Sorry the usage is:" << endl;
-    gLog << " telestop [file.txt|file.col]" << endl << endl;
+    gLog << " telestop [file.txt|file.col [pointing.mod]]" << endl << endl;
     gLog << " Arguments:" << endl;
-    gLog << "   n/a" << endl;
-    gLog << "                             For more details see MSequence" << endl;
+    gLog << "   file.txt|file.col         A collection of files or a file with tpoints" << endl;
+    gLog << "   pointing.mod              A pointing model to load at startup" << endl << endl;
     gLog << " Root Options:" << endl;
     gLog << "   -b                        Batch mode (no graphical output to screen)" << endl<<endl;
@@ -61,19 +61,7 @@
     gLog << "                             (Note, that this option can be used multiple times." << endl;
     gLog << endl;
-//    gLog << " Input Options:" << endl;
-//    gLog << "   -mc                       You must use this for MC files (PRELIMINARY)" << endl << endl;
     gLog << " Output options:" << endl;
 //    gLog << "   -q                        Quit when job is finished" << endl;
 //    gLog << "   -f                        Force overwrite of existing files" << endl;
-//    gLog << "   -ff                       Force execution if not all files found" << endl;
-//    gLog << "   --ind=path                Path where to search for the calibrated data (Y)" << endl;
-//    gLog << "                             [default=standard path in datacenter]" << endl;
-//    gLog << "   --out=path                Path to write the all results to [def=local path]" << endl;
-//    gLog << "                             (overwrites --outc and --outy)" << endl;
-//    gLog << "   --no-muons                Switch off Muon analysis (for fast tests)" << endl;
-//    gLog << "   --print-seq               Print Sequence information" << endl;
-//    gLog << "   --print-files             Print Files taken from Sequence" << endl;
-//    gLog << "   --print-found             Print Files found from Sequence" << endl;
-//    gLog << "   --config=star.rc          Resource file [default=star.rc]" << endl;
     gLog << endl;
     gLog << "   --version, -V             Show startup message with version number" << endl;
@@ -123,5 +111,5 @@
     // check for the right usage of the program (number of arguments)
     //
-    if (arg.GetNumArguments()>1)
+    if (arg.GetNumArguments()>2)
     {
         gLog << warn << "WARNING - Wrong number of arguments..." << endl;
@@ -131,4 +119,5 @@
 
     TString fname=arg.GetArgumentStr(0);
+    TString mod  =arg.GetArgumentStr(1);
 
     //
@@ -156,5 +145,5 @@
         TObject::SetObjectStat(kTRUE);
 
-    TPointGui *gui = new TPointGui(fname.IsNull()?0:(const char*)fname);
+    TPointGui *gui = new TPointGui(fname, mod);
     gui->SetExitLoopOnClose();
 
Index: trunk/MagicSoft/Cosy/tpoint/TPointGui.cc
===================================================================
--- trunk/MagicSoft/Cosy/tpoint/TPointGui.cc	(revision 8972)
+++ trunk/MagicSoft/Cosy/tpoint/TPointGui.cc	(revision 8973)
@@ -33,5 +33,5 @@
 using namespace std;
 
-TPointGui::TPointGui(const char *fname) : TGMainFrame(gClient->GetRoot(), 750, 435, kHorizontalFrame), fExitLoopOnClose(kFALSE),
+TPointGui::TPointGui(const char *fname, const char *mod) : TGMainFrame(gClient->GetRoot(), 750, 435, kHorizontalFrame), fExitLoopOnClose(kFALSE),
    fAzMin(-180), fAzMax(180), fZdMin(0), fZdMax(90), fLimit(0.05)
 {
@@ -274,6 +274,8 @@
     MapWindow();
 
-    if (fname)
+    if (!TString(fname).IsNull())
         LoadStars(fname);
+    if (!TString(mod).IsNull())
+        fBending.Load(mod);
 
     DisplayBending();
@@ -310,6 +312,8 @@
 
         Double_t err = 0.01; // [deg] = 0.25SE
-        Double_t res = set.GetResidual(); //(&err);
+        Double_t res = set.GetResidual();//(&err);
         res /= err;
+
+        cout << err << endl;
 
         f += res*res;
Index: trunk/MagicSoft/Cosy/tpoint/TPointGui.h
===================================================================
--- trunk/MagicSoft/Cosy/tpoint/TPointGui.h	(revision 8972)
+++ trunk/MagicSoft/Cosy/tpoint/TPointGui.h	(revision 8973)
@@ -86,5 +86,5 @@
 
 public:
-    TPointGui(const char *fname=NULL);
+    TPointGui(const char *fname=NULL, const char *mod=NULL);
     ~TPointGui();
 
