Index: trunk/MagicSoft/Mars/mjobs/MDataSet.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MDataSet.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MDataSet.cc	(revision 6874)
@@ -68,4 +68,5 @@
 
 #include <stdlib.h>
+#include <fstream>
 
 #include <TEnv.h>
@@ -77,6 +78,8 @@
 
 #include "MRead.h"
+#include "MAstro.h"
 #include "MDirIter.h"
 #include "MSequence.h"
+#include "MPointingPos.h"
 
 ClassImp(MDataSet);
@@ -113,4 +116,7 @@
         TString name = env.GetValue(Form("Sequence%08d.File", num[i]), "");
         TString dir  = env.GetValue(Form("Sequence%08d.Dir",  num[i]), "");
+
+        gSystem->ExpandPathName(name);
+        gSystem->ExpandPathName(dir);
 
         if (name.IsNull())
@@ -160,9 +166,10 @@
     Split(str, fNumSequencesOff);
 
-
     ResolveSequences(env, fNumSequencesOn,  fSequencesOn);
     ResolveSequences(env, fNumSequencesOff, fSequencesOff);
 
 
+    fNameSource = env.GetValue("SourceName", "");
+    fCatalog    = env.GetValue("Catalog",    "~/Software/data/magic_favorites.edb");
 
     //Print();
@@ -205,4 +212,7 @@
     gLog << endl;
 
+    gLog << "SourceName: " << fNameSource << endl;
+    gLog << "Catalog:    " << fCatalog << endl;
+
     if (!TString(o).Contains("files", TString::kIgnoreCase))
         return;
@@ -242,4 +252,10 @@
     }
 
+    if (gLog.GetDebugLevel()>4)
+    {
+        gLog << dbg << "Files which are searched:" << endl;
+        files.Print();
+    }
+
     return read.AddFiles(files)>0;
 }
@@ -261,2 +277,96 @@
     return AddSequencesToList(fSequencesOff, read, id, raw);
 }
+
+Bool_t MDataSet::GetSourcePos(MPointingPos &pos) const
+{
+    if (!HasSource())
+        return kFALSE;
+
+    TString catalog(fCatalog);
+    gSystem->ExpandPathName(catalog);
+
+    ifstream fin(catalog);
+    if (!fin)
+    {
+        gLog << err << "Cannot open file " << catalog << ": ";
+        gLog << strerror(errno) << endl;
+        return kFALSE;
+    }
+
+    TString ra,dec,epoch;
+
+    Int_t n = 0;
+    while (1)
+    {
+        TString line;
+        line.ReadLine(fin);
+        if (!fin)
+            break;
+
+        n++;
+        line = line.Strip(TString::kBoth);
+
+        if (!line.BeginsWith(fNameSource))
+            continue;
+
+        // CrabNebula,f|L|K0,5:34:32.0,22:0:52,-1.0,2000
+
+        for (int i=0; i<6; i++)
+        {
+            const Ssiz_t p = line.First(',');
+            if (p<0 && i<5)
+            {
+                gLog << err << "Not enough arguments in line #" << n << endl;
+                return kFALSE;
+            }
+
+            switch (i)
+            {
+            case 0:
+            case 1:
+            case 4:
+                break;
+            case 2:
+                ra = line(0, p);
+                break;
+            case 3:
+                dec = line(0, p);
+                break;
+            case 5:
+                epoch = line;
+                break;
+            }
+            line.Remove(0, p+1);
+        }
+
+        if (line.First(',')>=0)
+        {
+            gLog << err << "Too much arguments in line #" << n << endl;
+            return kFALSE;
+        }
+        break;
+    }
+
+    if (epoch!=(TString)"2000")
+    {
+        gLog << err << "Epoch not 2000... not supported." << endl;
+        return kFALSE;
+    }
+
+    Double_t r,d;
+    if (!MAstro::Coordinate2Angle(ra, r))
+    {
+        gLog << err << "ERROR - Interpreting right ascension: " << ra << endl;
+        return kFALSE;
+    }
+    if (!MAstro::Coordinate2Angle(dec, d))
+    {
+        gLog << err << "ERROR - Interpreting declination: " << dec << endl;
+        return kFALSE;
+    }
+
+    pos.SetSkyPosition(r, d);
+    pos.SetTitle(fNameSource);
+
+    return kTRUE;
+}
Index: trunk/MagicSoft/Mars/mjobs/MDataSet.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MDataSet.h	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MDataSet.h	(revision 6874)
@@ -11,4 +11,5 @@
 
 class MRead;
