Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5012)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5013)
@@ -32,4 +32,8 @@
 
  2004/09/14: Markus Gaug
+
+   * mbadpixels/MBadPixelsIntensityCam.[h,cc]
+   * mcalib/MCalibrationIntensityCam.[h,cc]
+     - replace TClonesArray by TObjArray
 
    * mjobs/MJCalibration.cc
Index: /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.cc	(revision 5012)
+++ /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.cc	(revision 5013)
@@ -54,9 +54,9 @@
 // Default constructor. 
 //
-// Set the following pointer to NULL:
+// Initializes and sets owner of:
 // - fCams
+// - Initializes fCams to entry 
 //
 MBadPixelsIntensityCam::MBadPixelsIntensityCam(const char *name, const char *title)
-    : fCams(NULL)
 {
 
@@ -64,9 +64,13 @@
   fTitle = title ? title : "Base container for the Intensity Calibration";
   
-}
-
-// --------------------------------------------------------------------------
-//
-// Deletes the histograms if they exist
+  fCams = new TObjArray;
+  fCams->SetOwner();
+
+  InitSize(1);
+}
+
+// --------------------------------------------------------------------------
+//
+// Deletes the cameras if they exist
 //
 MBadPixelsIntensityCam::~MBadPixelsIntensityCam()
@@ -84,5 +88,8 @@
 {
 
-  fCams->ExpandCreate(GetSize()+1);
+  const Int_t size = GetSize();
+  fCams->Expand(size+1);
+
+  (*fCams)[size] = new MBadPixelsCam;
 
   GetCam()->SetName(name);
@@ -141,5 +148,9 @@
 void MBadPixelsIntensityCam::InitSize(const UInt_t n)
 {
-  fCams->ExpandCreate(n);
+
+  fCams->Expand(n);
+
+  for (Int_t i=0; i<fCams->GetSize(); i++)
+    (*fCams)[i] = new MBadPixelsCam;
 }
 
@@ -153,4 +164,5 @@
   if (GetSize() == 0)
     InitSize(1);
+
   fCams->ForEach(MBadPixelsCam,Init)(geom);
 }
@@ -164,5 +176,5 @@
 Int_t MBadPixelsIntensityCam::GetSize() const 
 {
-  return fCams->GetEntriesFast();
+  return fCams->GetEntries();
 }
 
Index: /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h
===================================================================
--- /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h	(revision 5012)
+++ /trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h	(revision 5013)
@@ -12,5 +12,5 @@
 #endif
 
-class TClonesArray;
+class TObjArray;
 class MGeomCam;
 class MBadPixelsIntensityCam : public MParContainer, public MCamEvent
@@ -22,5 +22,5 @@
 protected:  
 
-  TClonesArray *fCams;        //-> Array of MBadPixelsCams, one per pulse colour and intensity
+  TObjArray *fCams;        //-> Array of MBadPixelsCams, one per pulse colour and intensity
 
 public:
