Index: /trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h	(revision 5047)
@@ -17,4 +17,5 @@
 #pragma link C++ class MCalibrationIntensityQECam+;
 #pragma link C++ class MCalibrationIntensityRelTimeCam+;
+#pragma link C++ class MCalibrationIntensityTestCam+;
 #pragma link C++ class MCalibrationCam+;
 #pragma link C++ class MCalibrationPix+;
@@ -36,6 +37,4 @@
 #pragma link C++ class MCalibrationBlindCamOneOldStyle+;
 #pragma link C++ class MCalibrationBlindCamTwoNewStyle+;
-#pragma link C++ class MCalibrationChargeBlindCamOneOldStyle+;
-#pragma link C++ class MCalibrationChargeBlindCamTwoNewStyle+;
 #pragma link C++ class MCalibrationChargeBlindCam+;
 #pragma link C++ class MCalibrationChargeBlindPix+;
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc	(revision 5047)
@@ -115,10 +115,10 @@
 // --------------------------------------------------------------------------
 //
-// Deletes the following TObjArray's of MCalibrationPix containers (if exist):
+// Deletes the following TOrdCollection's of MCalibrationPix containers (if exist):
 // - fPixels
 // - fAverageAreas
 // - fAverageSectors
 //  
-// Deletes the following TObjArray's of MBadPixelsPix containers (if exist):
+// Deletes the following TOrdCollection's of MBadPixelsPix containers (if exist):
 // - fAverageBadAreas
 // - fAverageBadSectors
@@ -149,5 +149,5 @@
 // --------------------------------------
 //
-// Calls the ForEach macro for the TObjArray fPixels with the argument Clear()
+// Calls the ForEach macro for the TOrdCollection fPixels with the argument Clear()
 // 
 // Loops over the fAverageAreas, calling the function Clear() for 
@@ -221,4 +221,12 @@
 // -------------------------------------------------------------------
 //
+// Initialize the objects inside the TOrdCollection using the 
+// virtual function Add().
+//
+//
+// InitSize can only increase the size, but not shrink. 
+// 
+// It can be called more than one time. New Containers are 
+// added only from the current size to the argument i.
 //
 void MCalibrationCam::InitSize(const UInt_t i)
@@ -230,6 +238,4 @@
     return;
   
-  // Pixels->Expand(i);
-
   if (i>save)
     Add(save,i);
@@ -257,7 +263,13 @@
 // -------------------------------------------------------------------
 //
-// Calls TObjArray::ExpandCreate() for:
+// Initialize the objects inside the TOrdCollections
 // - fAverageAreas
 // - fAverageBadAreas
+// using the virtual function Add().
+//
+// InitSize can only increase the size, but not shrink. 
+// 
+// It can be called more than one time. New Containers are 
+// added only from the current size to the argument i.
 //
 void MCalibrationCam::InitAverageAreas(const UInt_t i)
@@ -269,7 +281,4 @@
     return;
   
-  //fAverageAreas->Expand(i);
-  //fAverageBadAreas->Expand(i);
-
   fNumUnsuitable.Set(i);
   fNumUnreliable.Set(i);
@@ -292,7 +301,13 @@
 // -------------------------------------------------------------------
 //
-// Calls TObjArray::ExpandCreate() for:
+// Initialize the objects inside the TOrdCollections
 // - fAverageSectors
 // - fAverageBadSectors
+// using the virtual function Add().
+//
+// InitSize can only increase the size, but not shrink. 
+// 
+// It can be called more than one time. New Containers are 
+// added only from the current size to the argument i.
 //
 void MCalibrationCam::InitAverageSectors(const UInt_t i)
@@ -304,7 +319,4 @@
     return;
   
-  //fAverageSectors->Expand(i);
-  //fAverageBadSectors->Expand(i);
-
   if (i < save)
     return;
@@ -399,5 +411,5 @@
 // --------------------------------------------------------------------------
 //
-// Returns the current size of the TObjArray fAverageAreas
+// Returns the current size of the TOrdCollection fAverageAreas
 // independently if the MCalibrationPix is filled with values or not.
 //
@@ -409,5 +421,5 @@
 // --------------------------------------------------------------------------
 //
-// Returns the current size of the TObjArray fAverageSectors
+// Returns the current size of the TOrdCollection fAverageSectors
 // independently if the MCalibrationPix is filled with values or not.
 //
