Index: trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc	(revision 9265)
+++ trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc	(revision 9270)
@@ -33,4 +33,5 @@
 //
 //  Input Containers:
+//   MGeomCam
 //   MAnalogChannels
 //   TriggerPos [MParameterD]
@@ -53,4 +54,6 @@
 #include "MParameters.h"
 
+#include "MGeomCam.h"
+
 #include "MRawRunHeader.h"
 #include "MRawEvtHeader.h"
@@ -104,5 +107,4 @@
     }
 
-
     fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
     if (!fRunHeader)
@@ -112,9 +114,21 @@
     }
 
-    // -----------------------------------------------------------------------
-
     fData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData");
     if (!fData)
         return kFALSE;
+
+    return kTRUE;
+}
+
+Bool_t MSimReadout::ReInit(MParList *plist)
+{
+    MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam");
+    if (!cam)
+    {
+        *fLog << err << "MGeomCam not found... aborting." << endl;
+        return kFALSE;
+    }
+
+    fRunHeader->InitPixels(cam->GetNumPixels());
 
     fData->InitRead(fRunHeader);
@@ -134,5 +148,5 @@
     if (fData->GetNumLoGainSamples()>0)
     {
-        *fLog << err << "ERROR - Lo-gains not implemented yet." << endl;
+        *fLog << err << "ERROR - MSimReadout: Lo-gains not implemented yet." << endl;
         return kERROR;
     }
@@ -141,8 +155,9 @@
     const UInt_t npix = fData->GetNumPixels();
 
-    // Sanity check
-    if (fData->GetNumPixels()!=fCamera->GetNumChannels())
-    {
-        *fLog << err << "ERROR - Number of analog channels doen't match number of pixels." << endl;
+    if (npix!=fCamera->GetNumChannels())
+    {
+        *fLog << err;
+        *fLog << "ERROR - Number of analog channels " << fCamera->GetNumChannels();
+        *fLog << " doesn't match number of pixels " << fData->GetNumPixels() << endl;
         return kERROR;
     }
@@ -150,5 +165,5 @@
     if (fTrigger->GetVal()<0)
     {
-        *fLog << err << "ERROR - MSimReadout executed for an event which has no trigger." << endl;
+        *fLog << err << "ERROR - MSimReadout: MSimReadout executed for an event which has no trigger." << endl;
         return kERROR;
     }
Index: trunk/MagicSoft/Mars/msimcamera/MSimReadout.h
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimReadout.h	(revision 9265)
+++ trunk/MagicSoft/Mars/msimcamera/MSimReadout.h	(revision 9270)
@@ -23,6 +23,7 @@
 
     // MTask
-    Int_t PreProcess(MParList *pList);
-    Int_t Process();
+    Int_t  PreProcess(MParList *pList);
+    Int_t  Process();
+    Bool_t ReInit(MParList *pList);
 
 public:
