Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 2416)
@@ -412,5 +412,5 @@
 }
 
-void MCerPhotEvt::DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const
+void MCerPhotEvt::DrawPixelContent(Int_t num) const
 {
     *fLog << warn << "MCerPhotEvt::DrawPixelContent - not available." << endl;
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 2415)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 2416)
@@ -74,5 +74,5 @@
 
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-    void DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const;
+    void DrawPixelContent(Int_t num) const;
 
     ClassDef(MCerPhotEvt, 2)    // class for an event containing cerenkov photons
Index: trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc	(revision 2416)
@@ -195,5 +195,5 @@
 }
 
-void MPedestalCam::DrawPixelContent(Int_t num, TVirtualPad *pad) const
+void MPedestalCam::DrawPixelContent(Int_t num) const
 {
     *fLog << warn << "MPedestalCam::DrawPixelContent - not available." << endl;
Index: trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 2415)
+++ trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 2416)
@@ -36,5 +36,5 @@
 
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-    void DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const;
+    void DrawPixelContent(Int_t num) const;
 
     ClassDef(MPedestalCam, 1)	// Storage Container for all pedestal information of the camera
Index: trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 2416)
@@ -72,4 +72,5 @@
 #include <fstream>          // ofstream, SavePrimitive
 
+#include <TRint.h>          // gApplication, TRint::Class()
 #include <TTime.h>          // TTime
 #include <TFile.h>          // gFile
@@ -370,9 +371,13 @@
     gSystem->ProcessEvents();
 #else
-    if (fDisplay)
-        gSystem->ProcessEvents();
-    else
-        if (fProgress)
-            gClient->ProcessEventsFor(fProgress);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+    {
+        if (fDisplay)
+            gSystem->ProcessEvents();
+        else
+            if (fProgress)
+                gClient->ProcessEventsFor(fProgress);
+    }
 #endif
 
@@ -469,9 +474,13 @@
     {
         fProgress->SetPosition(maxcnt>0 ? TMath::Min(maxcnt, entries) : entries);
+        // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+        if (gApplication->InheritsFrom(TRint::Class()))
+        {
 #if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
-        gSystem->ProcessEvents();
+            gSystem->ProcessEvents();
 #else
-        gClient->ProcessEventsFor(fDisplay ? fDisplay->GetBar() : fProgress);
+            gClient->ProcessEventsFor(fDisplay ? fDisplay->GetBar() : fProgress);
 #endif
+        }
     }
 
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 2416)
@@ -114,4 +114,5 @@
 TObject *MParContainer::Clone(const char *newname) const
 {
+
    MParContainer *named = (MParContainer*)TObject::Clone();
    if (newname && strlen(newname)) named->SetName(newname);
@@ -583,79 +584,2 @@
     return ((TEnv&)env).GetValue(prefix, dflt);
 }
-
-// --------------------------------------------------------------------------
-//
-// DrawTS which is a thread safe version of Draw. Draw
-// are also overwritten to call DrawTS. Please overwrite
-// the TS version of the member function if you want to implement
-// Draw for your class. Classes which overwrites Draw instead
-// should work well, too, except in multithreaded environments like Mona.
-//
-// The static version maybe called dor any TObject. For you class it is
-// called with a pointer to 'this' object.
-//
-void MParContainer::DrawTS(TObject *obj, TVirtualPad *pad, Option_t *option)
-{
-    if (!obj)
-    {
-        gLog << warn << "MParContainer::DrawTS: obj==NULL" << endl;
-        return;
-    }
-
-    if (!pad)
-        pad = gPad;
-
-    // FIXME: Move MH to mbase
-    //if (!pad)
-    //    pad = MakeDefCanvas(this);
-
-    if (!pad)
-    {
-        if (!gROOT->GetMakeDefCanvas())
-            return;
-        (gROOT->GetMakeDefCanvas())();
-        pad = gPad;
-    }
-
-    if (!pad->IsEditable())
-        return;
-
-    obj->SetBit(kMustCleanup);
-
-    pad->GetListOfPrimitives()->Add(obj, option);
-    pad->Modified(kTRUE);
-}
-
-// --------------------------------------------------------------------------
-//
-// DrawCloneTS which is a thread safe version of DrawClone. DrawClone
-// are also overwritten to call DrawCloneTS. Please overwrite
-// the TS version of the member function if you want to implement
-// DrawClone for your class. Classes which overwrites DrawClone instead
-// should work well, too, except in multithreaded environments like Mona
-//
-// The static version maybe called dor any TObject. For you class it is
-// called with a pointer to 'this' object.
-//
-TObject *MParContainer::DrawCloneTS(const TObject *obj, TVirtualPad *pad, Option_t *option)
-{
-    // Draw a clone of this object in the current pad
-    if (!obj)
-        return 0;
-
-    TObject *newobj = obj->Clone();
-    if (!newobj)
-        return 0;
-
-    /*
-     gLog << dbg << "MParConatiner::DrawCloneTS - ";
-     gLog << (int)newobj->InheritsFrom(MParContainer::Class()) << " ";
-     gLog << pad << endl;
-     */
-    if (newobj->InheritsFrom(MParContainer::Class()))
-        ((MParContainer*)newobj)->DrawTS(pad, strlen(option) ? option : obj->GetDrawOption());
-    else
-        DrawTS(newobj, pad, strlen(option) ? option : obj->GetDrawOption());
-
-    return newobj;
-}
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 2416)
@@ -129,21 +129,4 @@
     const char *GetEnvValue(const TEnv &env, TString prefix, const char *dflt) const;
 
-    static  void DrawTS(TObject *obj, TVirtualPad *pad=NULL, Option_t *option="");
-    virtual void DrawTS(TVirtualPad *pad=NULL, Option_t *option="")
-    {
-        DrawTS(this, pad, option);
-    }
-    void Draw(Option_t *option="") { DrawTS(NULL, option); }
-
-    static  TObject *DrawCloneTS(const TObject *obj, TVirtualPad *pad=NULL, Option_t *option="");
-    virtual TObject *DrawCloneTS(TVirtualPad *pad=NULL, Option_t *option="") const
-    {
-        return DrawCloneTS(this, pad, option);
-    }
-    TObject *DrawClone(Option_t *option="") const
-    {
-        return DrawCloneTS(NULL, option);
-    }
-
     ClassDef(MParContainer, 0)  //The basis for all parameter containers
 };
Index: trunk/MagicSoft/Mars/mhist/MFillH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 2416)
@@ -324,7 +324,4 @@
     const Ssiz_t length = last-first-1;
 
-    //
-    // Make a copy before stripping leading and trailing White Spaces.
-    //
     TString strip = fHName(first+1, length);
     return strip.Strip(TString::kBoth);
@@ -343,36 +340,12 @@
         return kTRUE;
 
+    if (!fH->OverwritesDraw())
+        return kTRUE;
+
     if (TestBit(kDoNotDisplay))
         return kTRUE;
 
-    const Bool_t dr = fH->OverwritesDraw();
-    const Bool_t ts = fH->OverwritesDraw(NULL, "TS");
-    if (!dr && !ts)
-        return kTRUE;
-
-    if (!ts)
-    {
-        *fLog << warn << "You overwrote " << fH->ClassName() << "::";
-        *fLog << "Draw instead of " << fH->ClassName() << "::DrawTS" << endl;
-        *fLog << "This is not thread safe and might result in trouble using" << endl;
-        *fLog << "multithreaded programs like MONA." << endl;
-        *fLog << "" << endl;
-        return kTRUE;
-    }
-
     fCanvas = &fDisplay->AddTab(fH->GetName());
-    fH->DrawTS(fCanvas);
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-//
-Bool_t MFillH::DrawCloneToDisplay()
-{
-    fH->DrawCloneTS(fCanvas);
-    fCanvas->Modified();
-    fCanvas->Update();
+    fH->Draw();
 
     return kTRUE;
@@ -533,5 +506,10 @@
     //
     if (fDisplay && fDisplay->HasCanvas(fCanvas))
-        DrawCloneToDisplay();
+    {
+        fCanvas->cd();
+        fH->DrawClone("nonew");
+        fCanvas->Modified();
+        fCanvas->Update();
+    }
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mhist/MFillH.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MFillH.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MFillH.h	(revision 2416)
@@ -44,5 +44,4 @@
 
     Bool_t DrawToDisplay();
-    Bool_t DrawCloneToDisplay();
 
 public:
@@ -64,5 +63,4 @@
     Int_t PostProcess();
 
-    MH *GetH() { return fH; }
     TCanvas *GetCanvas() { return fCanvas; }
 
Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2416)
@@ -700,15 +700,12 @@
 // Also layout the two statistic boxes and a legend.
 //
