Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 9518)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 9519)
@@ -126,5 +126,5 @@
 //
 MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title)
-    : fExtractor(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kTRUE), fIsMovieMode(kFALSE)
+    : fExtractor(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kTRUE), fIsMovieMode(kFALSE), fIsTestMode(kFALSE)
 {
     fName  = name  ? name  : "MJCalibrateSignal";
@@ -263,5 +263,5 @@
     if (fSequence.IsValid())
     {
-        if (fSequence.GetRuns(iter, MSequence::kRawDat)<=0)
+        if (fSequence.GetRuns(iter, fIsTestMode?MSequence::kRawCal:MSequence::kRawDat)<=0)
             return kFALSE;
     }
@@ -383,5 +383,5 @@
     read->AddFiles(iter);
 
-    const TString fname(Form("s/(([0-9]+_)?(M[12]_)?[0-9.]+)_D_(.*[.])(raw|raw[.]gz|root)$/%s\\/$1_Y_$4root/",
+    const TString fname(Form("s/(([0-9]+_)?(M[12]_)?[0-9.]+)_[CD]_(.*[.])(raw|raw[.]gz|root)$/%s\\/$1_Y_$4root/",
                              Esc(fPathOut).Data()));
 
@@ -460,4 +460,6 @@
     fcalped.AllowTriggerLvl2();
     fcalped.AllowSumTrigger();
+    if (fIsTestMode)
+        fcalped.AllowCalibration();
 
     // This will skip interleaved events with a cal- or ped-trigger
@@ -810,5 +812,5 @@
 
     //MFDataPhrase filcalco("MCalibrationConstCam.IsReadyToSave>0.5", "CalibConstFilter");
-    if (fIsInterlaced)
+    if (fIsInterlaced && !fIsTestMode)
     {
         // The task list is executed for all events with the calibration
@@ -867,5 +869,6 @@
     // Check if we have an extremely bright event (remove them,
     // they are presumably errornous events or calibration events)
-    tlist2.AddToList(&contbright);
+    if (!fIsTestMode)
+        tlist2.AddToList(&contbright);
 
     /*
Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h	(revision 9518)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h	(revision 9519)
@@ -25,4 +25,5 @@
     Bool_t fIsRelTimesUpdate;           // Choose to update relative times from interlaced
     Bool_t fIsMovieMode;                // Choose to encode a movie
+    Bool_t fIsTestMode;                 // Testmode to calibrate the cal run
 
     Bool_t CheckEnvLocal();
@@ -46,4 +47,5 @@
     void SetRelTimesUpdate(const Bool_t b=kTRUE) { fIsRelTimesUpdate = b; }
     void SetMovieMode     (const Bool_t b=kTRUE) { fIsMovieMode      = b; }
+    void SetTestMode      (const Bool_t b=kTRUE) { fIsTestMode       = b; }
 
     void SetExtractor(const MExtractor *ext=NULL);
