Author: [log in to unmask]
Date: Wed Feb 17 13:31:12 2016
New Revision: 4235
Log:
Push changes to conditions init to dev branch; includes other minor changes.
Modified:
java/branches/jeremy-dev/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java
java/branches/jeremy-dev/integration-tests/src/test/java/org/hps/test/it/ReconSteeringTest.java
java/branches/jeremy-dev/job/src/main/java/org/hps/job/JobManager.java
java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/logging.properties
java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/test_logging.properties
java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/EventProcessing.java
java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/MonitoringApplication.java
java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/SystemStatusPanel.java
java/branches/jeremy-dev/run-database/src/main/java/org/hps/run/database/RunManager.java
Modified: java/branches/jeremy-dev/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java
=============================================================================
--- java/branches/jeremy-dev/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java (original)
+++ java/branches/jeremy-dev/evio/src/main/java/org/hps/evio/LCSimEngRunEventBuilder.java Wed Feb 17 13:31:12 2016
@@ -68,6 +68,9 @@
*/
private final long timestampCycle = 24 * 6 * 35;
+ /**
+ * The current TI time offset in nanoseconds from the run manager.
+ */
private Long currentTiTimeOffset = null;
/**
@@ -85,23 +88,38 @@
intBanks.add(new IntBankDefinition(TIData.class, new int[]{sspCrateBankTag, 0xe10a}));
intBanks.add(new IntBankDefinition(HeadBankData.class, new int[]{sspCrateBankTag, 0xe10f}));
intBanks.add(new IntBankDefinition(TDCData.class, new int[]{0x3a, 0xe107}));
- // ecalReader = new ECalEvioReader(0x25, 0x27);
triggerConfigReader = new TriggerConfigEvioReader();
svtEventFlagger = new SvtEventFlagger();
}
@Override
public void conditionsChanged(final ConditionsEvent conditionsEvent) {
+
super.conditionsChanged(conditionsEvent);
svtEventFlagger.initialize();
- // Get TI time offset from run db.
- if (RunManager.getRunManager().runExists() && RunManager.getRunManager().getRunSummary().getTiTimeOffset() != null) {
- currentTiTimeOffset = RunManager.getRunManager().getRunSummary().getTiTimeOffset();
- LOGGER.info("TI time offset set to " + currentTiTimeOffset + " for run " + conditionsEvent.getConditionsManager().getRun());
+ // Set TI time offset from run database.
+ setTiTimeOffsetForRun(conditionsEvent.getConditionsManager().getRun());
+ }
+
+ /**
+ * Get TI time offset from the run database, if available.
+ * @param run the run number
+ */
+ private void setTiTimeOffsetForRun(int run) {
+ currentTiTimeOffset = null; /* Reset TI offset to null indicating it is not available for the run. */
+ RunManager runManager = RunManager.getRunManager();
+ if (runManager.getRun() != null) {
+ if (runManager.runExists()) {
+ currentTiTimeOffset = runManager.getRunSummary().getTiTimeOffset();
+ LOGGER.info("TI time offset set to " + currentTiTimeOffset + " for run "
+ + run + " from database");
+ } else {
+ LOGGER.warning("Run " + run
+ + " does not exist in the run database.");
+ }
} else {
- currentTiTimeOffset = null;
- LOGGER.info("no TI time offset in database for run " + conditionsEvent.getConditionsManager().getRun());
+ LOGGER.info("Run manager is not initialized; TI time offset not available.");
}
}
Modified: java/branches/jeremy-dev/integration-tests/src/test/java/org/hps/test/it/ReconSteeringTest.java
=============================================================================
--- java/branches/jeremy-dev/integration-tests/src/test/java/org/hps/test/it/ReconSteeringTest.java (original)
+++ java/branches/jeremy-dev/integration-tests/src/test/java/org/hps/test/it/ReconSteeringTest.java Wed Feb 17 13:31:12 2016
@@ -28,6 +28,7 @@
job.addVariableDefinition("outputFile", outputFile.getPath());
job.addInputFile(inputFile);
job.setup(STEERING_RESOURCE);
+ job.setNumberOfEvents(1000);
job.run();
System.out.println("Done processing " + job.getLCSimLoop().getTotalCountableConsumed() + " events.");
Modified: java/branches/jeremy-dev/job/src/main/java/org/hps/job/JobManager.java
=============================================================================
--- java/branches/jeremy-dev/job/src/main/java/org/hps/job/JobManager.java (original)
+++ java/branches/jeremy-dev/job/src/main/java/org/hps/job/JobManager.java Wed Feb 17 13:31:12 2016
@@ -5,25 +5,16 @@
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
-import org.hps.conditions.ConditionsDriver;
-import org.hps.conditions.database.DatabaseConditionsManager;
-import org.hps.detector.svt.SvtDetectorSetup;
-import org.hps.run.database.RunManager;
-import org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
import org.lcsim.job.JobControlManager;
-import org.lcsim.util.Driver;
/**
- * Extension of standard LCSim job manager which does some HPS-specific management of the conditions system.
+ * Extension of standard LCSim job manager.
+ * <p>
+ * Provides setup of database conditions system and adds option to provide conditions system tags.
*
* @author Jeremy McCormick, SLAC
*/
-public class JobManager extends JobControlManager {
-
- /**
- * The set of conditions tags (none by default).
- */
- private Set<String> tags = null;
+public final class JobManager extends JobControlManager {
/**
* Run the job manager from the command line.
@@ -41,8 +32,21 @@
* Class constructor.
*/
public JobManager() {
+ conditionsSetup = new DatabaseConditionsManagerSetup();
}
-
+
+ /**
+ * Get the conditions setup.
+ * @return the conditions setup
+ */
+ public DatabaseConditionsManagerSetup getDatabaseConditionsManagerSetup() {
+ return (DatabaseConditionsManagerSetup) this.conditionsSetup;
+ }
+
+ /**
+ * Override creation of command line options.
+ * @return the overridden command line options
+ */
@Override
protected Options createCommandLineOptions() {
Options options = super.createCommandLineOptions();
@@ -50,100 +54,20 @@
return options;
}
+ /**
+ * Override command line parsing.
+ * @return the overridden, parsed command line
+ */
@Override
public CommandLine parse(final String args[]) {
CommandLine commandLine = super.parse(args);
if (commandLine.hasOption("t")) {
- tags = new HashSet<String>();
+ Set<String> tags = new HashSet<String>();
for (String tag : commandLine.getOptionValues("t")) {
tags.add(tag);
}
+ getDatabaseConditionsManagerSetup().setTags(tags);
}
return commandLine;
}
-
- /**
- * Initialize the conditions system for the job.
- * <p>
- * If detector and run are provided from the command line or conditions driver then the
- * conditions system will be initialized and frozen.
- *
- * @throws ConditionsNotFoundException if a condition is not found during initialization
- */
- protected void initializeConditions() throws ConditionsNotFoundException {
-
- // Initialize the db conditions manager.
- DatabaseConditionsManager dbManager = DatabaseConditionsManager.getInstance();
-
- // Initialize run manager and add as listener on conditions system.
- RunManager runManager = RunManager.getRunManager();
- dbManager.addConditionsListener(runManager);
-
- // Add class that will setup SVT detector with conditions data.
- dbManager.addConditionsListener(new SvtDetectorSetup());
-
- // Add conditions system tags.
- if (this.tags != null) {
- dbManager.addTags(tags);
- }
-
- // Call super method which will initialize the conditions system if both the detector and run were provided.
- super.initializeConditions();
-
- // Setup from conditions driver (to be deleted soon!).
- if (!dbManager.isInitialized()) {
- setupConditionsDriver();
- } else {
- // Command line options overrode the conditions driver.
- LOGGER.config("Conditions driver was overridden by command line options!");
- }
-
- if (dbManager.isInitialized()) {
- // Assume conditions system should be frozen since detector and run were both set explicitly.
- LOGGER.config("Job manager is freezing the conditions system.");
- dbManager.freeze();
- }
- }
-
- /**
- * Override the parent classes method that runs the job in order to perform conditions system initialization.
- *
- * @return <code>true</code> if job was successful
- */
- @Override
- public final boolean run() {
-
- // Run the job.
- final boolean result = super.run();
-
- // Close the conditions database connection if it is open.
- DatabaseConditionsManager.getInstance().closeConnection();
-
- // Close the connection to the run db if necessary.
- RunManager.getRunManager().closeConnection();
-
- return result;
- }
-
- /**
- * This method will find the {@link org.hps.conditions.ConditionsDriver} in the list of Drivers registered with the
- * manager and then execute its initialization method, which may override the default behavior of the conditions
- * system.
- * @deprecated Use command line options of {@link org.lcsim.job.JobControlManager} instead.
- */
- @Deprecated
- private void setupConditionsDriver() {
- ConditionsDriver conditionsDriver = null;
- for (final Driver driver : this.getDriverAdapter().getDriver().drivers()) {
- if (driver instanceof ConditionsDriver) {
- conditionsDriver = (ConditionsDriver) driver;
- break;
- }
- }
- if (conditionsDriver != null) {
- LOGGER.config("initializing conditions Driver");
- conditionsDriver.initialize();
- LOGGER.warning("Conditions driver will be removed soon!");
- }
- }
}
Modified: java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/logging.properties
=============================================================================
--- java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/logging.properties (original)
+++ java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/logging.properties Wed Feb 17 13:31:12 2016
@@ -27,7 +27,7 @@
# conditions
org.hps.conditions.api.level = WARNING
-org.hps.conditions.database.level = ALL
+org.hps.conditions.database.level = CONFIG
org.hps.conditions.cli.level = CONFIG
org.hps.conditions.ecal.level = WARNING
org.hps.conditions.svt.level = WARNING
@@ -52,7 +52,6 @@
# ecal-recon
org.hps.recon.ecal.level = CONFIG
org.hps.recon.ecal.cluster.level = WARNING
-org.hps.recon.ecal.cluster.ClusterDriver.level = WARNING
# recon
org.hps.recon.filtering.level = WARNING
@@ -78,7 +77,7 @@
# detector-model
org.lcsim.detector.converter.compact.level = INFO
org.lcsim.geometry.compact.converter.level = INFO
-org.hps.detector.svt.level = ALL
+org.hps.detector.svt.level = INFO
# test data
org.hps.data.test = INFO
Modified: java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/test_logging.properties
=============================================================================
--- java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/test_logging.properties (original)
+++ java/branches/jeremy-dev/logging/src/main/resources/org/hps/logging/config/test_logging.properties Wed Feb 17 13:31:12 2016
@@ -21,13 +21,13 @@
org.freehep.math.minuit = OFF
# lcsim job
-org.lcsim.job.level = WARNING
+org.lcsim.job.level = CONFIG
org.lcsim.job.EventMarkerDriver.level = OFF
org.lcsim.job.EventPrintLoopAdapter = ALL
# conditions
org.hps.conditions.api.level = WARNING
-org.hps.conditions.database.level = ALL
+org.hps.conditions.database.level = WARNING
org.hps.conditions.cli.level = WARNING
org.hps.conditions.ecal.level = WARNING
org.hps.conditions.svt.level = WARNING
@@ -47,12 +47,11 @@
org.hps.crawler.level = WARNING
# datacat
-org.hps.datacat.client.level = ALL
+org.hps.datacat.client.level = OFF
# ecal-recon
org.hps.recon.ecal.level = WARNING
org.hps.recon.ecal.cluster.level = WARNING
-org.hps.recon.ecal.cluster.ClusterDriver.level = WARNING
# recon
org.hps.recon.filtering.level = WARNING
@@ -62,14 +61,14 @@
org.hps.record.evio.level = WARNING
org.hps.record.scalers.level = WARNING
org.hps.record.triggerbank.level = WARNING
-org.hps.record.svt.level = INFO
+org.hps.record.svt.level = WARNING
# tracking
org.hps.recon.tracking.level = WARNING
org.hps.recon.tracking.gbl.level = WARNING
# run-database
-org.hps.run.database.level = ALL
+org.hps.run.database.level = WARNING
# monitoring-application
org.hps.monitoring.application.model.level = WARNING
@@ -82,3 +81,6 @@
# test data
org.hps.data.test = INFO
+
+# HPS job manager
+org.hps.job.JobManager = WARNING
Modified: java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/EventProcessing.java
=============================================================================
--- java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/EventProcessing.java (original)
+++ java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/EventProcessing.java Wed Feb 17 13:31:12 2016
@@ -6,11 +6,14 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.logging.Logger;
import org.freehep.record.loop.RecordLoop.Command;
import org.hps.conditions.database.DatabaseConditionsManager;
+import org.hps.job.DatabaseConditionsManagerSetup;
import org.hps.job.JobManager;
import org.hps.monitoring.application.model.ConfigurationModel;
import org.hps.monitoring.application.model.ConnectionStatus;
@@ -34,7 +37,6 @@
import org.jlab.coda.et.exception.EtClosedException;
import org.jlab.coda.et.exception.EtException;
import org.lcsim.conditions.ConditionsListener;
-import org.lcsim.conditions.ConditionsReader;
import org.lcsim.util.Driver;
/**
@@ -194,11 +196,6 @@
private SessionState sessionState;
/**
- * The current conditions manager.
- */
- private DatabaseConditionsManager conditionsManager;
-
- /**
* Class constructor, which will initialize with reference to the current monitoring application and lists of extra
* processors to add to the loop, as well as supplemental conditions listeners that activate when the conditions
* change.
@@ -306,7 +303,7 @@
*
* @param configurationModel the current global {@link org.hps.monitoring.application.ConfigurationModel} object
*/
- private void createEventBuilder(final ConfigurationModel configurationModel) {
+ private LCSimEventBuilder createEventBuilder(final ConfigurationModel configurationModel) {
// Get the class for the event builder.
final String eventBuilderClassName = configurationModel.getEventBuilderClassName();
@@ -318,9 +315,8 @@
} catch (final Exception e) {
throw new RuntimeException("Failed to create LCSimEventBuilder.", e);
}
-
- // Add the builder as a listener so it is notified when conditions change.
- this.conditionsManager.addConditionsListener(this.sessionState.eventBuilder);
+
+ return this.sessionState.eventBuilder;
}
/**
@@ -475,27 +471,59 @@
try {
// Create the job manager. A new conditions manager is instantiated from this call but not configured.
this.sessionState.jobManager = new JobManager();
-
- // Set ref to current conditions manager.
- this.conditionsManager = DatabaseConditionsManager.getInstance();
- // Add conditions listeners after new database conditions manager is initialized from the job manager.
+ // Setup class for conditions system.
+ DatabaseConditionsManagerSetup conditions = new DatabaseConditionsManagerSetup();
+
+ // Disable run manager.
+ conditions.setEnableRunManager(false);
+
+ // Setup the event builder to translate from EVIO to LCIO.
+ LCSimEventBuilder eventBuilder = this.createEventBuilder(configurationModel);
+ conditions.addConditionsListener(eventBuilder);
+
+ // Add extra conditions listeners.
for (final ConditionsListener conditionsListener : this.sessionState.conditionsListeners) {
- this.logger.config("adding conditions listener " + conditionsListener.getClass().getName());
- this.conditionsManager.addConditionsListener(conditionsListener);
- }
-
+ this.logger.config("Adding conditions listener " + conditionsListener.getClass().getName());
+ conditions.addConditionsListener(conditionsListener);
+ }
+
+ // Add detector alias.
if (configurationModel.hasValidProperty(ConfigurationModel.DETECTOR_ALIAS_PROPERTY)) {
- // Set a detector alias.
- ConditionsReader.addAlias(configurationModel.getDetectorName(),
+ conditions.addAlias(configurationModel.getDetectorName(),
"file://" + configurationModel.getDetectorAlias());
- this.logger.config("using detector alias " + configurationModel.getDetectorAlias());
- }
-
- // Setup the event builder to translate from EVIO to LCIO.
- // This must happen before Driver setup so the builder's listeners are activated first!
- this.createEventBuilder(configurationModel);
-
+ this.logger.config("Added detector alias " + configurationModel.getDetectorAlias()
+ + " for " + configurationModel.getDetectorName());
+ }
+
+ // Add conditions tag.
+ if (configurationModel.hasValidProperty(ConfigurationModel.CONDITIONS_TAG_PROPERTY)
+ && !configurationModel.getConditionsTag().equals("")) {
+ Set<String> tags = new HashSet<String>();
+ tags.add(configurationModel.getConditionsTag());
+ this.logger.config("Added conditions tag " + configurationModel.getConditionsTag());
+ conditions.setTags(tags);
+ }
+
+ // Set user specified job number.
+ if (configurationModel.hasValidProperty(ConfigurationModel.USER_RUN_NUMBER_PROPERTY)) {
+ final int userRun = configurationModel.getUserRunNumber();
+ this.logger.config("User run number set to " + userRun);
+ conditions.setRun(userRun);
+ }
+
+ // Set detector name.
+ conditions.setDetectorName(configurationModel.getDetectorName());
+
+ // Freeze the conditions system to ignore run numbers from event data.
+ if (configurationModel.hasPropertyKey(ConfigurationModel.FREEZE_CONDITIONS_PROPERTY)) {
+ this.logger.config("user configured to freeze conditions system");
+ conditions.setFreeze(configurationModel.getFreezeConditions());
+ }
+
+ // Register the configured conditions settings with the job manager.
+ this.sessionState.jobManager.setConditionsSetup(conditions);
+
// Configure the job manager for the XML steering.
this.sessionState.jobManager.setDryRun(true);
if (steeringType == SteeringType.RESOURCE) {
@@ -503,32 +531,10 @@
} else if (steeringType.equals(SteeringType.FILE)) {
this.setupSteeringFile(steering);
}
-
- // Set conditions tag if applicable.
- if (configurationModel.hasValidProperty(ConfigurationModel.CONDITIONS_TAG_PROPERTY)
- && !configurationModel.getConditionsTag().equals("")) {
- this.logger.config("conditions tag is set to " + configurationModel.getConditionsTag());
- } else {
- this.logger.config("conditions NOT using a tag");
- }
-
- // Is there a user specified run number from the JobPanel?
- if (configurationModel.hasValidProperty(ConfigurationModel.USER_RUN_NUMBER_PROPERTY)) {
- final int userRunNumber = configurationModel.getUserRunNumber();
- final String detectorName = configurationModel.getDetectorName();
- this.logger.config("setting user run number " + userRunNumber + " with detector " + detectorName);
- conditionsManager.setDetector(detectorName, userRunNumber);
- if (configurationModel.hasPropertyKey(ConfigurationModel.FREEZE_CONDITIONS_PROPERTY)) {
- // Freeze the conditions system to ignore run numbers from the events.
- this.logger.config("user configured to freeze conditions system");
- this.conditionsManager.freeze();
- } else {
- // Allow run numbers to be picked up from the events.
- this.logger.config("user run number provided but conditions system is NOT frozen");
- this.conditionsManager.unfreeze();
- }
- }
-
+
+ // Post-init conditions system which may freeze if run and name were provided.
+ this.sessionState.jobManager.getConditionsSetup().postInitialize();
+
this.logger.info("lcsim setup was successful");
} catch (final Throwable t) {
@@ -595,15 +601,19 @@
this.logger.config("added extra Driver " + driver.getName());
}
- // Enable conditions system activation from EVIO event data in case the PRESTART is missed.
- loopConfig.add(new EvioDetectorConditionsProcessor(configurationModel.getDetectorName()));
- this.logger.config("added EvioDetectorConditionsProcessor to job with detector "
- + configurationModel.getDetectorName());
+ // Enable conditions activation from EVIO; not needed if conditions are frozen for the job.
+ if (!DatabaseConditionsManager.getInstance().isFrozen()) {
+ loopConfig.add(new EvioDetectorConditionsProcessor(configurationModel.getDetectorName()));
+ this.logger.config("added EvioDetectorConditionsProcessor to job with detector "
+ + configurationModel.getDetectorName());
+ } else {
+ this.logger.config("Conditions activation from EVIO is disabled.");
+ }
// Create the CompositeLoop with the configuration.
this.sessionState.loop = new CompositeLoop(loopConfig);
- this.logger.config("record loop is setup");
+ this.logger.config("Record loop is setup.");
}
/**
Modified: java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/MonitoringApplication.java
=============================================================================
--- java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/MonitoringApplication.java (original)
+++ java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/MonitoringApplication.java Wed Feb 17 13:31:12 2016
@@ -78,7 +78,6 @@
*/
@Override
public void close() throws SecurityException {
- // Does nothing.
}
/**
@@ -86,7 +85,6 @@
*/
@Override
public void flush() {
- // Does nothing.
}
/**
@@ -121,8 +119,6 @@
@Override
public void publish(final LogRecord record) {
super.publish(record);
-
- // FIXME: Is this efficient? Should this always happen here?
flush();
}
@@ -295,18 +291,18 @@
loadConfiguration(new Configuration(DEFAULT_CONFIGURATION), false);
if (userConfiguration != null) {
- // Load user configuration.
+ // Load user configuration to supplement default settings.
loadConfiguration(userConfiguration, true);
}
- // Enable the GUI now that initialization is complete.
+ // Enable the GUI after initialization.
this.frame.setEnabled(true);
- LOGGER.info("application initialized successfully");
+ LOGGER.info("Monitoring app initialized successfully.");
} catch (final Exception e) {
- // Don't use the ErrorHandler here because we don't know that it initialized successfully.
- System.err.println("MonitoringApplication failed to initialize without errors!");
+ // Initialization failed so print info and die.
+ System.err.println("ERROR: MonitoringApplication failed to initialize!");
DialogUtil.showErrorDialog(null, "Error Starting Monitoring Application",
"Monitoring application failed to initialize.");
e.printStackTrace();
@@ -321,9 +317,6 @@
*/
@Override
public void actionPerformed(final ActionEvent e) {
-
- // logger.finest("actionPerformed - " + e.getActionCommand());
-
final String command = e.getActionCommand();
if (Commands.CONNECT.equals(command)) {
startSession();
@@ -374,7 +367,7 @@
}
/**
- * Redirect <code>System.out</code> and <code>System.err</code> to a file chosen by a file chooser.
+ * Redirect <code>System.out</code> and <code>System.err</code> to a chosen file.
*/
private void chooseLogFile() {
final JFileChooser fc = new JFileChooser();
@@ -420,7 +413,7 @@
}
/**
- * Exit from the application from exit menu item or hitting close window button.
+ * Exit from the application.
*/
private void exit() {
if (this.connectionModel.isConnected()) {
@@ -954,7 +947,6 @@
// Add listener to push conditions changes to conditions panel.
final List<ConditionsListener> conditionsListeners = new ArrayList<ConditionsListener>();
- //conditionsListeners.add(this.frame.getConditionsPanel().new ConditionsPanelListener());
// Instantiate the event processing wrapper.
this.processing = new EventProcessing(this, processors, drivers, conditionsListeners);
@@ -973,7 +965,7 @@
// Start the event processing thread.
this.processing.start();
- LOGGER.info("new session successfully initialized");
+ LOGGER.info("Event processing session started.");
} catch (final Exception e) {
@@ -989,7 +981,7 @@
"There was an error while starting the session." + '\n' + "See the log for details.",
"Session Error");
- LOGGER.severe("failed to start new session");
+ LOGGER.severe("Failed to start event processing.");
}
}
Modified: java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/SystemStatusPanel.java
=============================================================================
--- java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/SystemStatusPanel.java (original)
+++ java/branches/jeremy-dev/monitoring-app/src/main/java/org/hps/monitoring/application/SystemStatusPanel.java Wed Feb 17 13:31:12 2016
@@ -1,6 +1,3 @@
-/**
- *
- */
package org.hps.monitoring.application;
import java.awt.BorderLayout;
@@ -81,7 +78,7 @@
this.statuses.clear();
}
-
+
private class SystemStatusBeeper extends TimerTask {
@Override
@@ -93,7 +90,7 @@
}
}
if (isAlarming) {
- System.out.println("beep\007");
+ Toolkit.getDefaultToolkit().beep();
}
}
}
Modified: java/branches/jeremy-dev/run-database/src/main/java/org/hps/run/database/RunManager.java
=============================================================================
--- java/branches/jeremy-dev/run-database/src/main/java/org/hps/run/database/RunManager.java (original)
+++ java/branches/jeremy-dev/run-database/src/main/java/org/hps/run/database/RunManager.java Wed Feb 17 13:31:12 2016
@@ -284,4 +284,12 @@
this.run = run;
}
}
+
+ /**
+ * Get the currently active run number or <code>null</code>.
+ * @return the currently active run number of <code>null</code>
+ */
+ public Integer getRun() {
+ return this.run;
+ }
}
|