-void MH::DrawSame(TH1 &hist1, TH1 &hist2, const TString title, TVirtualPad *pad)
+void MH::DrawSame(TH1 &hist1, TH1 &hist2, const TString title)
 {
     //
     // Draw first histogram
     //
-    if (!pad)
-        pad = gPad;
-
-    MParContainer::DrawTS(&hist1, pad);
-    pad->SetBorderMode(0);
-    pad->Update();
+    hist1.Draw();
+    gPad->SetBorderMode(0);
+    gPad->Update();
 
     if (hist1.GetEntries()>0 && hist2.GetEntries()>0)
@@ -729,5 +726,5 @@
     }
 
-    TPaveText *t = (TPaveText*)pad->FindObject("title");
+    TPaveText *t = (TPaveText*)gPad->FindObject("title");
     if (t)
     {
@@ -741,6 +738,6 @@
         // (see THistPainter::PaintTitle) title
         //
-        pad->Modified();  // indicates a change
-        pad->Update();    // recreates the original title
+        gPad->Modified();  // indicates a change
+        gPad->Update();    // recreates the original title
         t->Pop();          // bring our title on top
     }
@@ -750,5 +747,5 @@
     //
     // Where to get the TPaveStats depends on the root version
-    TPaveStats *s1 = (TPaveStats*)pad->FindObject("stats");
+    TPaveStats *s1 = (TPaveStats*)gPad->FindObject("stats");
     if (!s1)
         s1 = (TPaveStats*)hist1.GetListOfFunctions()->FindObject("stats");
@@ -766,6 +763,6 @@
     // Draw second histogram
     //
-    MParContainer::DrawTS(&hist2, pad, "sames");
-    pad->Update();
+    hist2.Draw("sames");
+    gPad->Update();
 
     //
@@ -773,5 +770,5 @@
     //
     // Where to get the TPaveStats depends on the root version
-    TPaveStats *s2 = (TPaveStats*)pad->FindObject("stats");
+    TPaveStats *s2 = (TPaveStats*)gPad->FindObject("stats");
     if (!s2)
         s2 = (TPaveStats*)hist2.GetListOfFunctions()->FindObject("stats");
@@ -790,5 +787,5 @@
         l.SetBorderSize(s2->GetBorderSize());
         l.SetBit(kCanDelete);
-        MParContainer::DrawTS(&l, pad);
+        l.Draw();
     }
 }
@@ -833,52 +830,20 @@
 // to the present pad. The kCanDelete bit is set for the clone.
 //
-TObject *MH::DrawCloneTS(TVirtualPad *pad, Option_t *opt, Int_t w, Int_t h) const
+TObject *MH::DrawClone(Option_t *opt, Int_t w, Int_t h) const
 {
     TString option(opt);
 
-    //gLog << dbg << "DrawCloneTS: Arg=" << pad << " " << gPad << endl;
-
-    TVirtualPad *p = GetNewPad(option) || pad ? pad : NULL;
-    //gLog << dbg << "DrawCloneTS: nonew&&gpad=" << p << " " << opt << endl;
-    if (!p)
-        p = MakeDefCanvas(this, w, h);
-    else
-    /*{
-        gLog << dbg << "--> Clear" << endl;*/
-        p->Clear();
-    //}
-    //gLog << dbg << "DrawCloneTS: " << p << endl;
-
-    TObject *o = MParContainer::DrawCloneTS(pad, option);
-    o->SetBit(kCanDelete);
-    return o;
-}
-
-/*
-// --------------------------------------------------------------------------
-//
-// If the opt string contains 'nonew' or gPad is not given a new canvas
-// with size w/h is created. Otherwise the object is cloned and drawn
-// to the present pad. The kCanDelete bit is set for the clone.
-//
-TObject *MH::DrawClone(Option_t *opt, Int_t w, Int_t h) const
-{
-    TString option(opt);
-
-    gLog << dbg << "DrawCloneTS: Arg=" << gPad << endl;
-
-    TVirtualPad *p = GetNewPad(option) ? gPad : NULL;
-    gLog << dbg << "DrawCloneTS: nonew&&gpad=" << p << " " << opt << endl;
+    TVirtualPad *p = GetNewPad(option);
     if (!p)
         p = MakeDefCanvas(this, w, h);
     else
         p->Clear();
-    gLog << dbg << "DrawCloneTS: " << p << endl;
-
-    TObject *o = Clone(option);
+
+    gROOT->SetSelectedPad(NULL);
+
+    TObject *o = MParContainer::DrawClone(option);
     o->SetBit(kCanDelete);
     return o;
 }
-*/
 
 // --------------------------------------------------------------------------
