Commit in hps-java/src/main/java/org/lcsim/hps/evio on MAIN
TestRunEvioToLcio.java+151.18 -> 1.19
TestRunEvioToLcio accepts variable definitions for steering file

hps-java/src/main/java/org/lcsim/hps/evio
TestRunEvioToLcio.java 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- TestRunEvioToLcio.java	21 Jun 2012 18:44:26 -0000	1.18
+++ TestRunEvioToLcio.java	16 Aug 2012 23:54:09 -0000	1.19
@@ -51,6 +51,7 @@
         options.addOption(new Option("e", true, "Stop after N events"));
         options.addOption(new Option("w", false, "Wait after end of data"));
         options.addOption(new Option("r", false, "Show run control window"));
+        options.addOption(new Option("D", true, "Pass a variable to the steering file"));
 
         return options;
     }
@@ -146,6 +147,20 @@
 
         // LCSim job manager.
         JobControlManager jobManager = new JobControlManager();
+
+        if (cl.hasOption("D")) {
+            String[] steeringOptions = cl.getOptionValues("D");
+            for (String def : steeringOptions) {
+                String[] s = def.split("=");
+                if (s.length != 2) {
+                    throw new RuntimeException("Bad variable format: " + def);
+                }
+                String key = s[0];
+                String value = s[1];
+                jobManager.addVariableDefinition(key, value);
+            }
+        }
+
         jobManager.setup(steeringStream);
         jobManager.configure();
 
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1