Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h	(revision 3698)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.h	(revision 3699)
@@ -58,52 +58,52 @@
   ~MCalibrationChargeBlindPix() {}
   
-  void Clear(Option_t *o="");
-
-  // Setters
-  void SetColor            ( const MCalibrationCam::PulserColor_t color ) { fColor  = color; }
-  void SetLambda           ( const Float_t f )                    { fLambda         = f;   }
-  void SetLambdaVar        ( const Float_t f )                    { fLambdaVar      = f;   }
-  void SetLambdaCheck      ( const Float_t f )                    { fLambdaCheck    = f;   }
-  void SetLambdaCheckErr   ( const Float_t f )                    { fLambdaCheckErr = f;   }
-  void SetMu0              ( const Float_t f )                    { fMu0            = f;   }
-  void SetMu0Err           ( const Float_t f )                    { fMu0Err         = f;   }
-  void SetMu1              ( const Float_t f )                    { fMu1            = f;   }
-  void SetMu1Err           ( const Float_t f )                    { fMu1Err         = f;   }
-  void SetSigma0           ( const Float_t f )                    { fSigma0         = f;   }
-  void SetSigma0Err        ( const Float_t f )                    { fSigma0Err      = f;   }
-  void SetSigma1           ( const Float_t f )                    { fSigma1         = f;   }
-  void SetSigma1Err        ( const Float_t f )                    { fSigma1Err      = f;   }
-
-  void SetOscillating      ( const Bool_t  b=kTRUE);
-  void SetChargeFitValid   ( const Bool_t  b=kTRUE);
-  void SetPedestalFitOK    ( const Bool_t  b=kTRUE);
-  void SetSinglePheFitOK   ( const Bool_t  b=kTRUE);
-  void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE);
+  Bool_t CalcFluxInsidePlexiglass();
+  void   Clear(Option_t *o="");
   
   // Getters
-  Float_t GetLambda()                     const { return fLambda;               }
-  Float_t GetLambdaErr()                  const;
-  Float_t GetLambdaRelVar()               const;  
-  Float_t GetLambdaCheck()                const { return fLambdaCheck;          }
-  Float_t GetLambdaCheckErr()             const { return fLambdaCheckErr;       }
-  Float_t GetFluxInsidePlexiglass()       const { return fFluxInsidePlexiglass; }
-  Float_t GetFluxInsidePlexiglassErr()    const;
-  Float_t GetFluxInsidePlexiglassRelVar() const;  
-  Float_t GetMu0()                        const { return fMu0;                  }
-  Float_t GetMu0Err()                     const { return fMu0Err;               }
-  Float_t GetMu1()                        const { return fMu1;                  }
-  Float_t GetMu1Err()                     const { return fMu1Err;               }
-  Float_t GetSigma0()                     const { return fSigma0;               }
-  Float_t GetSigma0Err()                  const { return fSigma0Err;            } 
-  Float_t GetSigma1()                     const { return fSigma1;               }
-  Float_t GetSigma1Err()                  const { return fSigma1Err;            }
+  MCalibrationCam::PulserColor_t GetColor () const { return fColor;                }
+  Float_t GetLambda                       () const { return fLambda;               }
+  Float_t GetLambdaErr                    () const;
+  Float_t GetLambdaRelVar                 () const;  
+  Float_t GetLambdaCheck                  () const { return fLambdaCheck;          }
+  Float_t GetLambdaCheckErr               () const { return fLambdaCheckErr;       }
+  Float_t GetFluxInsidePlexiglass         () const { return fFluxInsidePlexiglass; }
+  Float_t GetFluxInsidePlexiglassErr      () const;
+  Float_t GetFluxInsidePlexiglassRelVar   () const;  
+  Float_t GetMu0                          () const { return fMu0;                  }
+  Float_t GetMu0Err                       () const { return fMu0Err;               }
+  Float_t GetMu1                          () const { return fMu1;                  }
+  Float_t GetMu1Err                       () const { return fMu1Err;               }
+  Float_t GetSigma0                       () const { return fSigma0;               }
+  Float_t GetSigma0Err                    () const { return fSigma0Err;            } 
+  Float_t GetSigma1                       () const { return fSigma1;               }
+  Float_t GetSigma1Err                    () const { return fSigma1Err;            }
 
