Commit in projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job on MAIN | |||
JobControlManager.java | +24 | -12 | 3331 -> 3332 |
Do not set loop to null after running job. Add support for enabling dummy detector.
--- projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java 2014-09-17 22:54:19 UTC (rev 3331) +++ projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java 2014-09-18 06:33:32 UTC (rev 3332) @@ -111,6 +111,7 @@
private boolean performDryRun; private boolean rewrite; private boolean useSteeringResource;
+ private boolean dummyDetector;
//private boolean headless; // Settings effecting logging verbosity.
@@ -379,20 +380,21 @@
return false; }
- // if (printVersion) { - // (new LCSimVersion()).printOut(logStream); - // logStream.println(); - // } -
// Dry run selected. No events will be processed here. if (performDryRun) { logStream.println("Executed dry run. No events processed!"); return false; }
-
+
try { // Add the LCIO files to the loop. loop.setLCIORecordSource(new LCIOEventSource(this.getClass().getSimpleName(), inputFiles));
+ + // Setup dummy detector if selected. + if (dummyDetector) { + logStream.println("Using dummy detector for conditions system!"); + loop.setDummyDetector("dummy"); + }
// Driver statistics printout. PrintStream statsStream = null;
@@ -428,7 +430,7 @@
// Cleanup the loop. loop.dispose();
- loop = null;
+ //loop = null;
// Job was successful. return true;
@@ -552,7 +554,7 @@
// Setup drivers with parameters and execution order. setupDrivers();
-
+
// Setup the file cache. setupFileCache();
@@ -564,7 +566,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; }
@@ -1103,7 +1105,7 @@
if (!cacheDirectory.exists()) throw new RuntimeException("cacheDirectory does not exist at location: " + cacheDirElement.getText()); } else {
- // Default to the current working dir if cacheDirectory was not set explicitly.
+ // Default to the user dir if cacheDirectory was not set explicitly.
// FIXME: Better default might be current directory. cacheDirectory = new File(System.getProperties().get("user.dir").toString()); }
@@ -1156,12 +1158,22 @@
logStream.println("--- End Job Control Parameters ---"); logStream.println(); }
+ + Element dummyDetectorElement = control.getChild("dummyDetector"); + if (dummyDetectorElement != null) + dummyDetector = Boolean.valueOf(dummyDetectorElement.getText());
} /** * Setup the manager's class loader. */ private void setupClassLoader() {
+ + if (loader != null) { + logStream.println("The ClassLoader was already set externally, so custom classpaths will be ignored!"); + return; + } +
Element classpath = root.getChild("classpath"); List<URL> urlList = new ArrayList<URL>(); if (classpath != null) {
@@ -1203,8 +1215,8 @@
// } // Running in batch. // else {
- if (loader == null) - loader = new LCSimClassLoader(urls);
+ + loader = new LCSimClassLoader(urls);
// } // Print user classpath entries.
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1