Index: trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 7366)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc	(revision 7374)
@@ -429,21 +429,47 @@
     // output information or warnings:
     //
-    switch(fSignalType)
+    switch (fSignalType)
     {
     case kPhe:
-      *fLog << inf << "Calibrating in units of equivalent (outer/inner=4) photo-electrons." << endl;
-      break;
+        *fLog << inf << "Calibrating in units of equivalent (outer/inner=4) photo-electrons." << endl;
+        break;
     case kPhot:
-      *fLog << inf << "Calibrating in units of photons." << endl;
-      break;
+        *fLog << inf << "Calibrating in units of photons." << endl;
+        break;
     }
 
     if (header->IsMonteCarloRun())
     {
-        *fLog << "Additional scale factor: 1 (MonteCarloRun)" << endl;
+        *fLog << inf << "Additional scale factor forced to: 1 (MonteCarloRun)" << endl;
         fScaleFactor = 1;
     }
     else
-        *fLog << "Additional scale factor: " << fScaleFactor << endl;
+    {
+        if (!fFileNameScale.IsNull())
+        {
+            if (gSystem->AccessPathName(fFileNameScale, kFileExists))
+            {
+                *fLog << err << "ERROR - Configuration file '" << fFileNameScale << "' doesn't exist... abort." << endl;
+                return kFALSE;
+            }
+
+            const Int_t   p   = header->GetRunStart().GetMagicPeriod();
+            const TString per = Form("%2d", p);
+
+            TEnv rc(fFileNameScale);
+            const Double_t scale = rc.GetValue(per, -1.);
+
+            if (scale<=0)
+            {
+                *fLog << err << "ERROR - No valid entry for scale factor found for period " << p << " in " << fFileNameScale << "... abort." << endl;
+                return kFALSE;
+            }
+
+            *fLog << inf << "New additional scale factor for period " << p << ": " << scale << endl;
+            fScaleFactor = scale;
+        }
+        else
+            *fLog << inf << "Additional scale factor set to: " << fScaleFactor << endl;
+    }
 
     const Int_t npixels = fGeomCam->GetNumPixels();
@@ -931,4 +957,10 @@
     }
 
+    if (IsEnvDefined(env, prefix, "FileNameScale", print))
+    {
+        fFileNameScale = GetEnvValue(env, prefix, "FileNameScale", fFileNameScale);
+        rc = kTRUE;
+    }
+
     return rc;
 }
Index: trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
===================================================================
--- trunk/MagicSoft/Mars/mcalib/MCalibrateData.h	(revision 7366)
+++ trunk/MagicSoft/Mars/mcalib/MCalibrateData.h	(revision 7374)
@@ -79,5 +79,7 @@
   Float_t  fRenormFactor;                // Possible renormalization factor for signals (-> phes)
   Float_t  fScaleFactor;                 // Possible scale factor for signals
-  
+
+  TString  fFileNameScale;               // File name for list of scale factors
+
   TList   fNamesPedestal;                // Names of input and output pedestal conatainer
   TList   fPedestalCams;                 //! List of pointers to input MPedestalCam
@@ -106,5 +108,5 @@
   void   EnablePedestalType(PedestalType_t i)     { fPedestalFlag |=  i;      }
 
-  Int_t  GetSize() const { return fCalibConsts.GetSize(); }
+  //Int_t  GetSize() const { return fCalibConsts.GetSize(); }
 
   void   Print(Option_t *o="") const;
