Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7552)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7553)
@@ -28,4 +28,16 @@
      - added new function IsInitialized()
 
+   * mjtrain/MJTrain*.[h,cc]:
+     - added data members to change RF setup
+
+   * mpointing/MPointingDevCalc.h, mpointing/MPointingPosCalc.h:
+     - added missing AddToBranchList
+
+   * mpointing/MHSrcPosCam.[h,cc]:
+     - added
+
+   * mpointing/Makefile, mpointing/PointingLinkDef.h:
+     - added MHSrcPosCam
+
 
 
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 7552)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 7553)
@@ -115,5 +115,5 @@
 MTask::MTask(const char *name, const char *title)
     : fFilter(NULL), fSerialNumber(0), fIsPreprocessed(kFALSE),
-    fStopwatch(0), fNumExec0(0)
+    fStopwatch(0), fNumExec0(0), fAccelerator(0)
 {
     fName  = name  ? name  : "MTask";
@@ -257,11 +257,12 @@
     //
     const Bool_t exec = fFilter ? fFilter->IsConditionTrue() : kTRUE;
-
     if (!exec)
         return kTRUE;
 
-    fStopwatch->Start(kFALSE);
+    if (!HasAccelerator(kAccDontCount|kAccDontTime))
+        fStopwatch->Start(kFALSE);
     const Int_t rc = Process();
-    fStopwatch->Stop();
+    if (!HasAccelerator(kAccDontTime))
+        fStopwatch->Stop();
 
     return rc;
@@ -428,5 +429,5 @@
     *fLog << all << setfill(' ') << setw(lvl) << " ";
 
-    if (GetCpuTime()>0 && time>0 && GetCpuTime()>=0.001*time)
+    if (GetCpuTime()>0 && time>0 && GetCpuTime()>=0.001*time && !HasAccelerator(kAccDontTime))
         *fLog << Form("%5.1f", GetCpuTime()/time*100) << "% ";
     else
@@ -436,5 +437,10 @@
         *fLog << GetStreamId() << ":";
     *fLog << GetDescriptor() << "\t";
-    *fLog << dec << GetNumExecutions();
+
+    if (HasAccelerator(kAccDontCount))
+        *fLog << "-/-";
+    else
+        *fLog << dec << GetNumExecutions();
+
     if (fFilter)
         *fLog << " <" << fFilter->GetName() << ">";
Index: trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 7553)
+++ trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.cc	(revision 7553)
@@ -0,0 +1,177 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz, 2/2006 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2006
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// MHSrcPosCam
+//
+//
+// FIXME: Use ReInit...
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MHSrcPosCam.h"
+
+#include <TCanvas.h>
+
+#include "MGeomCam.h"
+#include "MSrcPosCam.h"
+#include "MParameters.h"
+#include "MPointingPos.h"
+
+#include "MString.h"
+#include "MBinning.h"
+#include "MParList.h"
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+ClassImp(MHSrcPosCam);
+
+using namespace std;
+
+// --------------------------------------------------------------------------
+//
+// Default Constructor
+//
+MHSrcPosCam::MHSrcPosCam(const char *name, const char *title)
+    : fTimeEffOn(NULL), fEffOnTime(NULL), fSourcePos(NULL)
+{
+    //
+    //   set the name and title of this object
+    //
+    fName  = name  ? name  : "MHSrcPosCam";
+    fTitle = title ? title : "Histogram for source position distribution";
+
+    fHist.SetName("SourcePos");
+    fHist.SetTitle("Source position distribution in camera coordinates");
+    fHist.SetXTitle("dx [\\circ]");
+    fHist.SetYTitle("dy [\\circ]");
+    fHist.SetZTitle("T_{eff} [s]");
+    fHist.SetDirectory(NULL);
+    fHist.UseCurrentStyle();
+
+    MBinning bins;
+    bins.SetEdges(51, -0.2499, 0.2499);
+
+    MH::SetBinning(&fHist, &bins, &bins);
+}
+
+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)
+    {
+        *fLog << err << "ERROR - MGeomCam not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fEffOnTime = (MParameterD*)pl->FindObject("MEffectiveOnTime");
+    if (!fEffOnTime)
+    {
+        *fLog << err << "ERROR - MEffectiveOnTime not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    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");
+    fHist.SetTitle(MString::Form("SrcPos distribution in camera: %s", src.Data()));
+
+    fHist.Reset();
+    fXY            = TVector2();
+    fNum           = 0;
+    fTimeLastEffOn = MTime();
+    fConvMm2Deg    = geom->GetConvMm2Deg();
+
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// 
+// 
+Bool_t MHSrcPosCam::Fill(const MParContainer *par, const Stat_t w)
+{
+    const MSrcPosCam *cam = dynamic_cast<const MSrcPosCam*>(par);
+    if (!cam)
+    {
+        *fLog << err << dbginf << "Got no MSrcPosCam as argument of Fill()..." << endl;
+        return kFALSE;
+    }
+
+    fXY += cam->GetXY();
+    fNum++;
+
+    if (fTimeLastEffOn==MTime())
+        fTimeLastEffOn=*fTimeEffOn;
+
+    if (fTimeLastEffOn == *fTimeEffOn)
+        return kTRUE;
+
+    fXY *= fConvMm2Deg/fNum;
+
+    fHist.Fill(fXY.X(), fXY.Y(), fEffOnTime->GetVal());
+
+    fXY            = TVector2();
+    fNum           = 0;
+    fTimeLastEffOn = *fTimeEffOn;
+
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+// 
+// 
+void MHSrcPosCam::Draw(Option_t *)
+{
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
+    pad->SetBorderMode(0);
+
+    AppendPad();
+
+    //pad->Divide(2,2);
+
+    gPad->SetLeftMargin(0.25);
+    gPad->SetRightMargin(0.25);
+
+    gPad->SetGridx();
+    gPad->SetGridy();
+
+    MH::SetPalette("glow1");
+    fHist.Draw("colz");
+}
+
Index: trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h	(revision 7553)
+++ trunk/MagicSoft/Mars/mpointing/MHSrcPosCam.h	(revision 7553)
@@ -0,0 +1,55 @@
+#ifndef MARS_MHSrcPosCam
+#define MARS_MHSrcPosCam
+
+#ifndef MARS_MH
+#include "MH.h"
+#endif
+
+#ifndef MARS_MTime
+#include "MTime.h"
+#endif
+
+#ifndef ROOT_TH2
+#include <TH2.h>
+#endif
+
+#ifndef ROOT_TVector2
+#include <TVector2.h>
+#endif
+
+class MParList;
+class MParameterD;
+class MPointingPos;
+
+class MHSrcPosCam : public MH
+{
+private:
+    TH2D          fHist;           //
+
+private:
+    MTime         fTimeLastEffOn;  //!
+    MTime        *fTimeEffOn;      //!
+    MParameterD  *fEffOnTime;      //!
+    MPointingPos *fSourcePos;      //!
+
+    TVector2      fXY;             //!
+    UInt_t        fNum;            //!
+    Double_t      fConvMm2Deg;     //!
+
+public:
+    MHSrcPosCam(const char *name=NULL, const char *title=NULL);
+
+    // MH
+    Bool_t SetupFill(const MParList *pl);
+    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
+
+    // MHSrcPosCam
+    const TH2D &GetHist() const { return fHist; }
+
+    // TObject
+    void Draw(Option_t *option="");
+
+    ClassDef(MHSrcPosCam, 1) // Histogram for source position distribution
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h	(revision 7552)
+++ trunk/MagicSoft/Mars/mpointing/MPointingDevCalc.h	(revision 7553)
@@ -51,4 +51,6 @@
         fName  = "MPointingDevCalc";
         fTitle = "Task calculating the pointing deviation";
+
+        AddToBranchList("MReportStarguider.*");
     }
 
Index: trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.h	(revision 7552)
+++ trunk/MagicSoft/Mars/mpointing/MPointingPosCalc.h	(revision 7553)
@@ -17,5 +17,5 @@
     MPointingPos *fPosition; //! Output container to store pointing position
 
-    UShort_t fRunType;            //! Run Type to decide where to get pointing position from
+    UShort_t fRunType;       //! Run Type to decide where to get pointing position from
 
     Bool_t ReInit(MParList *plist);
@@ -28,4 +28,7 @@
         fName  = "MPointingPosCalc";
         fTitle = "Task calculating the pointing position";
+
+        AddToBranchList("MReportDrive.*");
+        AddToBranchList("MMcEvt.*");
     }
 
Index: trunk/MagicSoft/Mars/mpointing/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mpointing/Makefile	(revision 7552)
+++ trunk/MagicSoft/Mars/mpointing/Makefile	(revision 7553)
@@ -29,4 +29,5 @@
 	   MPointingPosInterpolate.cc \
            MHPointing.cc \
+	   MHSrcPosCam.cc \
            MSrcPosCam.cc \
            MSrcPosCalc.cc \
Index: trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h	(revision 7552)
+++ trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h	(revision 7553)
@@ -15,4 +15,5 @@
 
 #pragma link C++ class MHPointing+;
+#pragma link C++ class MHSrcPosCam+;
 
 #pragma link C++ class MSrcPosCam+;