@@ -886,5 +851,5 @@
 // Check whether a class inheriting from MH overwrites the Draw function
 //
-Bool_t MH::OverwritesDraw(TClass *cls, const char *ext) const
+Bool_t MH::OverwritesDraw(TClass *cls) const
 {
     if (!cls)
@@ -900,7 +865,5 @@
     // Check whether the class cls overwrites Draw
     //
-    TString name("Draw");
-    name += ext;
-    if (cls->GetMethodAny(name))
+    if (cls->GetMethodAny("Draw"))
         return kTRUE;
 
@@ -912,5 +875,5 @@
     while ((base=(TBaseClass*)NextBase()))
     {
-        if (OverwritesDraw(base->GetClassPointer(), ext))
+        if (OverwritesDraw(base->GetClassPointer()))
             return kTRUE;
     }
Index: trunk/MagicSoft/Mars/mhist/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MH.h	(revision 2416)
@@ -22,5 +22,5 @@
     MH(const char *name=NULL, const char *title=NULL);
 
-    Bool_t OverwritesDraw(TClass *cls=NULL, const char *ext="") const;
+    Bool_t OverwritesDraw(TClass *cls=NULL) const;
 
     virtual Bool_t SetupFill(const MParList *pList) { return kTRUE; }
@@ -64,20 +64,12 @@
 
     static void DrawSameCopy(const TH1 &hist1, const TH1 &hist2, const TString title);
-    static void DrawSame(TH1 &hist1, TH1 &hist2, const TString title, TVirtualPad *pad=NULL);
+    static void DrawSame(TH1 &hist1, TH1 &hist2, const TString title);
 
     TObject *Clone(const char *name="") const;
 
-    TObject *DrawClone(Option_t *opt, Int_t w, Int_t h) const
-    {
-        return MH::DrawCloneTS(NULL, opt, 625, 440);
-    }
+    TObject *DrawClone(Option_t *opt, Int_t w, Int_t h) const;
     TObject *DrawClone(Option_t *opt="") const
     {
-        return MH::DrawCloneTS(NULL, opt, 625, 440);
-    }
-    TObject *DrawCloneTS(TVirtualPad *pad, Option_t *opt, Int_t w, Int_t h) const;
-    TObject *DrawCloneTS(TVirtualPad *pad=NULL, Option_t *opt="") const
-    {
-        return MH::DrawCloneTS(pad, opt, 625, 440);
+        return MH::DrawClone(opt, 625, 440);
     }
 
Index: trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 2416)
@@ -137,9 +137,5 @@
 }
 
-// --------------------------------------------------------------------------
-//
-// Print pixel indices which value is higher than mean+sigma*rms
-//
-void MHCamEvent::PrintOutliers(Float_t sigma) const
+void MHCamEvent::PrintOutliers(Float_t s) const
 {
     const Double_t mean = fSum->GetMean();
@@ -153,6 +149,6 @@
             continue;
 
-        if ((*fSum)[i+1]>mean+sigma*rms)
-            *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " > " << sigma << "*rms" << endl;
+        if ((*fSum)[i+1]>mean+s*rms)
+            *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " > " << s << "*rms" << endl;
         // if ((*fSum)[i+1]==0)
         //     *fLog << "Contents of Pixel-Index #" << i << ": " << (*fSum)[i+1] << " == 0" << endl;
@@ -171,30 +167,20 @@
 }
 
-void MHCamEvent::DrawTS(TVirtualPad *p, Option_t *)
+void MHCamEvent::Draw(Option_t *)
 {
-    if (!fSum)
-    {
-        *fLog << warn << "MHCamEvent::Draw - fSum==NULL not initialized." << endl;
-        return;
-    }
-
-    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     pad->SetBorderMode(0);
 
     pad->Divide(1,2);
 
-    p = pad->GetPad(1);
-    p->SetBorderMode(0);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
+    gPad->Divide(1,1);
+    gPad->cd(1);
+    gPad->SetBorderMode(0);
+    fSum->Draw();
 
-    // fSum doesn't derive from MParContainer
-    MParContainer::DrawTS(fSum, p);
-
-    p = pad->GetPad(2);
-    p->SetBorderMode(0);
-
-    // fSum doesn't derive from MParContainer
-    MParContainer::DrawTS(fSum, p, "EPhist");
-
-    // fSum doesn't derive from MParContainer
-    //MParContainer::DrawTS(fSum, pad);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    fSum->Draw("EPhist");
 }
