Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2272)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2273)
@@ -1,3 +1,20 @@
                                                  -*-*- END OF LINE -*-*-
+
+ 2003/07/12: Thomas Bretz
+ 
+   * mhistmc/MHMcCT1CollectionArea.[h,cc]:
+     - made the enum as FillType_t a public member of the class
+
+   * macros/CT1collarea.C
+     - Updated accordingly. Can somebody please check whether it
+       still works.
+ 
+   * mbase/MArgs.h:
+     - added some comment
+     
+   * mraw/MRawRunHeader.cc:
+     - added an 'inf' to the log-stream
+
+
 
  2003/07/08: Abelardo Moralejo
@@ -9,4 +26,6 @@
        distribution of the shower.
 
+
+
  2003/07/06: Abelardo Moralejo
 
@@ -20,4 +39,6 @@
      - Added example on how to use the new function 
        MHMcCT1CollectionArea::SetEaxis
+
+
 
  2003/07/06: Thomas Bretz
Index: /trunk/MagicSoft/Mars/macros/CT1collarea.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/CT1collarea.C	(revision 2272)
+++ /trunk/MagicSoft/Mars/macros/CT1collarea.C	(revision 2273)
@@ -24,6 +24,4 @@
 \* ======================================================================== */
 
-#include "/home/magic/Mars/mhistmc/MHMcCT1CollectionArea.h"
-
 void CT1collarea(TString filename="MC_SC4.root", TString outname="")
 { 
@@ -45,5 +43,5 @@
     reader.DisableAutoScheme();
 
-    MHMcCT1CollectionArea* collarea = new MHMcCT1CollectionArea();
+    MHMcCT1CollectionArea collarea;
 
     MBinning binsx("BinningE");
@@ -54,5 +52,5 @@
     xed.Set(15,xedge);
     binsx.SetEdges(xed);
-    collarea->SetEaxis(kLog10Energy);
+    collarea.SetEaxis(MHMcCollectionArea::kLog10);
     */
 
@@ -64,5 +62,5 @@
     //
     binsx.SetEdgesLog(14,300,1.e5);
-    collarea->SetEaxis(kEnergy);
+    collarea.SetEaxis(MHMcCT1CollectionArea::kLinear);
 
 
@@ -73,5 +71,5 @@
     binsy.SetEdges(yed);
 
-    parlist.AddToList(collarea);
+    parlist.AddToList(&collarea);
     parlist.AddToList(&binsx);
     parlist.AddToList(&binsy);
@@ -103,5 +101,5 @@
     tasklist.PrintStatistics();
 
-    collarea->CalcEfficiency();
+    collarea.CalcEfficiency();
 
     //
@@ -109,5 +107,5 @@
     // filled and can be displayed
     //
-    collarea->DrawClone();
+    collarea.DrawClone();
 
     //
@@ -119,8 +117,7 @@
 
     TFile f(outname,"recreate");
-    collarea->GetHist()->Write();
-    collarea->GetHAll()->Write();
-    collarea->GetHSel()->Write();
-    f.Close();
+    collarea.GetHist()->Write();
+    collarea.GetHAll()->Write();
+    collarea.GetHSel()->Write();
 }
 
Index: /trunk/MagicSoft/Mars/mbase/MArgs.h
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MArgs.h	(revision 2272)
+++ /trunk/MagicSoft/Mars/mbase/MArgs.h	(revision 2273)
@@ -35,4 +35,7 @@
     void Print(const Option_t *o="") const;
 
+    // FIXME: Add max, min option
+    // FIXME: Add default option
+
     Int_t    GetInt(const TString name) const;
     Double_t GetFloat(const TString name) const;
Index: /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2272)
+++ /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.cc	(revision 2273)
@@ -52,5 +52,6 @@
 //   - collection area (result)
 //
