8 modified files
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/Commands.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/Commands.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -12,13 +12,14 @@
static final String STEERING_RESOURCE_CHANGED = "steeringResourceChanged";
static final String LOG_TO_FILE_CHANGED = "logToFileChanged";
static final String AIDA_AUTO_SAVE_CHANGED = "aidaAutoSaveChanged";
- static final String LOG_LEVEL_CHANGED = "logLevelChanged";
+ static final String LOG_LEVEL_CHANGED = "logLevelChanged";
static final String BLOCKING_CHANGED = "blockingChanged";
static final String VERBOSE_CHANGED = "verboseChanged";
static final String WAIT_MODE_CHANGED = "waitModeChanged";
static final String DATA_SOURCE_TYPE_CHANGED = "dataSourceTypeChanged";
+ static final String PROCESSING_STAGE_CHANGED = "processingStageChanged";
static final String AIDA_AUTO_SAVE = "aidaAutoSave";
static final String CLEAR_LOG_TABLE = "clearLogTable";
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/DataSourcePanel.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/DataSourcePanel.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -1,8 +1,10 @@
package org.hps.monitoring.gui;
import static org.hps.monitoring.gui.Commands.DATA_SOURCE_TYPE_CHANGED;
+import static org.hps.monitoring.gui.Commands.PROCESSING_STAGE_CHANGED;
import static org.hps.monitoring.gui.model.ConfigurationModel.DATA_SOURCE_PATH_PROPERTY;
import static org.hps.monitoring.gui.model.ConfigurationModel.DATA_SOURCE_TYPE_PROPERTY;
+import static org.hps.monitoring.gui.model.ConfigurationModel.PROCESSING_STAGE_PROPERTY;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
@@ -16,6 +18,7 @@
import org.hps.monitoring.gui.model.ConfigurationModel;
import org.hps.record.processing.DataSourceType;
+import org.hps.record.processing.ProcessingStage;
/**
* A sub-panel of the settings window for selecting a data source,
@@ -23,14 +26,21 @@
*/
class DataSourcePanel extends AbstractFieldsPanel {
- static String[] dataSourceTypes = {
+ static final String[] dataSourceTypes = {
DataSourceType.ET_SERVER.description(),
DataSourceType.EVIO_FILE.description(),
DataSourceType.LCIO_FILE.description()
};
+ static final String[] processingStages = {
+ ProcessingStage.ET.name(),
+ ProcessingStage.EVIO.name(),
+ ProcessingStage.LCIO.name()
+ };
+
JComboBox<?> dataSourceTypeComboBox;
JTextField dataSourcePathField;
+ JComboBox<?> processingStageComboBox;
ConfigurationModel configurationModel;
@@ -43,26 +53,14 @@
dataSourceTypeComboBox.addActionListener(this);
dataSourcePathField = addField("Data Source Path", 40);
- //dataSourcePathField.setEditable(false);
- //dataSourcePathField.addPropertyChangeListener("value", this);
- dataSourcePathField.addPropertyChangeListener(this);
- //dataSourcePathField.addPropertyChangeListener(new DummyPropertyChangeListener());
- //dataSourcePathField.addPropertyChangeListener("value", new DummyPropertyChangeListener());
+ dataSourcePathField.addPropertyChangeListener(this);
+
+ processingStageComboBox = addComboBox("Processing Stage", processingStages);
+ processingStageComboBox.setSelectedIndex(2);
+ processingStageComboBox.setActionCommand(PROCESSING_STAGE_CHANGED);
+ processingStageComboBox.addActionListener(this);
}
-
- /*
- class DummyPropertyChangeListener implements PropertyChangeListener {
-
- @Override
- public void propertyChange(PropertyChangeEvent evt) {
- System.out.println("DummyPropertyChangeListener.propertyChange");
- System.out.println(" source: " + evt.getSource());
- System.out.println(" name: " + evt.getPropertyName());
- System.out.println(" value: " + evt.getNewValue());
- }
- }
- */
-
+
private void chooseFile() {
JFileChooser fc = new JFileChooser(System.getProperty("user.dir"));
fc.setDialogTitle("Select Data Source");
@@ -101,6 +99,9 @@
if (dataSourceType.isFile()) {
chooseFile();
}
+ } else if (PROCESSING_STAGE_CHANGED.equals(e.getActionCommand())) {
+ ProcessingStage processingStage = ProcessingStage.values()[processingStageComboBox.getSelectedIndex()];
+ configurationModel.setProcessingStage(processingStage);
}
}
@@ -129,6 +130,8 @@
dataSourceTypeComboBox.setSelectedItem(value.toString());
} else if (DATA_SOURCE_PATH_PROPERTY.equals(evt.getPropertyName())) {
dataSourcePathField.setText((String) value);
+ } else if (PROCESSING_STAGE_PROPERTY.equals(evt.getPropertyName())) {
+ processingStageComboBox.setSelectedItem(value.toString());
}
}
}
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/JobSettingsPanel.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/JobSettingsPanel.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -159,13 +159,15 @@
* Enable this component.
* @param enable Whether to enable or not.
*/
+ /*
void enableJobPanel(boolean enable) {
detectorNameField.setEnabled(enable);
eventBuilderField.setEnabled(enable);
steeringTypeComboBox.setEnabled(enable);
steeringFileField.setEnabled(enable);
steeringResourcesComboBox.setEnabled(enable);
- }
+ }
+ */
/**
* Attaches the ActionListener from the main app to specific GUI components in this class.
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -702,7 +702,7 @@
getConnectionSettingsPanel().enableConnectionPanel(true);
// Re-enable the getJobPanel().
- getJobSettingsPanel().enableJobPanel(true);
+ //getJobSettingsPanel().enableJobPanel(true);
// Set relevant event panel buttons to disabled.
buttonsPanel.enablePauseButton(false);
@@ -725,7 +725,7 @@
getConnectionSettingsPanel().enableConnectionPanel(false);
// Disable getJobPanel().
- getJobSettingsPanel().enableJobPanel(false);
+ //getJobSettingsPanel().enableJobPanel(false);
// Enable or disable appropriate menu items.
savePlotsItem.setEnabled(true);
@@ -1161,21 +1161,27 @@
processingConfiguration.setStopOnEndRun(configurationModel.getDisconnectOnEndRun());
processingConfiguration.setStopOnErrors(configurationModel.getDisconnectOnError());
processingConfiguration.setDataSourceType(configurationModel.getDataSourceType());
+ processingConfiguration.setProcessingStage(configurationModel.getProcessingStage());
processingConfiguration.setEtConnection(connection);
processingConfiguration.setFilePath(configurationModel.getDataSourcePath());
processingConfiguration.setLCSimEventBuild(eventBuilder);
- processingConfiguration.setDetectorName(configurationModel.getDetectorName());
+ processingConfiguration.setDetectorName(configurationModel.getDetectorName());
// Add all Drivers from the pre-configured JobManager.
for (Driver driver : jobManager.getDriverExecList()) {
processingConfiguration.add(driver);
}
-
- // ET system monitor.
- processingConfiguration.add(new EtSystemMonitor());
+
+ if (usingEtServer()) {
+
+ // ET system monitor.
+ // FIXME: Make whether this is run or not configurable through the JobPanel.
+ processingConfiguration.add(new EtSystemMonitor());
- // ET system strip charts.
- processingConfiguration.add(new EtSystemStripCharts());
+ // ET system strip charts.
+ // FIXME: Make whether this is run or not configurable through the JobPanel.
+ processingConfiguration.add(new EtSystemStripCharts());
+ }
// RunPanel updater.
processingConfiguration.add(runPanel.new RunModelUpdater());
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/RunPanel.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/RunPanel.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -33,6 +33,11 @@
* Dashboard for displaying information about the current run.
* @author Jeremy McCormick <[log in to unmask]>
*/
+// TODO: Add current data rate field (measured over last ~second).
+// TOOD: Add current event rate field (measured over last ~second).
+// TODO: Add event sequence number from CompositeRecord.
+// TODO: Add average data rate field (over entire session).
+// TODO: Add average proc time per event field (over entire session).
public class RunPanel extends JPanel implements PropertyChangeListener {
FieldPanel runNumberField = new FieldPanel("Run Number", "", 10, false);
@@ -102,7 +107,9 @@
public void process(CompositeRecord event) {
model.incrementEventsReceived();
EvioEvent evioEvent = event.getEvioEvent();
- if (evioEvent != null) {
+ if (event.getEtEvent() != null && event.getEvioEvent() == null) {
+ model.addDataReceived(event.getEtEvent().getData().length);
+ } else if (evioEvent != null) {
model.addDataReceived((long)evioEvent.getTotalBytes());
model.setEventNumber(evioEvent.getEventNumber());
if (EventConstants.isPreStartEvent(evioEvent)) {
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/AbstractModel.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/AbstractModel.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -47,7 +47,7 @@
}
}
try {
- Object value = getMethod.invoke(this, null);
+ Object value = getMethod.invoke(this, (Object[])null);
if (value != null) {
firePropertyChange(property, value, value);
for (PropertyChangeListener listener : propertyChangeSupport.getPropertyChangeListeners()) {
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/ConfigurationModel.java 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/ConfigurationModel.java 2014-09-03 18:11:04 UTC (rev 945)
@@ -5,6 +5,7 @@
import org.hps.monitoring.enums.SteeringType;
import org.hps.record.processing.DataSourceType;
+import org.hps.record.processing.ProcessingStage;
import org.jlab.coda.et.enums.Mode;
/**
@@ -21,7 +22,7 @@
// Job settings
public static final String AIDA_AUTO_SAVE_PROPERTY = "AidaAutoSave";
- public static final String AIDA_FILE_NAME_PROPERTY = "AidaFileName";
+ public static final String AIDA_FILE_NAME_PROPERTY = "AidaFileName";
public static final String DETECTOR_NAME_PROPERTY = "DetectorName";
public static final String DISCONNECT_ON_ERROR_PROPERTY = "DisconnectOnError";
public static final String DISCONNECT_ON_END_RUN_PROPERTY = "DisconnectOnEndRun";
@@ -36,6 +37,7 @@
// Data source
public static final String DATA_SOURCE_TYPE_PROPERTY = "DataSourceType";
public static final String DATA_SOURCE_PATH_PROPERTY = "DataSourcePath";
+ public static final String PROCESSING_STAGE_PROPERTY = "ProcessingStage";
// ET connection parameters
public static final String ET_NAME_PROPERTY = "EtName";
@@ -69,7 +71,8 @@
// Data source
DATA_SOURCE_TYPE_PROPERTY,
- DATA_SOURCE_PATH_PROPERTY,
+ DATA_SOURCE_PATH_PROPERTY,
+ PROCESSING_STAGE_PROPERTY,
// ET parameters
ET_NAME_PROPERTY,
@@ -244,6 +247,18 @@
firePropertyChange(DATA_SOURCE_PATH_PROPERTY, oldValue, getDataSourcePath());
}
+ public ProcessingStage getProcessingStage() {
+ if (config.get(PROCESSING_STAGE_PROPERTY) == null)
+ throw new RuntimeException(PROCESSING_STAGE_PROPERTY + " is null!!!");
+ return ProcessingStage.valueOf(config.get(PROCESSING_STAGE_PROPERTY));
+ }
+
+ public void setProcessingStage(ProcessingStage processingStage) {
+ ProcessingStage oldValue = getProcessingStage();
+ config.set(PROCESSING_STAGE_PROPERTY, processingStage);
+ firePropertyChange(PROCESSING_STAGE_PROPERTY, oldValue, getProcessingStage());
+ }
+
public String getEtName() {
return config.get(ET_NAME_PROPERTY);
}
@@ -363,7 +378,7 @@
config.set(PRESCALE_PROPERTY, prescale);
firePropertyChange(PRESCALE_PROPERTY, oldValue, getPrescale());
}
-
+
@Override
public String[] getPropertyNames() {
return CONFIG_PROPERTIES;
java/trunk/monitoring-app/src/main/resources/org/hps/monitoring/config
--- java/trunk/monitoring-app/src/main/resources/org/hps/monitoring/config/default_config.prop 2014-09-03 12:45:00 UTC (rev 944)
+++ java/trunk/monitoring-app/src/main/resources/org/hps/monitoring/config/default_config.prop 2014-09-03 18:11:04 UTC (rev 945)
@@ -18,6 +18,7 @@
# event source
DataSourceType=ET_SERVER
DataSourcePath=
+ProcessingStage=LCIO
# ET connection settings
Blocking=false
SVNspam 0.1