Index: trunk/MagicSoft/Mars/mhist/MHCamEvent.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamEvent.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MHCamEvent.h	(revision 2416)
@@ -32,7 +32,7 @@
     TH1 *GetHistByName(const TString name="");
 
-    void DrawTS(TVirtualPad *pad=NULL, Option_t *o="");
+    void Draw(Option_t *o="");
 
-    void PrintOutliers(Float_t sigma) const;
+    void PrintOutliers(Float_t s) const;
 
     ClassDef(MHCamEvent, 1) // Histogram to sum camera events
Index: trunk/MagicSoft/Mars/mhist/MHCamera.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MHCamera.cc	(revision 2416)
@@ -1135,6 +1135,6 @@
     if (fNotify && fNotify->GetSize()>0)
     {
-        TCanvas *c=new TCanvas;
-        fNotify->ForEach(MCamEvent, DrawPixelContent)(idx, c);
+        new TCanvas;
+        fNotify->ForEach(MCamEvent, DrawPixelContent)(idx);
     }
 }
@@ -1148,4 +1148,4 @@
 {
     gPad=NULL;
-    return TH1D::DrawCopy();
+    return TH1D::DrawCopy(fName+";cpy");
 } 
Index: trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc	(revision 2416)
@@ -171,26 +171,20 @@
 }
 
-void MHTriggerLvl0::DrawTS(TVirtualPad *p=NULL, Option_t * ="")
+void MHTriggerLvl0::Draw(Option_t *)
 {
-    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     pad->SetBorderMode(0);
 
-    //-----------------------------
     pad->Divide(1,2);
 
-    p = pad->GetPad(1);
-    p->SetBorderMode(0);
-    p->Divide(1,1);
-    p->cd(1);
-    p->SetBorderMode(0);
-    // fSum does not derive from MParContainer
-    MParContainer::DrawTS(fSum, p);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
+    gPad->Divide(1,1);
+    gPad->cd(1);
+    gPad->SetBorderMode(0);
+    fSum->Draw();
 
-    p = pad->GetPad(2);
-    p->SetBorderMode(0);
-    // fSum does not derive from MParContainer
-    MParContainer::DrawTS(fSum, p, "EPhist");
-    //-----------------------------
-
-    //MParContainer::DrawTS(fSum, p);
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    fSum->Draw("EPhist");
 }
Index: trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h	(revision 2416)
@@ -34,6 +34,5 @@
     TH1 *GetHistByName(const TString name="");
 
-    //void Draw(Option_t * ="");
-    void DrawTS(TVirtualPad *pad=NULL, Option_t * ="");
+    void Draw(Option_t * ="");
 
     void PrintOutlayers(Float_t s) const;
Index: trunk/MagicSoft/Mars/mimage/MHHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillas.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mimage/MHHillas.cc	(revision 2416)
@@ -278,5 +278,5 @@
     gStyle->SetPalette(50, c);
 }
-/*
+
 // --------------------------------------------------------------------------
 //
@@ -296,5 +296,5 @@
     pad->cd(1);
     gPad->SetBorderMode(0);
-    MH::Draw(*fWidth, *fLength, "Width'n'Length");
+    MH::DrawSame(*fWidth, *fLength, "Width'n'Length");
 
     pad->cd(2);
@@ -323,50 +323,4 @@
     pad->Update();
 }
-*/
-
-// --------------------------------------------------------------------------
-//
-// Creates a new canvas and draws the four histograms into it.
-// Be careful: The histograms belongs to this object and won't get deleted
-// together with the canvas.
-//
-void MHHillas::DrawTS(TVirtualPad *p, Option_t *)
-{
-    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
-    pad->SetBorderMode(0);
-
-    MParContainer::DrawTS(pad);
-
-    pad->Divide(2,3);
-
-    p = pad->GetPad(1);
-    p->SetBorderMode(0);
-    MH::DrawSame(*fWidth, *fLength, "Width'n'Length", p);
-
-    p = pad->GetPad(2);
-    p->SetBorderMode(0);
-    MParContainer::DrawTS(fDistC, p);
-
-    p = pad->GetPad(3);
-    p->SetBorderMode(0);
-    p->SetLogx();
-    MParContainer::DrawTS(fSize, p);
-
-    p = pad->GetPad(4);
-    p->SetBorderMode(0);
-    p->SetPad(0.51, 0.01, 0.99, 0.65);
-    SetColors();
-    MParContainer::DrawTS(fCenter, p, "colz");
-
-    p = pad->GetPad(5);
-    p->SetBorderMode(0);
-    MParContainer::DrawTS(fDelta, p);
-
-    delete pad->GetPad(6);
-
-    pad->Modified();
-    pad->Update();
-}
-
 
 TH1 *MHHillas::GetHistByName(const TString name)
