Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3378)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3379)
@@ -4,4 +4,16 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2004/03/02: Abelardo Moralejo
+
+   * mmc/MMcCorsikaRunHeader.[h,cc]
+     - Added operator [] to get references to the objects in 
+       TObjArray fTelescopes.
+     - Added Print() function.
+
+   * mgeom/MGeomCorsikaCT.[h,cc]
+     - Added getter functions for telescope coordinates.
+     - Added Print() function.
+
 
  2004/03/02: Thomas Bretz
Index: trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc	(revision 3378)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.cc	(revision 3379)
@@ -65,2 +65,12 @@
   fCTfocal=ctfocal;
 }
+// --------------------------------------------------------------------------
+//
+// Print the geometry information of one pixel.
+//
+void MGeomCorsikaCT::Print(Option_t *opt) const
+{ 
+    //   information about a telescope
+  *fLog << all << "x = " << fCTx << ", y = " << fCTy << ", z = " 
+	<< fCTz << " cm " << endl;
+}
Index: trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.h
===================================================================
--- trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.h	(revision 3378)
+++ trunk/MagicSoft/Mars/mgeom/MGeomCorsikaCT.h	(revision 3379)
@@ -18,5 +18,5 @@
     Float_t fCTtheta; // 
     Float_t fCTphi;   //
-    Float_t fCTdiam;  // Diamiter where the Cph are stored at MMCs level
+    Float_t fCTdiam;  // Diameter where the Cph are stored at MMCs level
     Float_t fCTfocal; // Focal of the CT
 
@@ -25,7 +25,13 @@
     MGeomCorsikaCT(const char *name=NULL, const char *title=NULL);
 
+    void Print(Option_t *opt=NULL) const;
+
     void Fill(Float_t ctx, Float_t cty, Float_t ctz,
 	      Float_t cttheta, Float_t ctphi,
 	      Float_t ctdiam, Float_t ctfocal);
+
+    Float_t GetCTx() { return fCTx; }
+    Float_t GetCTy() { return fCTy; }
+    Float_t GetCTz() { return fCTz; }
 
     ClassDef(MGeomCorsikaCT, 1)  // class containing information about CTelescope
Index: trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc	(revision 3378)
+++ trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.cc	(revision 3379)
@@ -35,4 +35,6 @@
 #include "MGeomCorsikaCT.h"
 #include "MMcCorsikaRunHeader.h"
+#include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MMcCorsikaRunHeader);
@@ -47,4 +49,5 @@
 MMcCorsikaRunHeader::MMcCorsikaRunHeader(const char *name, const char *title,
 					 int NumCT)
+  : fTelescopes(NumCT)
 {
     fName  = name  ? name  : "MMcCorsikaRunHeader";
@@ -88,7 +91,11 @@
 
     fNumCT=NumCT;
+
+    fTelescopes.SetOwner();
+
     for  (int i=0;i<NumCT;i++)
       fTelescopes[i]= new MGeomCorsikaCT;
 
+    SetReadyToSave();
 }
 
@@ -176,11 +183,33 @@
 }
 
-
-
-
-
-
-
-
-
-
+// -------------------------------------------------------------------------
+//
+// Returns a reference of the i-th entry (the telescope with the index i)
+//
+MGeomCorsikaCT &MMcCorsikaRunHeader::operator[](Int_t i) const
+{
+    return *static_cast<MGeomCorsikaCT*>(fTelescopes.UncheckedAt(i));
+}
+
+// --------------------------------------------------------------------------
+//
+//  Prints the information of all telescopes
+//
+void MMcCorsikaRunHeader::Print(Option_t *) const
+{
+    //
+    //   Print Information about the Geometry of the camera
+    //
+  *fLog << all << GetTitle() <<". Number of Telescopes: " << fNumCT << endl;
+
+  fTelescopes.Print();
+} 
+
+
+
+
+
+
+
+
+
Index: trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h	(revision 3378)
+++ trunk/MagicSoft/include-Classes/MMcFormat/MMcCorsikaRunHeader.h	(revision 3379)
@@ -101,4 +101,8 @@
 		Int_t CTnum);
 
+    MGeomCorsikaCT &operator[](Int_t i) const;
+
+    virtual void Print(Option_t *opt=NULL) const;
+
     ClassDef(MMcCorsikaRunHeader, 3) // storage container for corsika setup information
 };
