Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1951)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1952)
@@ -1,3 +1,70 @@
                                                  -*-*- END OF LINE -*-*-
+
+ 2003/04/12: Thomas Bretz
+
+   * manalysis/MPadding.[h,cc]:
+     - simplified includes
+     - changed some code (discussed with Robert)
+     - fixed comments in header
+     - changed ClassDef to 0
+     - changed output to Mars style
+     - fixed the memory leak of fHSigmabarMax
+     - replaced TRandom by gRandom
+     - removed usage of ->operator
+
+   * manalysis/MApplyPadding.[h,cc]:
+     - replaced fRnd by gRandom
+     - used MH::SetBinning
+     - use telescope theta instead of theta
+     - removed usage of ->operator
+     - removed PostProcess
+     
+   * manalysis/MPadSchweizer.cc:
+     - fixed outputs in PreProcess
+
+   * manalysis/MSigmabar.[h,cc]:
+     - added Reset member function
+     - usage of memset
+     - don't skip NumPhotons==0 
+     - changes discussed with Robert
+     - small simplifications in loops
+     - some fixes to the output
+
+   * manalysis/MSigmabarCalc.[h,cc]:
+     - fixed outputs
+     - some small simplifications
+     - moved test for theta<120deg to MCT1ReadPreProc
+
+   * mfileio/MCT1ReadPreProc.[h,cc]:
+     - skip events with theta>90deg
+
+   * mhist/MHSigmaPixel.[h,cc]:
+     - fixes to the screen output
+     - simplified usage of MBinning
+
+   * mhist/MHSigmaTheta.[h,cc]:
+     - fixes to the screen output
+     - simplified usage of MBinning
+     - lower cased upper case local variables   
+     - removed DrawClone from Finalize (call from macro or executable)
+
+   * mhist/MHSigmabarTheta.[h,cc]:
+     - fixes to the screen output
+     
+   * mhist/MHStarMap.cc:
+     - added some const qualifiers
+
+   * mhist/MHHadronnes.cc:
+     - removed output of function name in Finalize because this
+       information is already available on the screen.
+
+   * manalysis/MCT1PointingCorrCalc.h:
+     - changed ClassDef to 0
+     - removed empty PostProcess
+     - fixes to the screen output in PreProcess
+     - changed the order of the arguments in the constructor
+       (name, title to the end)
+
+
 
  2003/04/12: Wolfgang Wittek
@@ -8,7 +75,4 @@
    * manalysis/AnalysisLinkDef.h
                Makefile
-
-
- 2003/04/12: Wolfgang Wittek
 
    * mbase/MFilter.h
@@ -21,4 +85,5 @@
      - type of 3rd argument of member function Fill
        changed from 'MF' to 'MFilter'
+
 
 
@@ -49,5 +114,5 @@
 
 
- 2003/04/10: Thomas Bretz
+ 2003/04/10: Thomas Bretz                 
  
    * mbase/MContinue.[h,cc]:
Index: trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc	(revision 1951)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.cc	(revision 1952)
@@ -49,18 +49,13 @@
 // Default constructor.
 //
-MCT1PointingCorrCalc::MCT1PointingCorrCalc(const char *name, const char *title,
-                             const char *srcname)
+MCT1PointingCorrCalc::MCT1PointingCorrCalc(const char *srcname,
+                                           const char *name, const char *title)
+    : fSrcName(srcname)
 {
     fName  = name  ? name  : "MCT1PointingCorrCalc";
     fTitle = title ? title : "Task to do the CT1 pointing correction";
-
-    fSrcName = srcname;
 }
 
 // --------------------------------------------------------------------------
-//
-// 
-// 
-// 
 //
 Bool_t MCT1PointingCorrCalc::PreProcess(MParList *pList)
@@ -78,5 +73,5 @@
     if (!fMcEvt)
     {
-        *fLog << dbginf << "MMcEvt not found... aborting." << endl;
+        *fLog << err << "MMcEvt not found... aborting." << endl;
         return kFALSE;
     }
@@ -85,5 +80,5 @@
     if (!fHourAngle)
     {
-        *fLog << dbginf << "HourAngle not found... aborting." << endl;
+        *fLog << err << "HourAngle [MParameterD] not found... aborting." << endl;
         return kFALSE;
     }
@@ -93,5 +88,5 @@
     if (!fSrcPos)
     {
-        *fLog << err << dbginf << fSrcName << " [MSrcPosCam] not found... aborting." << endl;
+        *fLog << err << fSrcName << " [MSrcPosCam] not found... aborting." << endl;
         return kFALSE;
     }