-MHMcCT1CollectionArea::MHMcCT1CollectionArea(const char *name, const char *title)
+MHMcCT1CollectionArea::MHMcCT1CollectionArea(const char *name, const char *title) :
+    fEaxis(kLog10)
 { 
   //
@@ -66,6 +67,4 @@
   fTitle = title ? title : "Collection Area vs. log10 Energy";
 
-  fEaxis = kLog10Energy;
-
   fHistAll = new TH2D;
   fHistSel = new TH2D;
@@ -84,13 +83,13 @@
   fHistCol->SetDirectory(NULL);
 
-  fHistAll->SetXTitle("log10 E [GeV]");
-  fHistAll->SetYTitle("theta [deg]");
-  fHistAll->SetZTitle("N");
-
-  fHistSel->SetXTitle("log10 E [GeV]");
-  fHistSel->SetYTitle("theta [deg]");
-  fHistSel->SetZTitle("N");
-
-  fHistCol->SetXTitle("log10 E [GeV]");
+  fHistAll->SetXTitle("log10(E [GeV])");
+  fHistAll->SetYTitle("\\Theta [\\circ]");
+  fHistAll->SetZTitle("Counts");
+
+  fHistSel->SetXTitle("log10(E [GeV])");
+  fHistSel->SetYTitle("\\Theta [\\circ]");
+  fHistSel->SetZTitle("Counts");
+
+  fHistCol->SetXTitle("log10(E [GeV])");
   fHistCol->SetYTitle("theta [deg]");
   fHistCol->SetZTitle("A [m^{2}]");
@@ -133,14 +132,14 @@
     fHistCol->Sumw2();
 
-    if (fEaxis == kEnergy)
-      {
-	fTitle = "Collection Area vs. Energy";
-	fHistCol->SetTitle(fTitle);
-	fHistAll->SetTitle("All showers - Theta vs Energy distribution");
-	fHistSel->SetTitle("Selected showers - Theta vs Energy distribution");
-	fHistCol->SetXTitle("E [GeV]");
-	fHistAll->SetXTitle("E [GeV]");
-	fHistSel->SetXTitle("E [GeV]");
-      }
+    if (fEaxis == kLinear)
+    {
+        fTitle = "Collection Area vs. Energy";
+        fHistCol->SetTitle(fTitle);
+        fHistAll->SetTitle("All showers - Theta vs Energy distribution");
+        fHistSel->SetTitle("Selected showers - Theta vs Energy distribution");
+        fHistCol->SetXTitle("E [GeV]");
+        fHistAll->SetXTitle("E [GeV]");
+        fHistSel->SetXTitle("E [GeV]");
+    }
 
     return kTRUE;
@@ -156,8 +155,7 @@
   MMcEvt &mcevt = *(MMcEvt*)par;
 
-  if (fEaxis == kLog10Energy)
-    fHistSel->Fill(log10(mcevt.GetEnergy()), kRad2Deg*mcevt.GetTelescopeTheta(), w);
-  else
-    fHistSel->Fill(mcevt.GetEnergy(), kRad2Deg*mcevt.GetTelescopeTheta(), w);
+  const Double_t E = fEaxis==kLinear ? mcevt.GetEnergy() : log10(mcevt.GetEnergy());
+
+  fHistSel->Fill(E, kRad2Deg*mcevt.GetTelescopeTheta(), w);
 
   return kTRUE;
@@ -211,5 +209,5 @@
 
   c.cd(1);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistCol->SetDirectory(NULL);
@@ -217,5 +215,5 @@
 
   c.cd(2);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistSel->SetDirectory(NULL);
@@ -223,5 +221,5 @@
 
   c.cd(3);
-  if (fEaxis == kEnergy)
+  if (fEaxis == kLinear)
     gPad->SetLogx();
   fHistAll->SetDirectory(NULL);
@@ -462,5 +460,5 @@
 	  Float_t e2;
 
-	  if (fEaxis == kLog10Energy)
+	  if (fEaxis == kLog10)
 	    {
 	      e1 = pow(10.,fHistAll->GetXaxis()->GetBinLowEdge(i));
@@ -547,10 +545,8 @@
 	  //
 
-	  Float_t area;
+	  Float_t area = dr;
 
 	  if (theta < 50)
-	    area = dr * cos(theta*TMath::Pi()/180.);
-	  else
-	    area = dr;
+	    area *= cos(theta*TMath::Pi()/180.);
 
 	  // Above 50 degrees MC was generated with Corsika 6.xx, and the cores
Index: /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h
===================================================================
--- /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2272)
+++ /trunk/MagicSoft/Mars/mhistmc/MHMcCT1CollectionArea.h	(revision 2273)
@@ -6,13 +6,14 @@
 #endif
 
-enum {
-  kLog10Energy,
-  kEnergy
-};
-
 class TH2D;
 
 class MHMcCT1CollectionArea : public MH
 {
+public:
+    enum FillType_t {
+        kLog10,
+        kLinear
+    };
+
 private:
     TH2D *fHistAll; //  all simulated showers
@@ -20,5 +21,5 @@
     TH2D *fHistCol; //  the collection area
 
-    Byte_t  fEaxis;
+    FillType_t fEaxis;
 
 public:
@@ -32,5 +33,5 @@
     void DrawSel(Option_t *option="");
 
-    void SetEaxis(Byte_t x) { fEaxis = x; }
+    void SetEaxis(FillType_t x) { fEaxis = x; }
 
     const TH2D *GetHist() const { return fHistCol; }
Index: /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 2272)
+++ /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 2273)
@@ -155,5 +155,5 @@
     *fLog << "Evt Counter:  " << fNumEvents << endl;
 
-    *fLog << hex;
+    *fLog << inf << hex;
     for (int i=0; i<GetNumPixel(); i++)
         *fLog << setfill('0') << setw(3) << (*fPixAssignment)[i] << " ";
