Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1031)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1032)
@@ -1,4 +1,7 @@
                                                                   -*-*- END -*-*-
  2001/11/06: Thomas Bretz
+
+   * Makefile.conf.linux, Makefile.conf.linux-gnu:
+     - removed -g flag
 
    * mraw/MRawCrateArray.[h,cc]:
@@ -13,4 +16,5 @@
      - changed so, that the arrays are dreed and allocated only
        as less as possible
+     - removed (by comment) AddPixel
 
    * mraw/MRawFileRead.[h,cc]:
@@ -23,4 +27,20 @@
      - removed '.' from Branch names (each tree contains only one master
        branch with equal subbranches)
+
+   * macros/readCT1.C:
+     - fixed a small bug
+
+   * manalysis/MCerPhotCalc.cc:
+     - removed Clear from Process (done by Reset now)
+
+   * manalysis/MCerPhotEvt.[h,cc]:
+     - added reset-function
+     - some small changes to the code layout
+
+   * mmc/MMcFadcHeader.[h,cc], mmc/MMcTrig.[h,cc]:
+     - chenged constructor to support fName and fTitle
+
+   * mbase/MReadTree.cc:
+     - removes '.' from a branch name now before searching/creating the object
 
 
Index: trunk/MagicSoft/Mars/Makefile.conf.linux
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.linux	(revision 1031)
+++ trunk/MagicSoft/Mars/Makefile.conf.linux	(revision 1032)
@@ -20,6 +20,6 @@
 #
 
-OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
-DEBUG    = -g
+OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
+DEBUG    =
 ARCHDEF  = -D__LINUX__
 
Index: trunk/MagicSoft/Mars/Makefile.conf.linux-gnu
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 1031)
+++ trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 1032)
@@ -21,5 +21,5 @@
 
 OPTIM    = -O2 -Wall -fno-rtti -fno-exceptions -fPIC -Wtraditional -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs 
-DEBUG    = -g
+DEBUG    =
 ARCHDEF  = -D__LINUX__
 
Index: trunk/MagicSoft/Mars/macros/readCT1.C
===================================================================
--- trunk/MagicSoft/Mars/macros/readCT1.C	(revision 1031)
+++ trunk/MagicSoft/Mars/macros/readCT1.C	(revision 1032)
@@ -32,9 +32,9 @@
     MTaskList   tlist;
 
-    plist->AddToList(&geomcam);
-    plist->AddToList(&hillas);
-    plist->AddToList(&tlist);
+    plist.AddToList(&geomcam);
+    plist.AddToList(&hillas);
+    plist.AddToList(&tlist);
 
-    MCT1ReadAscii read("CT1_99_off1.dat");
+    MCT1ReadAscii read("data/CT1_97_off1.dat");
     MImgCleanStd  clean;
     MHillasCalc   hcalc;
@@ -54,6 +54,5 @@
     Int_t icount = 0;
     MCamDisplay display(&geomcam);
-        display.DrawPhotNum(&phevt);
-
+    display.Draw();
 
     while (read.Process())
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1031)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1032)
@@ -62,7 +62,8 @@
 
     AddToBranchList("fHiGainPixId");
-    //AddToBranchList("fLoGainPixId");
+    AddToBranchList("fLoGainPixId");
     AddToBranchList("fHiGainFadcSamples");
-    //AddToBranchList("fLoGainFadcSamples");
+    AddToBranchList("fLoGainFadcSamples");
+
 }
 
@@ -77,5 +78,5 @@
 //  - MCerPhotEvt
 //
-Bool_t MCerPhotCalc::PreProcess( MParList *pList )
+Bool_t MCerPhotCalc::PreProcess(MParList *pList)
 {
     fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
@@ -107,10 +108,9 @@
 Bool_t MCerPhotCalc::Process()
 {
-    fCerPhotEvt->Clear();
-
     MRawEvtPixelIter pixel(fRawEvt);
 
     while (pixel.Next())
     {
+
         const UInt_t pixid = pixel.GetPixelId();
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1031)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1032)
@@ -44,14 +44,13 @@
 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0)
 {
-
-  fName  = name  ? name  : "MCerPhotEvt";
-  fTitle = title ? title : "(Number of Photon)-Event Information";
-  
-  fPixels = new TClonesArray ("MCerPhotPix", 577) ;
-
-  //
-  // FIXME: is this really necessary?
-  //
-  fPixels->Clear();
+    fName  = name  ? name  : "MCerPhotEvt";
+    fTitle = title ? title : "(Number of Photon)-Event Information";
+
+    fPixels = new TClonesArray ("MCerPhotPix", 577);
+
+    //
+    // FIXME: is this really necessary?
+    //
+    Reset();
 }
 
@@ -82,4 +81,6 @@
 {
     // TClonesArray -> 'operator new with placement' should be used
+
+    fPixels->ExpandCreate(fNumPixels);
     new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
 }
@@ -89,8 +90,8 @@
 // reset counter and delete netries in list.
 //
-void MCerPhotEvt::Clear(Option_t *)
+void MCerPhotEvt::Reset()
 {
     fNumPixels = 0;
-    fPixels->Clear();
+//    fPixels->Delete();
 }
 
@@ -108,6 +109,6 @@
         << endl ;
 
