Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8999)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 9000)
@@ -72,4 +72,11 @@
    * mraw/RawLinkDef.h, mraw/Makefile:
      - removed MRawSocketRead
+
+   * mpointing/MHSrcPosCam.[h,cc]:
+     - fixed ouput in case a container is not found
+     - made it work for monte carlos, too
+     - use weight when filling histogram
+     - changed circle line styles
+     - changed default in constructor to wobble=kTRUE
 
 
Index: /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 8999)
+++ /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 9000)
@@ -89,11 +89,4 @@
 Bool_t MHSrcPosCam::SetupFill(const MParList *pl)
 {
-    fTimeEffOn = (MTime*)pl->FindObject("MTimeEffectiveOnTime");
-    if (!fTimeEffOn)
-    {
-        *fLog << err << "ERROR - MTimeEffOnTime not found... aborting." << endl;
-        return kFALSE;
-    }
-
     MGeomCam *geom = (MGeomCam*)pl->FindObject("MGeomCam");
     if (!geom)
@@ -103,6 +96,13 @@
     }
 
+    fTimeEffOn = (MTime*)      pl->FindObject("MTimeEffectiveOnTime");
     fEffOnTime = (MParameterD*)pl->FindObject("MEffectiveOnTime");
-    if (!fEffOnTime)
+
+    if (!fTimeEffOn && fEffOnTime)
+    {
+        *fLog << err << "ERROR - MTimeEffOnTime not found... aborting." << endl;
+        return kFALSE;
+    }
+    if (!fEffOnTime && fTimeEffOn)
     {
         *fLog << err << "ERROR - MEffectiveOnTime not found... aborting." << endl;
@@ -110,18 +110,17 @@
     }
 
-    MPointingPos *pos = (MPointingPos*)pl->FindObject("MSourcePos", "MPointingPos");
-    if (!pos)
-    {
-        *fLog << warn << "ERROR - MSourcePos not found... aborting." << endl;
-        return kFALSE;
-    }
-
-    const TString src = pos->GetString("radec");
+    if (!fEffOnTime && !fTimeEffOn)
+        *fLog << inf << "Neither MTimeEffOnTime nor MEffectiveOnTime found... assuming MC." << endl;
+    else
+        fTimeLastEffOn = MTime();
+
+    const MPointingPos *pos = (MPointingPos*)pl->FindObject("MSourcePos", "MPointingPos");
+
+    const TString src = pos ? pos->GetString("radec") : "MonteCarlo";
     fHist.SetTitle(MString::Format("SrcPos distribution in camera: %s", src.Data()));
 
     fHist.Reset();
-    fTimeLastEffOn = MTime();
-    fConvMm2Deg    = geom->GetConvMm2Deg();
-    fNum           = 0;
+    fConvMm2Deg = geom->GetConvMm2Deg();
+    fNum        = 0;
 
     return kTRUE;
@@ -145,4 +144,11 @@
     }
 
+    if (!fEffOnTime)
+    {
+        const TVector2 v(cam->GetXY()*fConvMm2Deg);
+        fHist.Fill(v.X(), v.Y(), w);
+        return kTRUE;
+    }
+
     // Increase array size if necessary
     if (fNum==fPositions.GetSize())
@@ -167,5 +173,5 @@
     {
         const TVector2 &v = (TVector2&)*fPositions[i];
-        fHist.Fill(v.X(), v.Y(), scale);
+        fHist.Fill(v.X(), v.Y(), scale*w);
     }
 
@@ -205,9 +211,14 @@
     if (fHist.GetXaxis()->GetXmax()>0.5)
     {
+        // Typical wobble distance +/- 1 shaftencoder step
         TEllipse el;
         el.SetFillStyle(4000);
-        el.SetLineColor(kMagenta);
+        el.SetLineColor(kBlack);
+        el.SetLineStyle(kDashed);
         el.DrawEllipse(0, 0, 0.4, 0, 0, 360, 0);
-    }
-}
-
+        el.SetLineColor(17);
+        el.DrawEllipse(0, 0, 0.4-0.022, 0, 0, 360, 0);
+        el.DrawEllipse(0, 0, 0.4+0.022, 0, 0, 360, 0);
+    }
+}
+
Index: /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h	(revision 8999)
+++ /trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h	(revision 9000)
@@ -37,5 +37,5 @@
 
 public:
-    MHSrcPosCam(Bool_t wobble=kFALSE, const char *name=NULL, const char *title=NULL);
+    MHSrcPosCam(Bool_t wobble=kTRUE, const char *name=NULL, const char *title=NULL);
 
     // MH