Index: trunk/MagicSoft/Mars/mimage/MHHillas.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillas.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mimage/MHHillas.h	(revision 2416)
@@ -51,6 +51,5 @@
     TH2F *GetHistCenter() { return fCenter; }
 
-    //void Draw(Option_t *opt=NULL);
-    void DrawTS(TVirtualPad *pad=NULL, Option_t *opt=NULL);
+    void Draw(Option_t *opt=NULL);
 
     //Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; }
Index: trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc	(revision 2416)
@@ -198,34 +198,27 @@
 // together with the canvas.
 //
-void MHHillasSrc::DrawTS(TVirtualPad *p, Option_t *)
-{
-    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
+void MHHillasSrc::Draw(Option_t *)
+{
+    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     pad->SetBorderMode(0);
 
-    //
-    // Add this object to the given pad
-    //
-    MParContainer::DrawTS(pad);
+    AppendPad("");
 
     // FIXME: Display Source position
 
-    //
-    // Fill the pad with histograms
-    //
     pad->Divide(2, 2);
 
-    p = pad->GetPad(1);
-    p->SetBorderMode(0);
-    MParContainer::DrawTS(fAlpha, p);
-
-    p = pad->GetPad(2);
-    p->SetBorderMode(0);
-    MParContainer::DrawTS(fDist, p);
-
-    delete pad->GetPad(3);
-
-    p = pad->GetPad(4);
-    p->SetBorderMode(0);
-    MParContainer::DrawTS(fCosDA, p);
+    pad->cd(1);
+    gPad->SetBorderMode(0);
+    fAlpha->Draw();
+
+    pad->cd(2);
+    gPad->SetBorderMode(0);
+    fDist->Draw();
+
+    pad->cd(4);
+    gPad->SetBorderMode(0);
+    //gPad->SetLogy();
+    fCosDA->Draw();
 
     pad->Modified();
Index: trunk/MagicSoft/Mars/mimage/MHHillasSrc.h
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHHillasSrc.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mimage/MHHillasSrc.h	(revision 2416)
@@ -35,6 +35,5 @@
     TH1F *GetHistCosDeltaAlpha() { return fCosDA; }
 
-    //void Draw(Option_t *opt=NULL);
-    void DrawTS(TVirtualPad *pad=NULL, Option_t *opt=NULL);
+    void Draw(Option_t *opt=NULL);
     void Paint(Option_t *opt);
 
Index: trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc	(revision 2416)
@@ -75,4 +75,6 @@
 #include <TObjArray.h>            // TObjArray
 #include <TPostScript.h>          // TPostScript
+
+#include <TRint.h>                // gApplication, TRint::Class()
 #include <TInterpreter.h>         // gInterpreter
 
@@ -374,5 +376,7 @@
 
         // make it visible
-        gClient->ProcessEventsFor(fTab);
+        // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+        if (gApplication->InheritsFrom(TRint::Class()))
+            gClient->ProcessEventsFor(fTab);
     }
 
@@ -470,5 +474,7 @@
         return;
     fStatusBar->SetText(txt, 0);
-    gClient->ProcessEventsFor(fStatusBar);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fStatusBar);
 }
 
@@ -482,5 +488,7 @@
         return;
     fStatusBar->SetText(txt, 1);
-    gClient->ProcessEventsFor(fStatusBar);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fStatusBar);
 }
 
@@ -567,5 +575,7 @@
     MapWindow();
 
-    gSystem->ProcessEvents();
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gSystem->ProcessEvents();
 }
 