-    for (Int_t il=0; il<entries; il++ )
-        (*this)[il].Print();
+    for (Int_t i=0; i<entries; i++ )
+        (*this)[i].Print();
 }
 
@@ -120,7 +121,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        if (id == (*this)[il].GetPixId())
+    for (Int_t i=0; i<entries; i++)
+    {
+        if (id == (*this)[i].GetPixId())
             return kTRUE;
     }
@@ -137,7 +138,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        MCerPhotPix &pix = (*this)[il];
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &pix = (*this)[i];
 
         if (id == pix.GetPixId() && pix.IsPixelUsed())
@@ -156,7 +157,7 @@
     const Int_t entries = fPixels->GetEntries();
 
-    for (Int_t il=0; il<entries; il++)
-    {
-        MCerPhotPix &pix = (*this)[il];
+    for (Int_t i=0; i<entries; i++)
+    {
+        const MCerPhotPix &pix = (*this)[i];
 
         if (id == pix.GetPixId() && pix.IsCorePixel())
@@ -178,8 +179,7 @@
     Float_t minval = (*this)[0].GetNumPhotons();
 
-    Float_t testval;
     for (UInt_t i=1; i<fNumPixels; i++)
     {
-        testval = (*this)[i].GetNumPhotons();
+        const Float_t testval = (*this)[i].GetNumPhotons();
 
         if (testval < minval)
@@ -201,8 +201,7 @@
     Float_t maxval = (*this)[0].GetNumPhotons();
 
-    Float_t testval;
     for (UInt_t i=1; i<fNumPixels; i++)
     {
-        testval = (*this)[i].GetNumPhotons();
+        const Float_t testval = (*this)[i].GetNumPhotons();
 
         if (testval > maxval)
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1031)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1032)
@@ -21,12 +21,6 @@
     ~MCerPhotEvt() { delete fPixels; }
 
-    void Draw(Option_t* option = "");
-
     UInt_t GetNumPixels() const { return fNumPixels; }
-
-    void AddPixel(Int_t id, Float_t nph, Float_t err);
-
-    void Clear(Option_t *opt=NULL);
-    void Print(Option_t *opt=NULL) const;
+    void   AddPixel(Int_t id, Float_t nph, Float_t err);
 
     Bool_t  IsPixelExisting(Int_t id) const;
@@ -40,4 +34,10 @@
     MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); }
 
+    void Reset();
+
+    void Draw(Option_t* option = "");
+    void Print(Option_t *opt=NULL) const;
+    void Clear(Option_t *opt=NULL) { Reset(); }
+
     ClassDef(MCerPhotEvt, 1)    // class for an event containing cerenkov photons
 };
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1031)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1032)
@@ -302,14 +302,19 @@
     {
         //
-        // Get Name of Branch
-        //
-        const char *name = branch->GetName();
+        // Get Name of Branch and Object
+        //
+        const char *bname = branch->GetName();
+
+        TString oname(bname);
+
+        if (oname.EndsWith("."))
+            oname.Remove(oname.Length()-1);
 
         //
         // Check if enabeling the branch is allowed
         //
-        if (fVetoList->FindObject(name))
+        if (fVetoList->FindObject(oname))
         {
-            *fLog << "Master branch " << name << " has veto... skipped." << endl;
+            *fLog << "Master branch " << bname << " has veto... skipped." << endl;
             DisableSubBranches(branch);
             continue;
@@ -326,5 +331,5 @@
         // check if object is existing in the list
         //
-        *pcont=pList->FindCreateObj(name);
+        *pcont=pList->FindCreateObj(oname);
 
         if (!*pcont)
@@ -334,5 +339,5 @@
             // we cannot proceed reading this branch
             //
-            *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
+            *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
             DisableSubBranches(branch);
             continue;
@@ -343,7 +348,9 @@
         // the actual branch should be stored - enable branch.
         //
-        fChain->SetBranchAddress(name, pcont);
-
-        *fLog << "Master branch address " << name << " setup for reading." << endl;
+        fChain->SetBranchAddress(bname, pcont);
+        *fLog << "Master branch address " << bname << " setup for reading." << endl;
+
+        //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
+        branch->SetAutoDelete();
 
         num++;
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 1031)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 1032)
@@ -350,5 +350,5 @@
     fPosInArray = 0;
 }
-
+/*
 // --------------------------------------------------------------------------
 //
@@ -370,5 +370,5 @@
     if (nSamp && ns!=nSamp)
     {
-        *fLog << "RawEvtData::FillPixel: Error, number of samples in ";
+        *fLog << "RawEvtData::AddPixel: Error, number of samples in ";
         *fLog << "TArrayC doesn't match actual number" << endl;
         return;
@@ -395,5 +395,5 @@
     arrsam->AddAt((Byte_t*)data->GetArray(), arrsam->GetSize()-ns, ns);
 }
-
+*/
 // --------------------------------------------------------------------------
 //
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.h
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 1031)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.h	(revision 1032)
@@ -52,5 +52,5 @@
     void DeletePixels(Bool_t flag=kFALSE);
     void ResetPixels() { DeletePixels(kTRUE); }
-    void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
+    // void AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag=kFALSE);
 
     Byte_t   GetNumHiGainSamples() const;
