Print

Print


Author: [log in to unmask]
Date: Thu Jan 15 14:56:36 2015
New Revision: 3493

Log:
Change private variables to protected in case sub-class wants to access or override them.

Modified:
    projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java

Modified: projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java
 =============================================================================
--- projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java	(original)
+++ projects/lcsim/trunk/job-manager/src/main/java/org/lcsim/job/JobControlManager.java	Thu Jan 15 14:56:36 2015
@@ -24,6 +24,7 @@
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
+import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -50,6 +51,8 @@
 import org.lcsim.util.Driver;
 import org.lcsim.util.DriverAdapter;
 import org.lcsim.util.cache.FileCache;
+import org.lcsim.util.log.BasicFormatter;
+import org.lcsim.util.log.LogUtil;
 import org.lcsim.util.loop.LCIOEventSource;
 import org.lcsim.util.loop.LCSimConditionsManagerImplementation;
 import org.lcsim.util.loop.LCSimLoop;
@@ -89,66 +92,68 @@
 @SuppressWarnings({"unchecked", "rawtypes"})
 public class JobControlManager {
 
+    protected Logger logger = LogUtil.create(JobControlManager.class, new BasicFormatter());
+    
     // The LCIO record loop.
-    private LCSimLoop loop;
+    protected LCSimLoop loop;
 
     // Driver management.
-    private Map<String, Driver> driverMap = new LinkedHashMap<String, Driver>();
-    private List<Driver> driverExec = new ArrayList<Driver>();
-    private Map<String, String> availableDrivers = new HashMap<String, String>();
+    protected Map<String, Driver> driverMap = new LinkedHashMap<String, Driver>();
+    protected List<Driver> driverExec = new ArrayList<Driver>();
+    protected Map<String, String> availableDrivers = new HashMap<String, String>();
 
     // Run parameters.
-    private List<File> inputFiles = new ArrayList<File>();
-    private int numberOfEvents = -1;
-    private int skipEvents = -1;
-    private File rewriteFile;
+    protected List<File> inputFiles = new ArrayList<File>();
+    protected int numberOfEvents = -1;
+    protected int skipEvents = -1;
+    protected File rewriteFile;
 
     // Variables and constants.
-    private Map<String, String> variableMap = new HashMap<String, String>();
-    private Map<String, Double> constantsMap = new HashMap<String, Double>();
+    protected Map<String, String> variableMap = new HashMap<String, String>();
+    protected Map<String, Double> constantsMap = new HashMap<String, Double>();
 
     // Boolean job options.
-    private boolean performDryRun;
-    private boolean rewrite;
-    private boolean useSteeringResource;
-    private boolean dummyDetector;
+    protected boolean performDryRun;
+    protected boolean rewrite;
+    protected boolean useSteeringResource;
+    protected boolean dummyDetector;
 
     // Settings effecting logging verbosity.
-    private boolean printInputFiles;
-    private boolean printDriverStatistics;
-    private boolean printSystemProperties;
-    private boolean printUserClassPath;
-    private boolean printDriversDetailed;
+    protected boolean printInputFiles;
+    protected boolean printDriverStatistics;
+    protected boolean printSystemProperties;
+    protected boolean printUserClassPath;
+    protected boolean printDriversDetailed;
     // private boolean printVersion;
-    private boolean verbose;
+    protected boolean verbose;
 
     // File caching.
-    private File cacheDirectory;
-    private FileCache fileCache; // Start with default dir.
+    protected File cacheDirectory;
+    protected FileCache fileCache; // Start with default dir.
 
     // True once job parameters are setup from CL and XML.
-    private boolean wasSetup;
+    protected boolean wasSetup;
 
     // The manager's class loader.
-    private ClassLoader loader;
+    protected ClassLoader loader;
 
     // The log stream for messages.
-    PrintStream logStream = System.out;
+    protected PrintStream logStream = System.out;
 
     // Root node of XML job file.
-    private Element root;
+    protected Element root;
 
     // XML utils.
-    private JDOMExpressionFactory factory = new JDOMExpressionFactory();
-    private ParameterConverters paramConverter = new ParameterConverters(factory);
+    protected JDOMExpressionFactory factory = new JDOMExpressionFactory();
+    protected ParameterConverters paramConverter = new ParameterConverters(factory);
 
     // Command line options.
-    private static final Options options = createCommandLineOptions();
+    protected static final Options options = createCommandLineOptions();
 
     // Reg exp to extract variables from a string with the form "${varName}".
-    private static final Pattern varPattern = Pattern.compile("[$][{][a-zA-Z_-]*[}]");
-
-    private DriverAdapter driverAdapter = null;
+    protected static final Pattern varPattern = Pattern.compile("[$][{][a-zA-Z_-]*[}]");
+
+    protected DriverAdapter driverAdapter = null;
 
     /**
      * The default constructor.

########################################################################
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