@@ -732,5 +742,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Adding Raw Tab '" << name << "' (" << f->GetWidth() << "x";
@@ -784,5 +796,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Adding Tab '" << name << "' (" << f->GetWidth() << "x";
@@ -910,5 +924,7 @@
 
     // display new tab in the main frame
-    gClient->ProcessEventsFor(fTab);
+    // FIXME: This is a workaround, because TApplication::Run is not thread safe against ProcessEvents
+    if (gApplication->InheritsFrom(TRint::Class()))
+        gClient->ProcessEventsFor(fTab);
 
     *fLog << inf << "Removed Tab #" << i << " '" << name << "'" << endl;
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2415)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 2416)
@@ -215,17 +215,9 @@
 //     <index>      The pixel with the given index is drawn
 //
-// Rem: DrawTS is the thread-safe version of Draw. In most cases
-//      you can use Draw instead
-//
-void MRawEvtData::DrawTS(TVirtualPad *pad=NULL, Option_t *opt="")
+void MRawEvtData::Draw(Option_t *opt)
 {
     if (GetNumPixels()==0)
     {
         *fLog << warn << "Sorry, no pixel to draw!" << endl;
-        return;
-    }
-    if (!pad)
-    {
-        *fLog << warn << "MRawEvtData::DrawTS - No pad available..." << endl;
         return;
     }
@@ -246,5 +238,5 @@
     if (!pix.Jump(id))
     {
-        *fLog << warn << "Pixel Idx #" << dec << id << " doesn't exist!" << endl;
+        *fLog << warn << dec << "Pixel Idx #" << id << " doesn't exist!" << endl;
         return;
     }
@@ -275,5 +267,5 @@
 
         graphhi->SetBit(kCanDelete);
-        MParContainer::DrawTS(graphhi, pad, same ? "C*" : "AC*");
+        graphhi->Draw(same ? "C*" : "AC*");
 
         TH1F *histhi = graphhi->GetHistogram();
@@ -294,5 +286,5 @@
 
             graphlo->SetBit(kCanDelete);
-            MParContainer::DrawTS(graphlo, pad, "C*");
+            graphlo->Draw("C*");
 
             TH1F *histlo = graphlo->GetHistogram();
@@ -308,6 +300,5 @@
     {
         // FIXME: Add Legend
-        *fLog << inf << "Drawing Histogram of Pixel with Idx #";
-        *fLog << dec << pix.GetPixelId() << endl;
+        *fLog << inf << "Drawing Histogram of Pixel with Idx #" << dec << pix.GetPixelId() << endl;
 
         TH1F *histh = new TH1F(name, "FADC Samples", nh, -0.5, nh-.5);
@@ -318,5 +309,5 @@
             histh->Fill(i, higains[i]);
         histh->SetBit(kCanDelete);
-        MParContainer::DrawTS(histh, pad, same ? "same" : "");
+        histh->Draw(same ? "same" : "");
 
         if (nl>0)
@@ -328,5 +319,5 @@
                 histl->Fill(i, logains[i]);
             histl->SetBit(kCanDelete);
-            MParContainer::DrawTS(histl, pad, "same");
+            histl->Draw("same");
         }
         return;
@@ -543,3 +534,2 @@
     evt.fArraySize       = fArraySize;
 }
-
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 2415)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 2416)
@@ -52,10 +52,5 @@
     void Clear(Option_t * = NULL);
     void Print(Option_t * = NULL) const;
-    void DrawTS(TVirtualPad *pad=NULL, Option_t *option="");
-    void Copy(TObject &named)
-#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
-const
-#endif
-        ;
+    void Draw (Option_t * = NULL);
 
     void DeletePixels(Bool_t flag=kFALSE);
@@ -70,11 +65,16 @@
 
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-    void   DrawPixelContent(Int_t num, TVirtualPad *pad=NULL) const
+    void   DrawPixelContent(Int_t num) const
     {
         TString s("HIST");
         s += num;
-        const_cast<MRawEvtData*>(this)->DrawTS(pad, s);
-        //const_cast<MRawEvtData*>(this)->Draw(s);
+        const_cast<MRawEvtData*>(this)->Draw(s);
     }
+
+    void Copy(TObject &named)
+#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
+        const
+#endif
+        ;
 
     ClassDef(MRawEvtData, 2) //Container to store the raw Event Data