@@ -438,5 +450,5 @@
 // --------------------------------------------------------------------------
 //
-// Returns the current size of the TObjArray fPixels 
+// Returns the current size of the TOrdCollection fPixels 
 // independently if the MCalibrationPix is filled with values or not.
 //
Index: unk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.cc	(revision 5046)
+++ 	(revision )
@@ -1,148 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Markus Gaug   07/2004 <mailto:markus@ifae.es>
-!
-!   Copyright: MAGIC Software Development, 2000-2004
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                               
-// MCalibrationChargeBlindCamOneOldStyle                                               
-//                                                               
-// Blind Pixels Calibration camera until run 31693. The blind pixel camera 
-// consisted then only of one non-coated blind pixel with poorly known 
-// quantum efficiency read out in hardware ID 560.
-//
-// See also: MCalibrationChargeBlindCam
-//
-/////////////////////////////////////////////////////////////////////////////
-#include "MCalibrationChargeBlindCamOneOldStyle.h"
-#include "MCalibrationChargeBlindPix.h"
-
-ClassImp(MCalibrationChargeBlindCamOneOldStyle);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default constructor. 
-//
-// - CreatePixs();
-// - CreateAreas();   
-// - CreateAtts();   
-// - CreateQEs();     
-// - CreateCollEffs();
-//
-MCalibrationChargeBlindCamOneOldStyle::MCalibrationChargeBlindCamOneOldStyle(const char *name)
-    : MCalibrationChargeBlindCam(1,name,"One Blind Pixel in camera - old style")
-{
-
-  CreatePixs    ();    
-  CreateAreas   ();   
-  CreateAtts    ();   
-  CreateQEs     ();     
-  CreateCollEffs();
-
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Only one blind pixel with ID 559
-//
-void MCalibrationChargeBlindCamOneOldStyle::CreatePixs() 
-{
-
-  (*this)[0].SetPixId(559);
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// Only one blind pixel with exactly 100 mm^2 area
-//
-void MCalibrationChargeBlindCamOneOldStyle::CreateAreas() 
-{
-
-  (*this)[0].SetArea(100.);
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// One blind pixel with poorly known qe's: average of David measurments with 
-// 4% error.
-//
-void MCalibrationChargeBlindCamOneOldStyle::CreateQEs() 
-{
-  
-  (*this)[0].SetQE         ( 0.154,      MCalibrationCam::kGREEN );
-  (*this)[0].SetQE         ( 0.226,      MCalibrationCam::kBLUE  );
-  (*this)[0].SetQE         ( 0.247,      MCalibrationCam::kUV    );
-  (*this)[0].SetQE         ( 0.247,      MCalibrationCam::kCT1   );
-
-  (*this)[0].SetQEErr      ( 0.005,   MCalibrationCam::kGREEN );
-  (*this)[0].SetQEErr      ( 0.007,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetQEErr      ( 0.01,    MCalibrationCam::kUV    );
-  (*this)[0].SetQEErr      ( 0.01,    MCalibrationCam::kCT1   );
-
-}
-
-// --------------------------------------------------------------------------
-//
-// One blind pixel with poorly known coll.eff's: email from Eckart with 
-// estimates depending on colour, but 5% error (maybe more??)
-//
-void MCalibrationChargeBlindCamOneOldStyle::CreateCollEffs() 
-{
-
-  (*this)[0].SetCollEff    ( 0.99, MCalibrationCam::kGREEN );
-  (*this)[0].SetCollEff    ( 0.93, MCalibrationCam::kBLUE  );
-  (*this)[0].SetCollEff    ( 0.90, MCalibrationCam::kUV    );
-  (*this)[0].SetCollEff    ( 0.90, MCalibrationCam::kCT1   );
-
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
-  
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// One blind pixel with very well known attenuation 0.01 (datasheet delivered 
-// with filter, precision better than 1%
-//
-void MCalibrationChargeBlindCamOneOldStyle::CreateAtts() 
-{
-
-  (*this)[0].SetAtt    ( 1.97, MCalibrationCam::kGREEN );
-  (*this)[0].SetAtt    ( 1.96, MCalibrationCam::kBLUE  );
-  (*this)[0].SetAtt    ( 1.95, MCalibrationCam::kUV    );
-  (*this)[0].SetAtt    ( 1.95, MCalibrationCam::kCT1   );
-
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kGREEN );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kUV    );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kCT1   );
-  
-}
-
Index: unk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamOneOldStyle.h	(revision 5046)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#ifndef MARS_MCalibrationChargeBlindCamOneOldStyle
-#define MARS_MCalibrationChargeBlindCamOneOldStyle
-
-#ifndef MARS_MCalibrationChargeBlindCam
-#include "MCalibrationChargeBlindCam.h"
-#endif
-
-class MCalibrationChargeBlindCamOneOldStyle : public MCalibrationChargeBlindCam
-{
-private:
-
-  void CreatePixs();
-  void CreateAreas();
-  void CreateAtts();
-  void CreateQEs();
-  void CreateCollEffs();
-  
-public:
-
-  MCalibrationChargeBlindCamOneOldStyle(const char *name=NULL);
-  
-  ClassDef(MCalibrationChargeBlindCamOneOldStyle, 1) // Container Blind Pixel Calibration Results - until run 31693
-};
-
-#endif
Index: unk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.cc	(revision 5046)
+++ 	(revision )
@@ -1,183 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Markus Gaug   07/2004 <mailto:markus@ifae.es>
-!
-!   Copyright: MAGIC Software Development, 2000-2004
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                               
-// MCalibrationChargeBlindCamTwoNewStyle                                               
-//                                                               
-// Blind Pixels Calibration camera after run 31693. The blind pixel camera 
-// consisted then of two non-coated blind pixel with very well known 
-// quantum efficiency read out in hardware ID 560 and 561.
-//
-// See also: MCalibrationChargeBlindCam
-//
-/////////////////////////////////////////////////////////////////////////////
-#include "MCalibrationChargeBlindCamTwoNewStyle.h"
-#include "MCalibrationChargeBlindPix.h"
-
-ClassImp(MCalibrationChargeBlindCamTwoNewStyle);
-
-using namespace std;
-
-// --------------------------------------------------------------------------
-//
-// Default constructor. 
-//
-// - CreatePixs();
-// - CreateAreas();   
-// - CreateAtts();   
-// - CreateQEs();     
-// - CreateCollEffs();
-//
-MCalibrationChargeBlindCamTwoNewStyle::MCalibrationChargeBlindCamTwoNewStyle(const char *name)
-    : MCalibrationChargeBlindCam(2,name,"Two Blind Pixels in camera - new style")
-{
-
-  CreatePixs    ();    
-  CreateAreas   ();   
-  CreateAtts    ();   
-  CreateQEs     ();     
-  CreateCollEffs();
-
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Two blind pixels with ID 559 and 560 (software)
-//
-void MCalibrationChargeBlindCamTwoNewStyle::CreatePixs() 
-{
-
-  (*this)[0].SetPixId(559);
-  (*this)[1].SetPixId(560);
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// Two blind pixels with exactly 100 mm^2 area
-//
-void MCalibrationChargeBlindCamTwoNewStyle::CreateAreas() 
-{
-
-  (*this)[0].SetArea(100.);
-  (*this)[1].SetArea(100.);
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// Two blind pixels with very well known qe's: David's measurments with 
-// 1% error.
-//
-void MCalibrationChargeBlindCamTwoNewStyle::CreateQEs() 
-{
-  
-  (*this)[0].SetQE         ( 0.166,   MCalibrationCam::kGREEN );
-  (*this)[0].SetQE         ( 0.240,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetQE         ( 0.273,   MCalibrationCam::kUV    );
-  (*this)[0].SetQE         ( 0.273,   MCalibrationCam::kCT1   );
-
-  (*this)[0].SetQEErr      ( 0.004,   MCalibrationCam::kGREEN );
-  (*this)[0].SetQEErr      ( 0.005,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kUV    );
-  (*this)[0].SetQEErr      ( 0.006,   MCalibrationCam::kCT1   );
-
-  (*this)[1].SetQE         ( 0.155,   MCalibrationCam::kGREEN );
-  (*this)[1].SetQE         ( 0.228,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetQE         ( 0.261,   MCalibrationCam::kUV    );
-  (*this)[1].SetQE         ( 0.261,   MCalibrationCam::kCT1   );
-
-  (*this)[1].SetQEErr      ( 0.004,   MCalibrationCam::kGREEN );
-  (*this)[1].SetQEErr      ( 0.005,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kUV    );
-  (*this)[1].SetQEErr      ( 0.006,   MCalibrationCam::kCT1   );
-
-}
-
-// --------------------------------------------------------------------------
-//
-// One blind pixel with poorly known coll.eff's: email from Eckart with 
-// estimates depending on colour, but 5% error (maybe more??)
-//
-void MCalibrationChargeBlindCamTwoNewStyle::CreateCollEffs() 
-{
-
-  (*this)[0].SetCollEff    ( 0.99,   MCalibrationCam::kGREEN );
-  (*this)[0].SetCollEff    ( 0.93,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetCollEff    ( 0.90,   MCalibrationCam::kUV    );
-  (*this)[0].SetCollEff    ( 0.90,   MCalibrationCam::kCT1   );
-
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
-  (*this)[0].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
-  
-  (*this)[1].SetCollEff    ( 0.99,   MCalibrationCam::kGREEN );
-  (*this)[1].SetCollEff    ( 0.93,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetCollEff    ( 0.90,   MCalibrationCam::kUV    );
-  (*this)[1].SetCollEff    ( 0.90,   MCalibrationCam::kCT1   );
-
-  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kGREEN );
-  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kUV    );
-  (*this)[1].SetCollEffErr ( 0.05,   MCalibrationCam::kCT1   );
-  
-  
-}
-
-// --------------------------------------------------------------------------
-//
-// One blind pixel has a very well known attenuation 0.01 (datasheet delivered 
-// with filter, precision better than 1%
-//
-// The second blind pixel is not yet so well known, the company does not reply.
-// Attenuation: 0.001 (datasheet not delivered with filter, precision guaranteed to 5%)
-//
-void MCalibrationChargeBlindCamTwoNewStyle::CreateAtts() 
-{
-
-  (*this)[0].SetAtt    ( 1.97,   MCalibrationCam::kGREEN );
-  (*this)[0].SetAtt    ( 1.96,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetAtt    ( 1.95,   MCalibrationCam::kUV    );
-  (*this)[0].SetAtt    ( 1.95,   MCalibrationCam::kCT1   );
-
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kGREEN );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kBLUE  );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kUV    );
-  (*this)[0].SetAttErr ( 0.01,   MCalibrationCam::kCT1   );
-  
-  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kGREEN );
-  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kUV    );
-  (*this)[1].SetAtt    ( 3.00,   MCalibrationCam::kCT1   );
-
-  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kGREEN );
-  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kBLUE  );
-  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kUV    );
-  (*this)[1].SetAttErr ( 0.15,   MCalibrationCam::kCT1   );
-  
-}
-
Index: unk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindCamTwoNewStyle.h	(revision 5046)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#ifndef MARS_MCalibrationChargeBlindCamTwoNewStyle
-#define MARS_MCalibrationChargeBlindCamTwoNewStyle
-
-#ifndef MARS_MCalibrationChargeBlindCam
-#include "MCalibrationChargeBlindCam.h"
-#endif
-
-class MCalibrationChargeBlindCamTwoNewStyle : public MCalibrationChargeBlindCam
-{
-private:
-
-  void CreatePixs();
-  void CreateAreas();
-  void CreateAtts();
-  void CreateQEs();
-  void CreateCollEffs();
-  
-public:
-
-  MCalibrationChargeBlindCamTwoNewStyle(const char *name=NULL);
-  
-  ClassDef(MCalibrationChargeBlindCamTwoNewStyle, 1) // Container Blind Pixel Calibration Results - after run 31693
-};
-
-#endif
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc	(revision 5047)
@@ -81,4 +81,5 @@
 /////////////////////////////////////////////////////////////////////////////
 #include "MCalibrationChargeCam.h"