-  Bool_t  IsOscillating()                    const;
-  Bool_t  IsChargeFitValid()                 const;
-  Bool_t  IsPedestalFitOK()                  const;
-  Bool_t  IsSinglePheFitOK()                 const;
-  Bool_t  IsFluxInsidePlexiglassAvailable()  const;
+  Bool_t  IsOscillating                   () const;
+  Bool_t  IsChargeFitValid                () const;
+  Bool_t  IsPedestalFitOK                 () const;
+  Bool_t  IsSinglePheFitOK                () const;
+  Bool_t  IsFluxInsidePlexiglassAvailable () const;
   
-  Bool_t CalcFluxInsidePlexiglass();
+  // Setters
+  void SetColor          ( const MCalibrationCam::PulserColor_t color ) { fColor      = color; }
+  void SetLambda         ( const Float_t f )                            { fLambda         = f; }
+  void SetLambdaVar      ( const Float_t f )                            { fLambdaVar      = f; }
+  void SetLambdaCheck    ( const Float_t f )                            { fLambdaCheck    = f; }
+  void SetLambdaCheckErr ( const Float_t f )                            { fLambdaCheckErr = f; }
+  void SetMu0            ( const Float_t f )                            { fMu0            = f; }
+  void SetMu0Err         ( const Float_t f )                            { fMu0Err         = f; }
+  void SetMu1            ( const Float_t f )                            { fMu1            = f; }
+  void SetMu1Err         ( const Float_t f )                            { fMu1Err         = f; }
+  void SetSigma0         ( const Float_t f )                            { fSigma0         = f; }
+  void SetSigma0Err      ( const Float_t f )                            { fSigma0Err      = f; }
+  void SetSigma1         ( const Float_t f )                            { fSigma1         = f; }
+  void SetSigma1Err      ( const Float_t f )                            { fSigma1Err      = f; }
+
+  void SetOscillating    ( const Bool_t  b=kTRUE );
+  void SetChargeFitValid ( const Bool_t  b=kTRUE );
+  void SetPedestalFitOK  ( const Bool_t  b=kTRUE );
+  void SetSinglePheFitOK ( const Bool_t  b=kTRUE );
+  void SetFluxInsidePlexiglassAvailable( const Bool_t b=kTRUE);
 
   ClassDef(MCalibrationChargeBlindPix, 1)	// Container Charge Calibration Results Blind Pixel
Index: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3698)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc	(revision 3699)
@@ -418,18 +418,40 @@
   // Initialize the pulser colours
   //
+  if (fCam->GetPulserColor() == MCalibrationCam::kNONE)
+    {
+      fCam->SetPulserColor( fPulserColor );
+      
+      if (fBlindPixel)
+        fBlindPixel->SetColor( fPulserColor );
+      
+      if (fPINDiode)
+        fPINDiode->SetColor( fPulserColor );
+    }
+
   if (fPulserColor != fCam->GetPulserColor())
     {
-      *fLog << err << GetDescriptor() << ": Pulser colour has changed w.r.t. last file."
-            << "This feature is not yet implemented, sorry ... aborting " << endl;
-      return kFALSE;
-    }
-
-  fCam->SetPulserColor( fPulserColor );
+      *fLog << err << GetDescriptor() 
+            << ": Pulser colour has changed w.r.t. last file in MCalibrationChargeCam" << endl;
+      *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl;
+      return kFALSE;
+    }
 
   if (fBlindPixel)
-    fBlindPixel->SetColor( fPulserColor );
+    if (fPulserColor != fBlindPixel->GetColor())
+      {
+        *fLog << err << GetDescriptor() 
+              << ": Pulser colour has changed w.r.t. last file in MCalibrationChargeBlindPix." << endl;
+        *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl;
+        return kFALSE;
+      }
   
   if (fPINDiode)
-    fPINDiode->SetColor( fPulserColor );
+    if (fPulserColor != fPINDiode->GetColor())
+      {
+        *fLog << err << GetDescriptor() 
+              << ": Pulser colour has changed w.r.t. last file in MCalibrationChargePINDiode." << endl;
+        *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl;
+        return kFALSE;
+      }
   
 
