projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job
--- projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java 2014-04-03 22:00:58 UTC (rev 3081)
+++ projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java 2014-04-04 00:49:29 UTC (rev 3082)
@@ -85,6 +85,7 @@
* @author Jeremy McCormick
*/
// TODO: Do proper logging using Java Logger class rather than just a PrintStream.
+// FIXME: Command line arguments should probably override the steering file when applicable.
@SuppressWarnings({"unchecked", "rawtypes"})
public class JobControlManager {
@@ -195,7 +196,7 @@
options.addOption(new Option("q", false, "Turn on quiet mode"));
options.addOption(new Option("i", true, "Add an LCIO input file to process"));
options.addOption(new Option("r", false, "Use a steering resource rather than a file"));
- //options.addOption(new Option("b", false, "Run in headless mode in which plots will not be shown."));
+ options.addOption(new Option("b", false, "Run in headless mode in which plots will not be shown."));
return options;
}
@@ -316,10 +317,10 @@
}
}
- // Run in headless mode in which plots will not show even if <code>IPlotter.show()</code> is called.
- //if (cl.hasOption("b")) {
- // System.setProperty("hep.aida.IAnalysisFactory", BatchAnalysisFactory.class.getName());
- //}
+ // Run in headless mode in which plots will not show.
+ if (cl.hasOption("b")) {
+ System.setProperty("hep.aida.IAnalysisFactory", BatchAnalysisFactory.class.getName());
+ }
// Steering argument points to either a file or embedded resource.
String steering = (String) cl.getArgList().get(0);
@@ -360,6 +361,7 @@
* Execute a job using the current parameters.
*/
public boolean run() {
+
// If setup was not called first, then abort the job.
if (!wasSetup) {
logStream.println("Aborting job! Setup was never called.");
@@ -551,7 +553,7 @@
performDryRun = true;
logStream.println("No input files provided by XML or command line. Dry run will be enabled.");
}
-
+
// Flag JobManager as setup.
wasSetup = true;
}