Index: trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 9212)
+++ trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc	(revision 9230)
@@ -380,5 +380,6 @@
     read->AddFiles(iter);
 
-    const TString fname(Form("%s{s/_D_/_Y_}{s/\\.raw$/.root}{s/\\.raw\\.gz$/.root}", fPathOut.Data()));
+    const TString fname(Form("s/([0-9]+_[0-9]+)_D_(.*[.])(raw([.]gz)?)$/%s\\/$1_Y_$2root/",
+                             Esc(fPathOut).Data()));
 
     // Skips MC which have no contents. This are precisely the
@@ -389,5 +390,5 @@
     //MPointingPosInterpolate pextr;
     //pextr.AddFiles(&iter);
-    
+
     MGeomApply             apply; // Only necessary to create geometry
     if (!geom.IsNull())
Index: trunk/MagicSoft/Mars/mjobs/MJStar.cc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 9212)
+++ trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 9230)
@@ -302,5 +302,5 @@
     // Effective on-time need its own not to be skipped by (eg) image cleaning
     // Muons needs its own to have a unique SetReadyToSave
-    const TString rule(Form("%s{s/_Y_/_I_}", fPathOut.Data()));
+    const TString rule(Form("s/([0-9]+_[0-9]+)_Y_(.*[.]root)$/%s\\/$1_I_$2/", Esc(fPathOut).Data()));
     MWriteRootFile write( 2, rule, fOverwrite?"RECREATE":"NEW");
     MWriteRootFile writet(2, rule, fOverwrite?"RECREATE":"NEW"); // EffectiveOnTime
