[Swift-commit] r8345 - SwiftApps/dsp-swift

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Fri Dec 12 17:06:20 CST 2014


Author: ketan
Date: 2014-12-12 17:06:20 -0600 (Fri, 12 Dec 2014)
New Revision: 8345

Modified:
   SwiftApps/dsp-swift/dsp.blues.swift
Log:
structured regexp mapper

Modified: SwiftApps/dsp-swift/dsp.blues.swift
===================================================================
--- SwiftApps/dsp-swift/dsp.blues.swift	2014-12-12 22:56:21 UTC (rev 8344)
+++ SwiftApps/dsp-swift/dsp.blues.swift	2014-12-12 23:06:20 UTC (rev 8345)
@@ -29,8 +29,8 @@
 string inloc=arg("loc","/lcrc/project/NEXTGENOPT/DSP_old/examples/smps/dcap");
 
 file stofiles[]<filesys_mapper; location=inloc, pattern="*.sto">;
-file corfiles[]<filesys_mapper; location=inloc, pattern="*.cor">;
-file timfiles[]<filesys_mapper; location=inloc, pattern="*.tim">;
+file corfiles[] <structured_regexp_mapper; source=stofiles, match="^(.*)sto$", transform="\\1cor">;
+file timfiles[] <structured_regexp_mapper; source=stofiles, match="^(.*)sto$", transform="\\1tim">;
 
 int a=toInt(arg("a","1"));
 int n=toInt(arg("n","1"));
@@ -48,7 +48,7 @@
   file err <single_file_mapper; file=strcat(outdir, "/std_", i, ".err")>;
   string filespath[]=strsplit(filename(in_tim),"\\.");
 
-  //tracef(" stofiles[%i] = %s\ncorfiles[%i] = %s\ntimfiles[%i] = %s\n", i, filename(stofiles[i]), i, filename(corfiles[i]), i, filename(timfiles[i]));
+  tracef(" stofiles[%i] = %s\ncorfiles[%i] = %s\ntimfiles[%i] = %s\n", i, filename(stofiles[i]), i, filename(corfiles[i]), i, filename(timfiles[i]));
 
   /* == App invocation == */
   (out, err) = dsp_app (filespath[0], stofiles[i], corfiles[i], timfiles[i], a, n, p, I);




More information about the Swift-commit mailing list