+#include "MCalibrationChargePix.h"
 
 #include <TOrdCollection.h>
@@ -96,5 +97,4 @@
 #include "MCalibrationQEPix.h"
 
-#include "MCalibrationChargePix.h"
 #include "MCalibrationChargeBlindPix.h"
 #include "MCalibrationChargePINDiode.h"
@@ -165,5 +165,8 @@
 */
 
-
+// -------------------------------------------------------------------
+//
+// Add MCalibrationChargePix's in the ranges from - to to fPixels
+//
 void MCalibrationChargeCam::Add(const UInt_t a, const UInt_t b)
 {
@@ -172,5 +175,8 @@
 }
 
-
+// -------------------------------------------------------------------
+//
+// Add MCalibrationChargePix's in the ranges from - to to fAverageAreas
+//
 void MCalibrationChargeCam::AddArea(const UInt_t a, const UInt_t b)
 {
@@ -179,4 +185,8 @@
 }
 
+// -------------------------------------------------------------------
+//
+// Add MCalibrationChargePix's in the ranges from - to to fAverageSectors
+//
 void MCalibrationChargeCam::AddSector(const UInt_t a, const UInt_t b)
 {
@@ -583,14 +593,4 @@
 }
 
-// --------------------------------------------------------------------------
-//
-// Calls MCalibrationChargePix::DrawClone()
-//
-void MCalibrationChargeCam::DrawPixelContent(Int_t idx) const
-{
-  MCalibrationChargePix &pix = (MCalibrationChargePix&)(*this)[idx];
-  pix.DrawClone();
-}
-
 
 
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h	(revision 5047)
@@ -4,8 +4,4 @@
 #ifndef MARS_MCalibrationCam
 #include "MCalibrationCam.h"
-#endif
-
-#ifndef ROOT_TArrayI
-#include <TArrayI.h>
 #endif
 
@@ -36,7 +32,4 @@
   void   Clear ( Option_t *o="" );
   
-  // Draws
-  void   DrawPixelContent(Int_t num)   const;    
-
   // Getters
   Bool_t  GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &ffactor );
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc	(revision 5047)
@@ -103,4 +103,8 @@
 }
 
+// -------------------------------------------------------------------
+//
+// Add MCalibrationQEPix's in the ranges from - to to fPixels
+//
 void MCalibrationQECam::Add(const UInt_t a, const UInt_t b)
 {
@@ -109,4 +113,8 @@
 }
 
+// -------------------------------------------------------------------
+//
+// Add MCalibrationQEPix's in the ranges from - to to fAverageAreas
+//
 void MCalibrationQECam::AddArea(const UInt_t a, const UInt_t b)
 {
@@ -115,4 +123,8 @@
 }
 
+// -------------------------------------------------------------------
+//
+// Add MCalibrationQEPix's in the ranges from - to to fAverageSectors
+//
 void MCalibrationQECam::AddSector(const UInt_t a, const UInt_t b)
 {
@@ -163,18 +175,7 @@
   
   qecam.fFlags        = fFlags;
-
   qecam.fCorningBlues = fCorningBlues;
   qecam.fCorningReds  = fCorningReds;
   
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Not yet implemented
-//
-void MCalibrationQECam::DrawPixelContent(Int_t idx) const
-{
-  return;
 }
 
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.h	(revision 5047)
@@ -33,6 +33,6 @@
 protected:
 
-  MArrayD fCorningBlues;                   //! Corning blues of the pixels (if available) 
-  MArrayD fCorningReds;                    //! Corning reds  of the pixels (if available) 
+  MArrayD fCorningBlues;                   // Corning blues of the pixels (if available) 
+  MArrayD fCorningReds;                    //o Corning reds  of the pixels (if available) 
 
 public:
@@ -44,5 +44,4 @@
   
   // Others
-  void    DrawPixelContent( Int_t num ) const;    
   Bool_t  GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0 ) const;
 
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc	(revision 5047)
@@ -261,11 +261,2 @@
 }
 
-// --------------------------------------------------------------------------
-//
-// Calls MCalibrationPix::DrawClone()
-//
-void MCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const
-{
-  (*this)[idx].DrawClone();
-}
-
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.h	(revision 5047)
@@ -23,5 +23,4 @@
   // Others
   Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-  void DrawPixelContent(Int_t num) const;    
 
   ClassDef(MCalibrationRelTimeCam, 2)	// Container Rel. Arrival Time Calibration Results Camera
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.cc	(revision 5047)
@@ -29,19 +29,4 @@
 // same calibration run (see MHCalibrationTestCam and MHCalibrationTestPix).
 //
-// Contains TClonesArrays for the following objects:
-// - fPixels:         Array of classes derived from MCalibrationTestPix, one entry 
-//                    per pixel.
-// - fAverageAreas:   Array of classes derived from MCalibrationTestPix, one entry
-//                    per pixel AREA. 
-// - fAverageSectors: Array of classes derived from MCalibrationTestPix, one entry
-//                    per camera SECTOR. 
-//
-// Averaged values over one whole area index (e.g. inner or outer pixels for 
-// the MAGIC camera), can be retrieved via: 
-// MCalibrationTestPix &avpix = fTestCam->GetAverageArea(i)
-//
-// Averaged values over one whole camera sector can be retrieved via: 
-// MCalibrationTestPix &avpix = fTestCam->GetAverageSector(i)
-//
 // See also: MCalibrationTestPix, MCalibrationTestCalc, MCalibrationQECam
 //           MHCalibrationTestPix, MHCalibrationTestCam              