@@ -135,17 +130,3 @@
    return kTRUE;
 }
-// --------------------------------------------------------------------------
-//
-//  
-//
-Bool_t MCT1PointingCorrCalc::PostProcess()
-{
-    return kTRUE;
-}
-//============================================================================
 
-
-
-
-
-
Index: trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.h	(revision 1951)
+++ trunk/MagicSoft/Mars/manalysis/MCT1PointingCorrCalc.h	(revision 1952)
@@ -30,12 +30,11 @@
 
 public:
-    MCT1PointingCorrCalc(const char *name=NULL, const char *title=NULL,
-                         const char *srcname="MSrcPosCam");
+    MCT1PointingCorrCalc(const char *srcname="MSrcPosCam",
+                         const char *name=NULL, const char *title=NULL);
 
     Bool_t PreProcess(MParList *pList);
     Bool_t Process();
-    Bool_t PostProcess();
 
-    ClassDef(MCT1PointingCorrCalc, 1)   // Task to do the CT1 pointing correction for Mkn421 2001 data
+    ClassDef(MCT1PointingCorrCalc, 0)   // Task to do the CT1 pointing correction for Mkn421 2001 data
 };
 
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1951)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1952)
@@ -708,5 +708,5 @@
     //  look for the HourAngle container in the plist
     //
-    fHourAngle = (MParameterD*)pList->FindCreateObj("MParameterD","HourAngle");
+    fHourAngle = (MParameterD*)pList->FindCreateObj("MParameterD", "HourAngle");
     if (!fHourAngle)
         return kFALSE;
@@ -716,5 +716,5 @@
     //  look for the ThetaOrig container in the plist
     //
-    fThetaOrig = (MParameterD*)pList->FindCreateObj("MParameterD","ThetaOrig");
+    fThetaOrig = (MParameterD*)pList->FindCreateObj("MParameterD", "ThetaOrig");
     if (!fThetaOrig)
         return kFALSE;
@@ -826,5 +826,5 @@
 // Mars structures and data members
 //
-void MCT1ReadPreProc::ProcessEvent(const struct eventrecord &event)
+Bool_t MCT1ReadPreProc::ProcessEvent(const struct eventrecord &event)
 {
     /*
@@ -912,6 +912,6 @@
     fThetaOrig->SetVal(theta);
 
-    //*fLog << "Theta, smearedTheta = " << theta << ",  " << SmearTheta(theta)
-    //      << endl;
+    if (theta>TMath::Pi()/2)
+        return kCONTINUE;
 
     // store hour angle
@@ -959,4 +959,6 @@
     fMcTrig->SetReadyToSave();
     fMcEvt->SetReadyToSave();
+
+    return kTRUE;
 }
 
@@ -1085,5 +1087,11 @@
     fIn->read((Byte_t*)&event, sizeof(struct eventrecord));
 
-    ProcessEvent(event);
+    switch (ProcessEvent(event))
+    {
+    case kFALSE:
+        return kFALSE;
+    case kCONTINUE:
+        return kCONTINUE;
+    }
 
     fNumEvents++;
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1951)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1952)
@@ -68,5 +68,5 @@
     Bool_t CheckFilePosition();
     void   ProcessRunHeader(const struct outputpars &outpars);
-    void   ProcessEvent(const struct eventrecord &event);
+    Bool_t ProcessEvent(const struct eventrecord &event);
 
     Double_t SmearTheta(Double_t theta);
Index: trunk/MagicSoft/Mars/mhist/MHHadronness.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1951)
+++ trunk/MagicSoft/Mars/mhist/MHHadronness.cc	(revision 1952)
@@ -251,11 +251,10 @@
     const Stat_t sump = fPhness->Integral();
 
-    *fLog << inf << "MHHadronness::Finalize - Sum Hadronness: gammas=" << sumg << " hadrons=" << sump << endl;
+    *fLog << inf << "Sum Hadronness: gammas=" << sumg << " hadrons=" << sump << endl;
 
     if (sumg==0 )
-        *fLog << warn << "MHHadronness::Finalize: Cannot calculate hadronness for 'gammas'." << endl;
+        *fLog << warn << "Cannot calculate hadronness for 'gammas'." << endl;
     if (sump==0)
-        *fLog << warn << "MHHadronness::Finalize: Cannot calculate hadronness for 'hadrons'." << endl;
-
+        *fLog << warn << "Cannot calculate hadronness for 'hadrons'." << endl;
 
     // Normalize photon distribution