+class MPointingPos;
 
 class MDataSet : public MParContainer
@@ -23,4 +24,9 @@
     TList fSequencesOff;      // list of names and paths of off-sequences
 
+
+    TString  fNameSource;     // Name of source from catalog
+    TString  fCatalog;        // edb catalog (magic_favourites.edb)
+
+
     void Split(TString &runs, TArrayI &data) const;
     void ResolveSequences(TEnv &env, const TArrayI &num, TList &list) const;
@@ -31,8 +37,19 @@
     MDataSet(const char *fname);
 
-    void Print(Option_t *o="") const;
-
+    // Getter
     Bool_t IsValid() const { return fNumAnalysis!=(UInt_t)-1; }
 
+    UInt_t GetNumSequencesOn() const  { return fNumSequencesOn.GetSize(); }
+    UInt_t GetNumSequencesOff() const { return fNumSequencesOff.GetSize(); }
+
+    Bool_t HasOffSequences() const { return GetNumSequencesOff()>0; }
+
+    UInt_t GetNumAnalysis() const { return fNumAnalysis; }
+    void   SetNumAnalysis(UInt_t num) { fNumAnalysis=num; }
+
+    Bool_t HasSource() const { return !fNameSource.IsNull(); }
+    Bool_t GetSourcePos(MPointingPos &pos) const;
+
+    // Setter
     static Bool_t AddSequencesToList(const TList &list, MRead &read, char *id="I", Bool_t raw=kFALSE);
 
@@ -41,12 +58,6 @@
     Bool_t AddFilesOff(MRead &read, char *id="I", Bool_t raw=kFALSE) const;
 
-    UInt_t GetNumSequencesOn() const  { return fNumSequencesOn.GetSize(); }
-    UInt_t GetNumSequencesOff() const { return fNumSequencesOff.GetSize(); }
-
-    Bool_t HasOffSequences() const { return GetNumSequencesOff()>0; }
-
-    // Getter
-    UInt_t GetNumAnalysis() const { return fNumAnalysis; }
-    void   SetNumAnalysis(UInt_t num) { fNumAnalysis=num; }
+    // TObject
+    void Print(Option_t *o="") const;
 
     ClassDef(MDataSet, 0)
Index: trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibTest.cc	(revision 6874)
@@ -330,5 +330,5 @@
             {
                 *fLog << dbg << "Files which are searched:" << endl;
-                iter.Print("all");
+                iter.Print();
             }
           return kFALSE;
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 6874)
@@ -330,5 +330,5 @@
             {
                 *fLog << dbg << "Files which are searched:" << endl;
-                iter.Print("all");
+                iter.Print();
             }
             return kFALSE;
Index: trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibration.cc	(revision 6874)
@@ -1766,5 +1766,5 @@
             {
                 *fLog << dbg << "Files which are searched:" << endl;
-                iter.Print("all");
+                iter.Print();
             }
             return kFALSE;
Index: trunk/MagicSoft/Mars/mjobs/MJCut.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.cc	(revision 6874)
@@ -58,4 +58,5 @@
 #include "MDataSet.h"
 #include "MParameters.h"
+#include "MPointingPos.h"
 #include "MObservatory.h"
 
@@ -70,5 +71,5 @@
 MJCut::MJCut(const char *name, const char *title)
     : fStoreSummary(kFALSE), fStoreResult(kFALSE), fWriteOnly(kFALSE),