@@ -51,5 +36,5 @@
 #include "MCalibrationTestPix.h"
 
-#include <TClonesArray.h>
+#include <TOrdCollection.h>
 
 #include "MLog.h"
@@ -89,25 +74,5 @@
   fTitle = title ? title : "Storage container for the Calibration Test Information in the camera";
   
-  fPixels            = new TClonesArray("MCalibrationTestPix",1);
-  fAverageAreas      = new TClonesArray("MCalibrationTestPix",1);
-  fAverageSectors    = new TClonesArray("MCalibrationTestPix",1);
-
   Clear();
-}
-
-// --------------------------------------------------------------------------
-//
-// Deletes the following TClonesArray's of MCalibrationPix containers (if exist):
-// - fPixels
-// - fAverageAreas
-// - fAverageSectors
-//  
-MCalibrationTestCam::~MCalibrationTestCam()
-{
-
-  delete fPixels;
-  delete fAverageAreas;
-  delete fAverageSectors;
-  
 }
 
@@ -123,8 +88,4 @@
   fNumUninterpolatedInMaxCluster = 0; 
 
-  {  fPixels        ->ForEach(TObject, Clear)();  }
-  {  fAverageAreas  ->ForEach(TObject, Clear)();  }
-  {  fAverageSectors->ForEach(TObject, Clear)();  }
-  
   return;
 }
@@ -132,141 +93,32 @@
 // -------------------------------------------------------------------
 //
-// Calls TClonesArray::ExpandCreate() for fPixels
-//
-void MCalibrationTestCam::InitSize(const UInt_t i)
-{
-  fPixels->ExpandCreate(i);
+// Add MCalibrationTestPix's in the ranges from - to to fPixels
+//
+void MCalibrationTestCam::Add(const UInt_t a, const UInt_t b)
+{
+  for (UInt_t i=a; i<b; i++)
+    fPixels->AddAt(new MCalibrationTestPix,i);
 }
 
 // -------------------------------------------------------------------
 //
-// Calls TClonesArray::ExpandCreate() for:
-// - fAverageAreas
-//
-void MCalibrationTestCam::InitAverageAreas(const UInt_t i)
-{
-
-  fAverageAreas->ExpandCreate(i);
-
-  for (UInt_t j=0; j<i; j++)
-    GetAverageArea(j).SetPixId(j);
-  
-  fNumUninterpolated.Set(i);
+// Add MCalibrationTestPix's in the ranges from - to to fAverageAreas
+//
+void MCalibrationTestCam::AddArea(const UInt_t a, const UInt_t b)
+{
+  for (UInt_t i=a; i<b; i++)
+    fAverageAreas->AddAt(new MCalibrationTestPix,i);
 }
 
 // -------------------------------------------------------------------
 //
-// Calls TClonesArray::ExpandCreate() for:
-// - fAverageSectors
-//
-void MCalibrationTestCam::InitAverageSectors(const UInt_t i)
-{
-
-  fAverageSectors->ExpandCreate(i);
-
-  for (UInt_t j=0; j<i; j++)
-    GetAverageSector(j).SetPixId(j);
-
-}
-
-// -------------------------------------------------------------------
-//
-// Calls:
-// - InitSize()
-// - InitAverageAreas()
-// - InitAverageSectors()
-//
-void MCalibrationTestCam::Init(const MGeomCam &geom)
-{
-
-  InitSize          (geom.GetNumPixels() );
-  InitAverageAreas  (geom.GetNumAreas()  );
-  InitAverageSectors(geom.GetNumSectors());
-}
-
-// --------------------------------------------------------------------------
-//
-// Returns the current size of the TClonesArray fAverageAreas
-// independently if the MCalibrationPix is filled with values or not.
-//
-const Int_t MCalibrationTestCam::GetAverageAreas() const
-{
-  return fAverageAreas->GetEntriesFast();
-}
-
-// --------------------------------------------------------------------------
-//
-// Returns the current size of the TClonesArray fAverageSectors
-// independently if the MCalibrationPix is filled with values or not.
-//
-const Int_t MCalibrationTestCam::GetAverageSectors() const
-{
-  return fAverageSectors->GetEntriesFast();
-}
-
-
-// --------------------------------------------------------------------------
-//
-// Get i-th pixel (pixel number)
-//
-MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i)
-{
-  return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i));
-}
-
-// --------------------------------------------------------------------------
-//
-// Get i-th pixel (pixel number)
-//
-const MCalibrationTestPix &MCalibrationTestCam::operator[](UInt_t i) const
-{
-  return *static_cast<MCalibrationTestPix*>(fPixels->UncheckedAt(i));
-}
-
-// --------------------------------------------------------------------------
-//
-// Returns the current size of the TClonesArray fPixels 
-// independently if the MCalibrationTestPix is filled with values or not.
-//
-const Int_t MCalibrationTestCam::GetSize() const
-{
-  return fPixels->GetEntriesFast();
-}
-
-// --------------------------------------------------------------------------
-//
-// Get i-th average pixel (area number)
-//
-MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i)
-{
-  return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i));
-}
-
-// --------------------------------------------------------------------------
-//
-// Get i-th average pixel (area number)
-//
-const MCalibrationTestPix &MCalibrationTestCam::GetAverageArea(UInt_t i) const 
-{
-  return *static_cast<MCalibrationTestPix*>(fAverageAreas->UncheckedAt(i));
-}
-
-// --------------------------------------------------------------------------
-//
-// Get i-th average pixel (sector number)
-//
-MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i)
-{
-  return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i));
-}
-
-// --------------------------------------------------------------------------
-//
-// Get i-th average pixel (sector number)
-//
-const MCalibrationTestPix &MCalibrationTestCam::GetAverageSector(UInt_t i) const 
-{
-  return *static_cast<MCalibrationTestPix*>(fAverageSectors->UncheckedAt(i));
-}
+// Add MCalibrationTestPix's in the ranges from - to to fAverageSectors
+//
+void MCalibrationTestCam::AddSector(const UInt_t a, const UInt_t b)
+{
+  for (UInt_t i=a; i<b; i++)
+    fAverageSectors->AddAt(new MCalibrationTestPix,i);
+}
+
 
 // --------------------------------------------------------------------------
