]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Update to make AliFMDParameters::Init return error code
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2012 13:08:53 +0000 (13:08 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Aug 2012 13:08:53 +0000 (13:08 +0000)
rather than dumping out with AliFatal.  Also check on
each Init whether the run number was the same as on the
previous call.  This allows us to have long-running clients
using the parameters - e.g., the DQM agents.

If parameters fail to load, we turn the reconstructor into a
zombie, and if this is a zombie, we do nothing in the sub-sequent
calls.   Note, a new AliFMDParameters::Init that succeeds will clear
this zombie state and bring the reconstructor back as Lazarus.

FMD/AliFMDParameters.cxx
FMD/AliFMDParameters.h
FMD/AliFMDQADataMakerRec.cxx
FMD/AliFMDReconstructor.cxx

index 7142e26eeb13727c37e4f7754a68298140d35c2e..b5673afa8fd9d4daed3abc3357e7bcb26ad243b7 100644 (file)
@@ -108,7 +108,8 @@ AliFMDParameters::AliFMDParameters()
     fPulseGain(0), 
     fDeadMap(0), 
     fAltroMap(0), 
-    fStripRange(0)
+  fStripRange(0),
+  fRunNo(-1)
 {
   //
   // Default constructor 
@@ -128,7 +129,19 @@ AliFMDParameters::AliFMDParameters()
 }
 
 //__________________________________________________________________
-void
+Bool_t
+AliFMDParameters::CheckForNewRun()
+{
+  Int_t run = AliCDBManager::Instance()->GetRun();
+  if (run != fRunNo) { 
+    fIsInit = false;
+    fRunNo = run;
+  }
+  return run != fRunNo;
+}
+
+//__________________________________________________________________
+UShort_t
 AliFMDParameters::Init(Bool_t forceReInit, UInt_t what)
 {
   // 
@@ -140,18 +153,24 @@ AliFMDParameters::Init(Bool_t forceReInit, UInt_t what)
   //    what        What to initialize 
   //
   if (forceReInit) fIsInit = kFALSE;
-  if (fIsInit) return;
-  if (what & kPulseGain)       InitPulseGain();
-  if (what & kPedestal)        InitPedestal();
-  if (what & kDeadMap)         InitDeadMap();
-  if (what & kSampleRate)      InitSampleRate();
-  if (what & kZeroSuppression) InitZeroSuppression();
-  if (what & kAltroMap)        InitAltroMap();
-  if (what & kStripRange)      InitStripRange();
+  CheckForNewRun();
+
+  if (fIsInit) return 0;
+
+  UShort_t errMask = 0;
+  if (what & kPulseGain)       errMask |= InitPulseGain();
+  if (what & kPedestal)        errMask |= InitPedestal();
+  if (what & kDeadMap)         errMask |= InitDeadMap();
+  if (what & kSampleRate)      errMask |= InitSampleRate();
+  if (what & kZeroSuppression) errMask |= InitZeroSuppression();
+  if (what & kAltroMap)        errMask |= InitAltroMap();
+  if (what & kStripRange)      errMask |= InitStripRange();
   fIsInit = kTRUE;
+
+  return errMask;
 }
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::Init(AliFMDPreprocessor* pp, Bool_t forceReInit, UInt_t what)
 {
   // 
@@ -164,15 +183,21 @@ AliFMDParameters::Init(AliFMDPreprocessor* pp, Bool_t forceReInit, UInt_t what)
   //    what        What to initialize 
   //
   if (forceReInit) fIsInit = kFALSE;
-  if (fIsInit) return;
-  if (what & kPulseGain)       InitPulseGain(pp);
-  if (what & kPedestal)        InitPedestal(pp);
-  if (what & kDeadMap)         InitDeadMap(pp);
-  if (what & kSampleRate)      InitSampleRate(pp);
-  if (what & kZeroSuppression) InitZeroSuppression(pp);
-  if (what & kAltroMap)        InitAltroMap(pp);
-  if (what & kStripRange)      InitStripRange(pp);
+  CheckForNewRun();
+
+  if (fIsInit) return 0;
+
+  UShort_t errMask = 0;
+  if (what & kPulseGain)       errMask |= InitPulseGain(pp);
+  if (what & kPedestal)        errMask |= InitPedestal(pp);
+  if (what & kDeadMap)         errMask |= InitDeadMap(pp);
+  if (what & kSampleRate)      errMask |= InitSampleRate(pp);
+  if (what & kZeroSuppression) errMask |= InitZeroSuppression(pp);
+  if (what & kAltroMap)        errMask |= InitAltroMap(pp);
+  if (what & kStripRange)      errMask |= InitStripRange(pp);
   fIsInit = kTRUE;
+
+  return errMask;
 }
 
 //__________________________________________________________________
@@ -203,7 +228,7 @@ AliFMDParameters::CheckFile(const char* prefix,
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::Init(const char* path, Bool_t forceReInit, UInt_t what)
 {
   // 
@@ -229,7 +254,9 @@ AliFMDParameters::Init(const char* path, Bool_t forceReInit, UInt_t what)
   //    what        What calibrations to load. 
   //  
   if (forceReInit) fIsInit = kFALSE;
-  if (fIsInit) return;
+  CheckForNewRun();
+
+  if (fIsInit) return 0;
 
   AliFMDCalibStripRange*  range = 0;
   AliFMDCalibSampleRate*  rate  = 0;
@@ -266,7 +293,7 @@ AliFMDParameters::Init(const char* path, Bool_t forceReInit, UInt_t what)
   if (peds)  what &= ~kPedestal;
   if (gains) what &= ~kPulseGain;
 
-  Init(kFALSE, what);
+  UShort_t ret = Init(kFALSE, what);
   
   if (range) SetStripRange(range);
   if (rate)  SetSampleRate(rate);
@@ -274,6 +301,8 @@ AliFMDParameters::Init(const char* path, Bool_t forceReInit, UInt_t what)
   if (gains) SetGain(gains);
 
   fIsInit = kTRUE;
+
+  return ret;
 }
 
 //__________________________________________________________________
@@ -669,7 +698,7 @@ AliFMDParameters::GetEntry(const char* path, AliFMDPreprocessor* pp,
 
     
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitPulseGain(AliFMDPreprocessor* pp)
 {
   // 
@@ -679,16 +708,22 @@ AliFMDParameters::InitPulseGain(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   gain     = GetEntry(fgkPulseGain, pp);
-  if (!gain) return;
+  if (!gain) return kPulseGain;
   
   AliFMDDebug(5, ("Got gain from CDB"));
   fPulseGain = dynamic_cast<AliFMDCalibGain*>(gain->GetObject());
-  if (!fPulseGain) AliFatal("Invalid pulser gain object from CDB");
-  if (!fPulseGain->Values().Ptr()) 
-    AliFatal("Empty pulser gain object from CDB");
+  if (!fPulseGain) { 
+    AliError("Invalid pulser gain object from CDB");
+    return kPulseGain;
+  }
+  if (!fPulseGain->Values().Ptr()) {
+    AliError("Empty pulser gain object from CDB");
+    return kPulseGain;
+  }
+  return 0;
 }
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitPedestal(AliFMDPreprocessor* pp)
 {
   //
@@ -698,16 +733,23 @@ AliFMDParameters::InitPedestal(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   pedestal = GetEntry(fgkPedestal, pp);
-  if (!pedestal) return;
+  if (!pedestal) return kPedestal;
 
   AliFMDDebug(5, ("Got pedestal from CDB"));
   fPedestal = dynamic_cast<AliFMDCalibPedestal*>(pedestal->GetObject());
-  if (!fPedestal) AliFatal("Invalid pedestal object from CDB");
-  if (!fPedestal->Values().Ptr()) AliFatal("Empty pedestal object from CDB");
+  if (!fPedestal) {
+    AliError("Invalid pedestal object from CDB");
+    return kPedestal;
+  }
+  if (!fPedestal->Values().Ptr()) {
+    AliError("Empty pedestal object from CDB");
+    return kPedestal;
+  }
+  return 0;
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitDeadMap(AliFMDPreprocessor* pp)
 {
   //
@@ -717,16 +759,23 @@ AliFMDParameters::InitDeadMap(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   deadMap  = GetEntry(fgkDead, pp);
-  if (!deadMap) return;
+  if (!deadMap) return kDeadMap;
   
   AliFMDDebug(5, ("Got dead map from CDB"));
   fDeadMap = dynamic_cast<AliFMDCalibDeadMap*>(deadMap->GetObject());
-  if (!fDeadMap) AliFatal("Invalid dead map object from CDB");
-  if (!fDeadMap->Ptr()) AliFatal("Empty dead map object from CDB");
+  if (!fDeadMap) { 
+    AliError("Invalid dead map object from CDB");
+    return kDeadMap;
+  }
+  if (!fDeadMap->Ptr()) {
+    AliError("Empty dead map object from CDB");
+    return kDeadMap;
+  }
+  return 0;
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitZeroSuppression(AliFMDPreprocessor* pp)
 {
   //
@@ -736,11 +785,15 @@ AliFMDParameters::InitZeroSuppression(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   zeroSup  = GetEntry(fgkZeroSuppression, pp);
-  if (!zeroSup) return;
+  if (!zeroSup) return kZeroSuppression;
+
   AliFMDDebug(5, ("Got zero suppression from CDB"));
   fZeroSuppression = 
     dynamic_cast<AliFMDCalibZeroSuppression*>(zeroSup->GetObject());
-  if (!fZeroSuppression)AliFatal("Invalid zero suppression object from CDB");
+  if (!fZeroSuppression) {
+    AliError("Invalid zero suppression object from CDB");
+    return kZeroSuppression;
+  }
   if (!fZeroSuppression->Ptr()) {
     AliWarningF("Empty zero suppression object from CDB, assuming %d",
                fFixedZeroSuppression);
@@ -749,10 +802,11 @@ AliFMDParameters::InitZeroSuppression(AliFMDPreprocessor* pp)
       delete fZeroSuppression;
     fZeroSuppression = 0;
   }
+  return 0;
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitSampleRate(AliFMDPreprocessor* pp)
 {
   //
@@ -762,16 +816,23 @@ AliFMDParameters::InitSampleRate(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   sampRat  = GetEntry(fgkSampleRate, pp);
-  if (!sampRat) return;
+  if (!sampRat) return kSampleRate;
+
   AliFMDDebug(5, ("Got zero suppression from CDB"));
   fSampleRate = dynamic_cast<AliFMDCalibSampleRate*>(sampRat->GetObject());
-  if (!fSampleRate) AliFatal("Invalid sample rate object from CDB");
-  if (!fSampleRate->Rates().Ptr()) 
-    AliFatal("empty sample rate object from CDB");
+  if (!fSampleRate) {
+    AliError("Invalid sample rate object from CDB");
+    return kSampleRate;
+  }
+  if (!fSampleRate->Rates().Ptr()) { 
+    AliError("empty sample rate object from CDB");
+    return kSampleRate;
+  }
+  return 0;
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitAltroMap(AliFMDPreprocessor* pp)
 {
   //
@@ -785,18 +846,20 @@ AliFMDParameters::InitAltroMap(AliFMDPreprocessor* pp)
     fAltroMap = 0;
   }
   AliCDBEntry*   hwMap    = GetEntry(fgkAltroMap, pp, kFALSE);       
-  if (!hwMap) return;
-
-  AliFMDDebug(5, ("Got ALTRO map from CDB"));
-  fAltroMap = dynamic_cast<AliFMDAltroMapping*>(hwMap->GetObject());
+  if (hwMap) {
+    AliFMDDebug(5, ("Got ALTRO map from CDB"));
+    fAltroMap = dynamic_cast<AliFMDAltroMapping*>(hwMap->GetObject());
+  }
   if (!fAltroMap) {
-    AliFatal("Invalid ALTRO map object from CDB");
+    AliError("Invalid ALTRO map object from CDB");
     fAltroMap = new AliFMDAltroMapping;
+    // return kAltroMap;
   }
+  return 0;
 }
 
 //__________________________________________________________________
-void
+UShort_t
 AliFMDParameters::InitStripRange(AliFMDPreprocessor* pp)
 {
   //
@@ -806,12 +869,20 @@ AliFMDParameters::InitStripRange(AliFMDPreprocessor* pp)
   //    pp Pre-processor if called from shuttle
   //
   AliCDBEntry*   range    = GetEntry(fgkStripRange, pp);
-  if (!range) return;
+  if (!range) return kStripRange;
+
   AliFMDDebug(5, ("Got strip range from CDB"));
   fStripRange = dynamic_cast<AliFMDCalibStripRange*>(range->GetObject());
-  if (!fStripRange) AliFatal("Invalid strip range object from CDB");
-  if (!fStripRange->Ranges().Ptr()) 
-    AliFatal("Empty strip range object from CDB");
+
+  if (!fStripRange) {
+    AliError("Invalid strip range object from CDB");
+    return kStripRange;
+  }
+  if (!fStripRange->Ranges().Ptr()) {
+    AliError("Empty strip range object from CDB");
+    return kStripRange;
+  }
+  return 0;
 }
 
 
index e4993cfe77b95faba3ea43012fbf004bb400ff34..eebf33b61e4729a39c4d58540a87ef7f98c9e059 100644 (file)
@@ -102,8 +102,10 @@ public:
    *
    * @param forceReInit Force (re-)initalize flag
    * @param what        What to initialize 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */
-  void Init(Bool_t forceReInit=kFALSE, UInt_t what=kAll );
+  UShort_t Init(Bool_t forceReInit=kFALSE, UInt_t what=kAll );
   /** 
    * Initialize the manager.  This tries to read the parameters from
    * CDB.  If that fails, the class uses the hard-coded parameters.
@@ -111,8 +113,10 @@ public:
    * @param pp          Preprocessor 
    * @param forceReInit Force (re-)initalize flag
    * @param what        What to initialize 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */
-  void Init(AliFMDPreprocessor* pp, 
+  UShort_t Init(AliFMDPreprocessor* pp, 
            Bool_t              forceReInit=kFALSE, 
            UInt_t              what=kAll);
   /** 
@@ -135,10 +139,12 @@ public:
    * @param path        Where to look for the CSV files
    * @param forceReInit Always reinitialise 
    * @param what        What calibrations to load. 
+   *
+   * @return 0 on success, bit mask of failed elements otherwise
    */  
-  void Init(const char* path, 
-           Bool_t      forceReInit=kFALSE, 
-           UInt_t      what=kAll);
+  UShort_t Init(const char* path, 
+               Bool_t      forceReInit=kFALSE, 
+               UInt_t      what=kAll);
   
   /** 
    * Automatically generate a dead map from the pedestals and gains.
@@ -636,7 +642,8 @@ protected:
       fPulseGain(o.fPulseGain),
       fDeadMap(o.fDeadMap),
       fAltroMap(o.fAltroMap),
-      fStripRange(o.fStripRange)
+    fStripRange(o.fStripRange), 
+    fRunNo(o.fRunNo)
   {}
   /** 
    * Assignement operator 
@@ -680,44 +687,59 @@ protected:
    * Initialize gains.  Try to get them from CDB 
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitPulseGain(AliFMDPreprocessor* pp=0);
+  UShort_t InitPulseGain(AliFMDPreprocessor* pp=0);
   /**
    * Initialize pedestals.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitPedestal(AliFMDPreprocessor* pp=0);
+  UShort_t InitPedestal(AliFMDPreprocessor* pp=0);
   /**
    * Initialize dead map.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitDeadMap(AliFMDPreprocessor* pp=0);
+  UShort_t InitDeadMap(AliFMDPreprocessor* pp=0);
   /**
    * Initialize sample rates.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitSampleRate(AliFMDPreprocessor* pp=0);
+  UShort_t InitSampleRate(AliFMDPreprocessor* pp=0);
   /**
    * Initialize zero suppression thresholds.  Try to get them from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitZeroSuppression(AliFMDPreprocessor* pp=0);
+  UShort_t InitZeroSuppression(AliFMDPreprocessor* pp=0);
   /**
    * Initialize hardware map.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitAltroMap(AliFMDPreprocessor* pp=0);
+  UShort_t InitAltroMap(AliFMDPreprocessor* pp=0);
   /**
    * Initialize strip range.  Try to get it from CDB
    *
    * @param pp Pre-processor if called from shuttle
+   * 
+   * @return 0 on success, error mask otherwise 
    */
-  void InitStripRange(AliFMDPreprocessor* pp=0);
+  UShort_t InitStripRange(AliFMDPreprocessor* pp=0);
+  Bool_t CheckForNewRun();
 
   Bool_t          fIsInit;                   // Whether we've been initialised  
 
@@ -759,8 +781,9 @@ protected:
   AliFMDCalibDeadMap*         fDeadMap;         // Pulser gain
   AliFMDAltroMapping*         fAltroMap;        // Map of hardware
   AliFMDCalibStripRange*      fStripRange;      // Strip range
+  Int_t                       fRunNo;           // Initialized for this run
   
-  ClassDef(AliFMDParameters,6) // Manager of parameters
+  ClassDef(AliFMDParameters,7) // Manager of parameters
 };
 
 //__________________________________________________________________
index f515ce2e1ddb0d8c3ed01faf318327798786f3ac..40c7ee3513aebee456094f2ff99e376e81ef625c 100644 (file)
@@ -501,10 +501,10 @@ void AliFMDQADataMakerRec::MakeRecPoints(TTree* clustersTree)
 //_____________________________________________________________________ 
 void AliFMDQADataMakerRec::StartOfDetectorCycle()
 {
-  // What 
-  // to 
-  // do?
-  
+  // Do an init on the reconstructor.  If we have the
+  // same run nothing happens, but if we have a new run, we update our
+  // parameters.
+  if (fUseReconstructor && fReconstructor) fReconstructor->Init();
   if (fRawsQAList) {
     for (Int_t index = 0 ; index < AliRecoParam::kNSpecies ; index++) {
       if (!fRawsQAList[index]) continue;
index be523f62b5d6b4f7b6119aed84e56a57c96e9c38..6bd2937707c9dc528291947beced2ab1e96e1179 100644 (file)
@@ -83,7 +83,8 @@ AliFMDReconstructor::AliFMDReconstructor()
     fDiagStep3(0),
     fDiagStep4(0),
     fDiagAll(0),
-    fBad(0)
+    fBad(0), 
+    fZombie(false)
 {
   // Make a new FMD reconstructor object - default CTOR.  
   SetNoiseFactor();
@@ -117,7 +118,12 @@ AliFMDReconstructor::Init()
 
   // Initialize the parameters
   AliFMDParameters* param = AliFMDParameters::Instance();
-  param->Init();
+  if (param->Init() != 0) {
+    AliError("Failed to initialize parameters, making zombie");
+    fZombie = true;
+  }
+  else 
+    fZombie = false;
   
   // Current vertex position
   fCurrentVertex = 0;
@@ -129,32 +135,42 @@ AliFMDReconstructor::Init()
   // Check if we need diagnostics histograms 
   if (!fDiagnostics) return;
   AliInfo("Making diagnostics histograms");
-  fDiagStep1   = new TH2I("diagStep1", "Read ADC vs. Noise surpressed ADC",
-                       1024, -.5, 1023.5, 1024, -.5, 1023.5);
-  fDiagStep1->SetDirectory(0);
-  fDiagStep1->GetXaxis()->SetTitle("ADC (read)");
-  fDiagStep1->GetYaxis()->SetTitle(Form("ADC (noise surpressed %4.f)", 
-                                       fNoiseFactor));
-  fDiagStep2  = new TH2F("diagStep2",  "ADC vs Edep deduced",
-                       1024, -.5, 1023.5, 100, 0, 2);
-  fDiagStep2->SetDirectory(0);
-  fDiagStep2->GetXaxis()->SetTitle("ADC (noise surpressed)");
-  fDiagStep2->GetYaxis()->SetTitle("#Delta E [GeV]");
-  fDiagStep3  = new TH2F("diagStep3",  "Edep vs Edep path corrected",
-                       100, 0., 2., 100, 0., 2.);
-  fDiagStep3->SetDirectory(0);
-  fDiagStep3->GetXaxis()->SetTitle("#Delta E [GeV]");
-  fDiagStep3->GetYaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
-  fDiagStep4  = new TH2F("diagStep4",  "Edep vs Multiplicity deduced", 
-                       100, 0., 2., 100, -.1, 19.9);
-  fDiagStep4->SetDirectory(0);
-  fDiagStep4->GetXaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
-  fDiagStep4->GetYaxis()->SetTitle("Multiplicity");
-  fDiagAll    = new TH2F("diagAll",    "Read ADC vs Multiplicity deduced", 
-                        1024, -.5, 1023.5, 100, -.1, 19.9);
-  fDiagAll->SetDirectory(0);
-  fDiagAll->GetXaxis()->SetTitle("ADC (read)");
-  fDiagAll->GetYaxis()->SetTitle("Multiplicity");
+  if (!fDiagStep1) {
+    fDiagStep1   = new TH2I("diagStep1", "Read ADC vs. Noise surpressed ADC",
+                           1024, -.5, 1023.5, 1024, -.5, 1023.5);
+    fDiagStep1->SetDirectory(0);
+    fDiagStep1->GetXaxis()->SetTitle("ADC (read)");
+    fDiagStep1->GetYaxis()->SetTitle(Form("ADC (noise surpressed %4.f)", 
+                                         fNoiseFactor));
+  }
+  if (!fDiagStep2) {
+    fDiagStep2  = new TH2F("diagStep2",  "ADC vs Edep deduced",
+                          1024, -.5, 1023.5, 100, 0, 2);
+    fDiagStep2->SetDirectory(0);
+    fDiagStep2->GetXaxis()->SetTitle("ADC (noise surpressed)");
+    fDiagStep2->GetYaxis()->SetTitle("#Delta E [GeV]");
+  }
+  if (!fDiagStep3) {
+    fDiagStep3  = new TH2F("diagStep3",  "Edep vs Edep path corrected",
+                          100, 0., 2., 100, 0., 2.);
+    fDiagStep3->SetDirectory(0);
+    fDiagStep3->GetXaxis()->SetTitle("#Delta E [GeV]");
+    fDiagStep3->GetYaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
+  }
+  if (!fDiagStep4) {
+    fDiagStep4  = new TH2F("diagStep4",  "Edep vs Multiplicity deduced", 
+                          100, 0., 2., 100, -.1, 19.9);
+    fDiagStep4->SetDirectory(0);
+    fDiagStep4->GetXaxis()->SetTitle("#Delta E/#Delta x #times #delta x [GeV]");
+    fDiagStep4->GetYaxis()->SetTitle("Multiplicity");
+    fDiagAll    = new TH2F("diagAll",    "Read ADC vs Multiplicity deduced", 
+                          1024, -.5, 1023.5, 100, -.1, 19.9);
+  }
+  if (!fDiagAll) {
+    fDiagAll->SetDirectory(0);
+    fDiagAll->GetXaxis()->SetTitle("ADC (read)");
+    fDiagAll->GetYaxis()->SetTitle("Multiplicity");
+  }
 }
 
 //____________________________________________________________________
@@ -163,6 +179,10 @@ AliFMDReconstructor::ConvertDigits(AliRawReader* reader,
                                   TTree* digitsTree) const
 {
   // Convert Raw digits to AliFMDDigit's in a tree 
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   AliFMDDebug(1, ("Reading raw data into digits tree"));
   if (!digitsTree) { 
     AliError("No digits tree passed");
@@ -317,6 +337,10 @@ void
 AliFMDReconstructor::Reconstruct(AliFMDRawReader& rawReader) const
 {
   AliFMDDebug(1, ("Reconstructing from FMD raw reader"));
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   fBad.Reset(false);
   UShort_t det, sec, str, fac;
   Short_t  adc, oldDet = -1;
@@ -347,6 +371,10 @@ AliFMDReconstructor::Reconstruct(AliRawReader* reader, TTree*) const
   //   reader  Raw event reader 
   //   ctree    Not used - 'cluster tree' to store rec-points in. 
   AliFMDDebug(1, ("Reconstructing from raw reader"));
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   AliFMDRawReader rawReader(reader, 0);
   Reconstruct(rawReader);
 }
@@ -361,6 +389,10 @@ AliFMDReconstructor::Digitize(AliRawReader* reader, TClonesArray* sdigits) const
   // Parameters: 
   //   reader  Raw event reader 
   //   ctree    Not used. 
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   AliFMDRawReader rawReader(reader, 0);
 
   UShort_t det, sec, str, sam, rat, fac;
@@ -395,6 +427,10 @@ AliFMDReconstructor::Reconstruct(TTree* digitsTree,
   //   digitsTree      Pointer to a tree containing digits 
   //   clusterTree     Pointer to output tree 
   // 
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   if (!fMult) fMult = new TClonesArray("AliFMDRecPoint");
 
   AliFMDDebug(1, ("Reconstructing from digits in a tree"));
@@ -445,6 +481,10 @@ AliFMDReconstructor::ProcessDigits(TClonesArray* digits,
   // Parameters: 
   //    digits Array of digits
   // 
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   AliFMDAltroMapping* map = AliFMDParameters::Instance()->GetAltroMap();
   for (size_t i = 1; i <= 3; i++) { 
     fZS[i-1]       = rawRead.IsZeroSuppressed(map->Detector2DDL(i));
@@ -932,6 +972,10 @@ AliFMDReconstructor::FillESD(TTree*  /* digitsTree */,
   // FIXME: The vertex may not be known when Reconstruct is executed,
   // so we may have to move some of that member function here. 
   AliFMDDebug(2, ("Calling FillESD with two trees and one ESD"));
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   // fESDObj->Print();
 
   // Fix up ESD so that only truely dead channels get the kInvalidMult flag. 
@@ -994,6 +1038,10 @@ AliFMDReconstructor::FillESD(AliRawReader*, TTree* clusterTree,
   // 
   // Forwards to above member function 
   //
+  if (fZombie { 
+    AliWarning("I'm a zombie - cannot do anything");
+    return;
+  }
   TTree* dummy = 0;
   FillESD(dummy, clusterTree, esd);
 }