-    fEstimateEnergy(0), fCalcHadronness(0)
+    fIsWobble(kFALSE), fEstimateEnergy(0), fCalcHadronness(0)
 {
     fName  = name  ? name  : "MJCut";
@@ -243,4 +244,5 @@
     EnableStorageOfSummary(GetEnv("SummaryFile", fStoreSummary));
     EnableStorageOfResult(GetEnv("ResultFile", fStoreResult));
+    EnableWobbleMode(GetEnv("WobbleMode", fIsWobble));
 
     return kTRUE;
@@ -307,4 +309,14 @@
     MObservatory obs;
     plist.AddToList(&obs);
+
+    // Possible source position (eg. Wobble Mode)
+    MPointingPos source("MSourcePos");
+    if (set.GetSourcePos(source))
+    {
+        plist.AddToList(&source);
+        *fLog << inf << "Using Source Position: " << source.GetTitle() << endl;
+    }
+    else
+        *fLog << inf << "No source position applied..." << endl;
 
     // Initialize default binnings
@@ -323,4 +335,6 @@
     MAlphaFitter fit;
     plist.AddToList(&fit);
+    if (fIsWobble)
+        fit.SetScaleMode(MAlphaFitter::kNone);
 
     MFillH falpha("MHAlphaOff [MHAlpha]", "MHillasSrc", "FillAlpha");
@@ -342,5 +356,8 @@
     readoff.AddTree("Drive");
     readoff.AddTree("EffectiveOnTime");
-    set.AddFilesOff(readoff);
+    if (fIsWobble)
+        set.AddFilesOn(readoff);
+    else
+        set.AddFilesOff(readoff);
 
     const TString path(Form("%s/", fPathOut.Data()));
@@ -375,10 +392,18 @@
     // How to get source position from off- and on-data?
     MSrcPosCalc scalc;
+    if (fIsWobble)
+        scalc.SetWobbleMode(); /********************/
     MHillasCalc hcalc;
+    MHillasCalc hcalc2("MHillasCalcAnti");
     hcalc.SetFlags(MHillasCalc::kCalcHillasSrc);
+    hcalc2.SetFlags(MHillasCalc::kCalcHillasSrc);
+    hcalc2.SetNameHillasSrc("MHillasSrcAnti");
+    hcalc2.SetNameSrcPosCam("MSrcPosAnti");
 
     MTaskList tlist2;
     tlist2.AddToList(&scalc);
     tlist2.AddToList(&hcalc);
+    if (fIsWobble)
+        tlist2.AddToList(&hcalc2);
     tlist2.AddToList(&taskenv1);
     tlist2.AddToList(&taskenv2);
@@ -414,5 +439,5 @@
         return kFALSE;
 
-    if (set.HasOffSequences())
+    if (set.HasOffSequences() || fIsWobble)
     {
         // Execute first analysis
@@ -427,5 +452,5 @@
         if (!evtloop.GetDisplay())
         {
-            *fLog << err << GetDescriptor() << ": Execution stopped by used." << endl;
+            *fLog << err << GetDescriptor() << ": Execution stopped by user." << endl;
             return kFALSE;
         }
@@ -439,10 +464,13 @@
     set.AddFilesOn(readon);
 
+    if (fIsWobble)
+        scalc.SetWobbleMode(kFALSE); /********************/
+
     MFillH fill1b("MHHillasOnPre  [MHHillas]", "MHillas", "FillHillasPre");
     MFillH fill2b("MHHillasOnPost [MHHillas]", "MHillas", "FillHillasPost");
     fill1b.SetNameTab("PreCut");
     fill2b.SetNameTab("PostCut");
-    fill1b.SetDrawOption(set.HasOffSequences()?"same":"");
-    fill2b.SetDrawOption(set.HasOffSequences()?"same":"");
+    fill1b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
+    fill2b.SetDrawOption(set.HasOffSequences()||fIsWobble?"same":"");
 
     MFillH falpha2("MHAlpha", "MHillasSrc", "FillAlpha");
Index: trunk/MagicSoft/Mars/mjobs/MJCut.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCut.h	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJCut.h	(revision 6874)
@@ -16,4 +16,5 @@
     Bool_t  fStoreResult;
     Bool_t  fWriteOnly;
+    Bool_t  fIsWobble;
 
     TString fNameSummary;
@@ -42,4 +43,5 @@
     void EnableStorageOfResult(Bool_t b=kTRUE)   { fStoreResult  = b; } // See SetNameResult
     void EnableWriteOnly(Bool_t b=kTRUE)         { fWriteOnly    = b; }
+    void EnableWobbleMode(Bool_t b=kTRUE)        { fIsWobble     = b; }
 
     void SetNameSummaryFile(const char *name="");
Index: trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 6872)
+++ trunk/MagicSoft/Mars/mjobs/MJPedestal.cc	(revision 6874)
@@ -979,5 +979,5 @@
             {
                 *fLog << dbg << "Files which are searched:" << endl;
-                iter.Print("all");
+                iter.Print();
             }
             return kFALSE;