Index: /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h	(revision 5047)
@@ -2,10 +2,6 @@
 #define MARS_MCalibrationTestCam
 
-#ifndef MARS_MParContainer
-#include "MParContainer.h"
-#endif
-
-#ifndef MARS_MCamEvent
-#include "MCamEvent.h"
+#ifndef MARS_MCalibrationCam
+#include "MCalibrationCam.h"
 #endif
 
@@ -14,8 +10,5 @@
 #endif
 
-class TClonesArray;
-class MCalibrationTestPix;
-
-class MCalibrationTestCam : public MParContainer, public MCamEvent
+class MCalibrationTestCam : public MCalibrationCam
 {
 private:
@@ -24,22 +17,14 @@
   Int_t   fNumUninterpolatedInMaxCluster; // Number of not interpolateable pixels in biggest cluster
 
-  TClonesArray *fPixels;                  //-> Array of MCalibrationTestPix, one per pixel
-  TClonesArray *fAverageAreas;            //-> Array of MCalibrationTestPix, one per pixel area
-  TClonesArray *fAverageSectors;          //-> Array of MCalibrationTestPix, one per camera sector
+  void Add(const UInt_t a, const UInt_t b);
+  void AddArea(const UInt_t a, const UInt_t b);
+  void AddSector(const UInt_t a, const UInt_t b);
   
 public:
 
   MCalibrationTestCam(const char *name=NULL, const char *title=NULL);
-  ~MCalibrationTestCam();
   
-  void   Clear ( Option_t *o="" );
+  void Clear (Option_t *o="");
   
-  // Getters
-  const Int_t                GetAverageAreas      ()             const;
-        MCalibrationTestPix &GetAverageArea       ( UInt_t i );
-  const MCalibrationTestPix &GetAverageArea       ( UInt_t i )   const;
-        MCalibrationTestPix &GetAverageSector     ( UInt_t i );
-  const Int_t                GetAverageSectors    ()             const;  
-  const MCalibrationTestPix &GetAverageSector     ( UInt_t i   ) const;
   const Int_t                GetNumUninterpolated ( Int_t aidx ) const { 
 	return fNumUninterpolated[aidx];  }
@@ -48,17 +33,7 @@
   Bool_t                     GetPixelContent      ( Double_t &val, Int_t idx, 
 	                                            const MGeomCam &cam, Int_t type=0) const;
-  const Int_t                GetSize              ()             const;  
-
-        MCalibrationTestPix &operator[]           ( UInt_t i );
-  const MCalibrationTestPix &operator[]           ( UInt_t i ) const;
-
-  // Inits
-  void  Init               ( const MGeomCam &geom );
-  void  InitSize           ( const UInt_t i       );
-  void  InitAverageAreas   ( const UInt_t i       );
-  void  InitAverageSectors ( const UInt_t i       );
   
   // Prints
-  void  Print              ( Option_t *o=""       ) const;
+  void  Print (Option_t *o="") const;
 
   // Setters   
Index: /trunk/MagicSoft/Mars/mcalib/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/mcalib/Makefile	(revision 5046)
+++ /trunk/MagicSoft/Mars/mcalib/Makefile	(revision 5047)
@@ -41,4 +41,5 @@
            MCalibrationIntensityQECam.cc \
            MCalibrationIntensityRelTimeCam.cc \
+           MCalibrationIntensityTestCam.cc \
            MCalibrationCam.cc \
            MCalibrationPix.cc  \
@@ -60,6 +61,4 @@
            MCalibrationBlindCamOneOldStyle.cc  \
            MCalibrationBlindCamTwoNewStyle.cc  \
-           MCalibrationChargeBlindCamOneOldStyle.cc  \
-           MCalibrationChargeBlindCamTwoNewStyle.cc  \
            MCalibrationChargeBlindCam.cc  \
            MCalibrationChargeBlindPix.cc  \
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.cc	(revision 5046)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.cc	(revision 5047)
@@ -323,4 +323,6 @@
   *fLog << endl;
 
+  MCalibrationBlindCam *blindcam = fIntensBlind ? fIntensBlind->GetCam() : fBlindCam;
+      
   for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
     {
@@ -346,7 +348,5 @@
         }
 
-      MCalibrationBlindPix  &pix    = fIntensCam 
-        ? (MCalibrationBlindPix&)(*fIntensCam)[i] 
-        : (MCalibrationBlindPix&)(*fCam)[i];
+      MCalibrationBlindPix  &pix = (MCalibrationBlindPix&)(*blindcam)[i];
 
       FitBlindPixel(hist,pix);
Index: /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.h	(revision 5046)
+++ /trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeBlindCam.h	(revision 5047)
@@ -26,5 +26,5 @@
   Axis_t fSPheCut;                    // Signal value upon which event considered as single-phe
   
-  MRawEvtData *fRawEvt;                 //!  Raw event data
+  MRawEvtData *fRawEvt;               //!  Raw event data
 
 public:
@@ -32,11 +32,11 @@
   enum FitFunc_t { kEPoisson4, kEPoisson5,
                    kEPoisson6, kEPoisson7,
-                   kEPolya, kEMichele }; // Possible fit functions types (see MHCalibrationChargeBlindPix)
+                   kEPolya, kEMichele };    // Possible fit functions types (see MHCalibrationChargeBlindPix)
   
-  static const FitFunc_t fgFitFunc = kEPoisson4;    //! Default for fFitFunc
+  static const FitFunc_t fgFitFunc = kEPoisson4; //! Default for fFitFunc
 
 private:
 
-  FitFunc_t fFitFunc;                 // The actual fit function type
+  FitFunc_t fFitFunc;                              // The actual fit function type
   
   Bool_t SetupHists   (const MParList *pList );
@@ -58,6 +58,6 @@
   // Draw
   void  Draw(Option_t *opt="");
-  void  SetFitFunc( const FitFunc_t func=fgFitFunc)  { fFitFunc = func;  }
-  void  SetSPheCut( const Axis_t a=fgSPheCut )  { fSPheCut = a;  }    
+  void  SetFitFunc( const FitFunc_t func=fgFitFunc )  { fFitFunc = func;  }
+  void  SetSPheCut( const Axis_t    a   =fgSPheCut )  { fSPheCut = a;     }    
   
   ClassDef(MHCalibrationChargeBlindCam, 1)	// Histogram class for Blind Pixel Calibration
