1 added + 10 modified, total 11 files
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/JobSettingsPanel.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -25,7 +25,6 @@
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JTextField;
-import javax.swing.SwingUtilities;
import org.hps.monitoring.enums.SteeringType;
import org.hps.monitoring.gui.model.ConfigurationModel;
@@ -260,14 +259,13 @@
if (!okay)
resetEventBuilder();
- }
- */
+ }
/**
* Reset the event builder to the default.
*/
- // FIXME: Handle this with property change listener and use old value if new one is invalid.
/*
+ // FIXME: Handle this with property change listener and use old value if new one is invalid.
private void resetEventBuilder() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/Main.java 2014-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/Main.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -16,7 +16,6 @@
/**
* This is the front-end for running the monitoring app via a
* {@link #main(String[])} method.
- * @author Jeremy McCormick <[log in to unmask]>
*/
public class Main {
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/MonitoringApplication.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -42,9 +42,7 @@
import java.io.PrintStream;
import java.net.InetAddress;
import java.text.SimpleDateFormat;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import java.util.Vector;
import java.util.logging.Handler;
import java.util.logging.Level;
@@ -71,7 +69,7 @@
import org.hps.monitoring.enums.SteeringType;
import org.hps.monitoring.gui.model.Configuration;
import org.hps.monitoring.gui.model.ConfigurationModel;
-import org.hps.monitoring.gui.model.HasConfigurationModel;
+import org.hps.monitoring.gui.model.RunModel;
import org.hps.monitoring.plotting.MonitoringAnalysisFactory;
import org.hps.monitoring.plotting.MonitoringPlotFactory;
import org.hps.monitoring.record.EventProcessingChain;
@@ -158,6 +156,9 @@
// The ConfigurationModel for updating GUI components from the global configuration.
private ConfigurationModel configurationModel = new ConfigurationModel();
+
+ // The RunModel for updating the RunPanel.
+ private RunModel runModel = new RunModel();
/**
* Constructor for the monitoring application.
@@ -301,7 +302,7 @@
mainPanel.add(connectionStatusPanel, c);
// Run status panel.
- runPanel = new RunPanel();
+ runPanel = new RunPanel(runModel);
c = new GridBagConstraints();
c.insets = new Insets(5, 0, 5, 0);
c.fill = GridBagConstraints.BOTH;
@@ -1166,29 +1167,23 @@
// Get a list of Drivers to execute from the JobManager which was
// already configured.
eventProcessing.add(jobManager.getDriverExecList());
-
- // Using an ET server or an EVIO file?
- if (usingEtServer() || usingEvioFile()) {
- // ET or EVIO source can be used for updating the RunPanel.
- eventProcessing.add(runPanel.new EvioUpdater());
-
- // Basic ET system monitor.
- if (usingEtServer())
- eventProcessing.add(new EtSystemMonitor());
-
- } else {
- // Using an LCIO file source so must use a different updater for the RunPanel.
- eventProcessing.add(runPanel.new CompositeRecordUpdater());
- }
-
+
// Using an ET server?
- if (usingEtServer())
- // Add ET system strip charts.
+ if (usingEtServer()) {
+
+ // ET system monitor.
+ eventProcessing.add(new EtSystemMonitor());
+
+ // ET system strip charts.
eventProcessing.add(new EtSystemStripCharts());
-
+ }
+
// Setup the event processing based on the above configuration.
eventProcessing.setup();
+ // Add processor for updating the RunPanel.
+ eventProcessing.add(runPanel.new RunModelUpdater());
+
// Create the event processing thread.
eventProcessingThread = new EventProcessingThread(eventProcessing);
@@ -1545,10 +1540,10 @@
}
// Log all status changes.
- log(level, "STATUS CHANGED, "
- + "subsystem: " + status.getSubsystem() + ", "
+ log(level, "STATUS, "
+ + "subsys: " + status.getSubsystem() + ", "
+ "code: " + status.getStatusCode().name() + ", "
- + "description: " + status.getDescription() + ", "
- + "message: " + status.getMessage());
+ + "descr: " + status.getDescription() + ", "
+ + "mesg: " + status.getMessage());
}
}
\ No newline at end of file
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/RunPanel.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -1,7 +1,11 @@
package org.hps.monitoring.gui;
+import static org.hps.monitoring.gui.model.RunModel.*;
+
import java.awt.Dimension;
import java.awt.FlowLayout;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
@@ -11,35 +15,43 @@
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
+import org.hps.evio.EventConstants;
+import org.hps.monitoring.gui.model.RunModel;
import org.hps.monitoring.record.composite.CompositeRecord;
import org.hps.monitoring.record.composite.CompositeRecordProcessor;
-import org.hps.monitoring.record.evio.EvioEventProcessor;
import org.jlab.coda.jevio.EvioEvent;
/**
* Dashboard for displaying information about the current run.
* @author Jeremy McCormick <[log in to unmask]>
*/
-// FIXME: This component should be updated via a Model rather than direct calls to this class.
-public class RunPanel extends JPanel {
+// FIXME: Add current EVIO event number, current event sequence number, job start date, and job end date fields.
+public class RunPanel extends JPanel implements PropertyChangeListener {
FieldPanel runNumberField = new FieldPanel("Run Number", "", 10, false);
DatePanel startDateField = new DatePanel("Run Start", "", 16, false);
DatePanel endDateField = new DatePanel("Run End", "", 16, false);
FieldPanel lengthField = new FieldPanel("Run Length [sec]", "", 12, false);
FieldPanel totalEventsField = new FieldPanel("Total Events in Run", "", 14, false);
- FieldPanel elapsedTimeField = new FieldPanel("Elapsed Time [sec]", "", 14, false);;
+ FieldPanel elapsedTimeField = new FieldPanel("Elapsed Time [sec]", "", 14, false);
FieldPanel eventsReceivedField = new FieldPanel("Events Received", "", 14, false);
FieldPanel dataReceivedField = new FieldPanel("Data Received [bytes]", "", 14, false);
Timer timer;
long jobStartMillis;
+
+ RunModel model;
- RunPanel() {
+ RunPanel(RunModel model) {
+ this.model = model;
+ this.model.addPropertyChangeListener(this);
+
setLayout(new FlowLayout(FlowLayout.LEFT));
- TitledBorder titledBorder = BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Run Summary");
- setBorder(titledBorder);
+
+ TitledBorder titledBorder = BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Run Summary");
+ setBorder(titledBorder);
+
add(runNumberField);
add(startDateField);
add(endDateField);
@@ -48,27 +60,17 @@
add(elapsedTimeField);
add(eventsReceivedField);
add(dataReceivedField);
+
this.setMinimumSize(new Dimension(0, 190));
}
-
- void clear() {
- runNumberField.setValue("");
- startDateField.setValue("");
- endDateField.setValue("");
- lengthField.setValue("");
- totalEventsField.setValue("");
- elapsedTimeField.setValue("");
- eventsReceivedField.setValue("0");
- dataReceivedField.setValue("0");
- }
-
- void startRunTimer() {
- timer = new Timer("UpdateTime");
- jobStartMillis = System.currentTimeMillis();
+
+ void startJobTimer() {
+ timer = new Timer("JobTimer");
+ jobStartMillis = System.currentTimeMillis();
TimerTask updateTimeTask = new TimerTask() {
public void run() {
- final long elapsedTime = (System.currentTimeMillis() - jobStartMillis) / 1000;
- elapsedTimeField.setValue(elapsedTime);
+ final int elapsedTime = (int)((System.currentTimeMillis() - jobStartMillis) / 1000);
+ model.setElapsedTime(elapsedTime);
}
};
timer.scheduleAtFixedRate(updateTimeTask, 0, 1000);
@@ -78,99 +80,88 @@
timer.cancel();
timer.purge();
}
-
- /**
- * An <tt>EvioEventProcessor</tt> for updating the <tt>RunPanel</tt>
- * by processing EVIO events and extracting information from them
- * such as run parameters.
- */
- class EvioUpdater extends EvioEventProcessor {
-
- long startMillis;
- long endMillis;
- int eventsReceived;
- long totalBytes;
- Timer timer;
- long jobStartMillis;
-
+
+ class RunModelUpdater extends CompositeRecordProcessor {
+
+ @Override
public void startJob() {
- eventsReceived = 0;
- clear();
- RunPanel.this.startRunTimer();
+ model.reset();
+ RunPanel.this.startJobTimer();
}
- public void processEvent(EvioEvent event) {
- ++eventsReceived;
- totalBytes += (long)event.getTotalBytes();
-
- // FIXME: This should only happen every X seconds.
- eventsReceivedField.setValue(eventsReceived);
- dataReceivedField.setValue(totalBytes);
+ @Override
+ public void processEvent(CompositeRecord event) {
+ model.incrementEventsReceived();
+ EvioEvent evioEvent = event.getEvioEvent();
+ if (evioEvent != null) {
+ model.addDataReceived((long)evioEvent.getTotalBytes());
+ if (EventConstants.isPreStartEvent(evioEvent)) {
+ startRun(evioEvent);
+ } else if (EventConstants.isEndEvent(evioEvent)) {
+ endRun(evioEvent);
+ }
+ }
}
-
- public void startRun(EvioEvent event) {
-
- // Get start of run data.
- int[] data = event.getIntData();
+
+ private void endRun(EvioEvent evioEvent) {
+ // Get end run data.
+ int[] data = evioEvent.getIntData();
int seconds = data[0];
- int runNumber = data[1];
- startMillis = ((long) seconds) * 1000;
+ int eventCount = data[2];
+ long endMillis = ((long) seconds) * 1000;
// Update the GUI.
- runNumberField.setValue(runNumber);
- startDateField.setValue(new Date(startMillis));
+ model.setEndDate(new Date(endMillis));
+ model.computeRunLength();
+ model.setTotalEvents(eventCount);
}
- public void endRun(EvioEvent event) {
-
- // Get end run data.
- int[] data = event.getIntData();
+ private void startRun(EvioEvent evioEvent) {
+ // Get start of run data.
+ int[] data = evioEvent.getIntData();
int seconds = data[0];
- int eventCount = data[2];
- endMillis = ((long) seconds) * 1000;
- long elapsedMillis = endMillis - startMillis;
- long elapsedSeconds = (long)((double)elapsedMillis / 1000.);
+ int runNumber = data[1];
+ long startMillis = ((long) seconds) * 1000;
// Update the GUI.
- endDateField.setValue(new Date(endMillis));
- totalEventsField.setValue(eventCount);
- lengthField.setValue(elapsedSeconds);
+ model.setRunNumber(runNumber);
+ model.setStartDate(new Date(startMillis));
}
-
+
+ @Override
public void endJob() {
RunPanel.this.stopRunTimer();
- }
+ }
}
-
+
/**
- * A processor for updating the GUI using only the generic
- * composite record information. This is used when there is no
- * source EVIO file e.g. when an LCIO data source is being used.
- * Several fields such as the data received are not updated by
- * this class.
- * @author Jeremy McCormick <[log in to unmask]>
+ * Update the GUI from changes in the underlying RunModel object.
*/
- class CompositeRecordUpdater extends CompositeRecordProcessor {
-
- long startMillis;
- long endMillis;
- int eventsReceived;
- long jobStartMillis;
-
- public void startJob() {
- eventsReceived = 0;
- clear();
- RunPanel.this.startRunTimer();
- }
-
- public void processEvent(CompositeRecord event) {
- ++eventsReceived;
- // FIXME: This should only happen every X seconds.
- eventsReceivedField.setValue(eventsReceived);
- }
-
- public void endJob() {
- RunPanel.this.stopRunTimer();
- }
- }
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ Object value = evt.getNewValue();
+ if (RUN_NUMBER_PROPERTY.equals(evt.getPropertyName())) {
+ this.runNumberField.setValue((Integer) value);
+ } else if (START_DATE_PROPERTY.equals(evt.getPropertyName())) {
+ if (value != null)
+ this.startDateField.setValue((Date) value);
+ else
+ this.startDateField.setValue("");
+ } else if (END_DATE_PROPERTY.equals(evt.getPropertyName())) {
+ if (value != null)
+ this.endDateField.setValue((Date) value);
+ else
+ this.endDateField.setValue("");
+ } else if (RUN_LENGTH_PROPERTY.equals(evt.getPropertyName())) {
+ this.lengthField.setValue((Integer) value);
+ } else if (TOTAL_EVENTS_PROPERTY.equals(evt.getPropertyName())) {
+ this.totalEventsField.setValue((Integer) value);
+ } else if (EVENTS_RECEIVED_PROPERTY.equals(evt.getPropertyName())) {
+ this.eventsReceivedField.setValue((Integer) value);
+ } else if (ELAPSED_TIME_PROPERTY.equals(evt.getPropertyName())) {
+ this.elapsedTimeField.setValue((Integer) value);
+ } else if (DATA_RECEIVED_PROPERTY.equals(evt.getPropertyName())) {
+ this.dataReceivedField.setValue((Long) value);
+ }
+ }
}
\ No newline at end of file
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/AbstractModel.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -34,11 +34,11 @@
propertyChangeSupport.firePropertyChange(evt);
}
- abstract public String[] getProperties();
+ abstract public String[] getPropertyNames();
// FIXME: This method is kind of a hack. Any other good way to do this?
public void fireAllChanged() {
- for (String property : getProperties()) {
+ for (String property : getPropertyNames()) {
Method getMethod = null;
for (Method method : getClass().getMethods()) {
if (method.getName().equals("get" + property)) {
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/ConfigurationModel.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -353,7 +353,7 @@
}
@Override
- public String[] getProperties() {
+ public String[] getPropertyNames() {
return CONFIG_PROPERTIES;
}
}
\ No newline at end of file
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/RunModel.java (rev 0)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/gui/model/RunModel.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -0,0 +1,148 @@
+package org.hps.monitoring.gui.model;
+
+import java.util.Date;
+
+/**
+ * Backing model for run information that shows in the {@link org.hps.monitoring.gui.RunPanel}.
+ */
+public class RunModel extends AbstractModel {
+
+ public final static String RUN_NUMBER_PROPERTY = "RunNumber";
+ public final static String START_DATE_PROPERTY = "StartDate";
+ public final static String END_DATE_PROPERTY = "EndDate";
+ public final static String RUN_LENGTH_PROPERTY = "RunLength"; // set at end, in seconds
+ public final static String TOTAL_EVENTS_PROPERTY = "TotalEvents"; // only set at end
+ public final static String EVENTS_RECEIVED_PROPERTY = "EventsReceived"; // events received so far
+ public final static String ELAPSED_TIME_PROPERTY = "ElapsedTime"; // updated on the fly, in seconds
+ public final static String DATA_RECEIVED_PROPERTY = "DataReceived"; // updated on the fly, in bytes
+
+ static final String[] properties = new String[] {
+ RUN_NUMBER_PROPERTY,
+ START_DATE_PROPERTY,
+ END_DATE_PROPERTY,
+ RUN_LENGTH_PROPERTY,
+ TOTAL_EVENTS_PROPERTY,
+ ELAPSED_TIME_PROPERTY,
+ DATA_RECEIVED_PROPERTY
+ };
+
+ int runNumber;
+ Date startDate;
+ Date endDate;
+ int runLength;
+ int totalEvents;
+ int eventsReceived;
+ int elapsedTime;
+ long dataReceived;
+
+ public String[] getPropertyNames() {
+ return properties;
+ }
+
+ public int getRunNumber() {
+ return runNumber;
+ }
+
+ public void setRunNumber(int runNumber) {
+ int oldValue = this.runNumber;
+ this.runNumber = runNumber;
+ this.firePropertyChange(RUN_NUMBER_PROPERTY, oldValue, this.runNumber);
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public void setStartDate(Date startDate) {
+ Date oldValue = this.startDate;
+ this.startDate = startDate;
+ this.firePropertyChange(START_DATE_PROPERTY, oldValue, this.startDate);
+ }
+
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(Date endDate) {
+ Date oldValue = this.endDate;
+ this.endDate = endDate;
+ this.firePropertyChange(END_DATE_PROPERTY, oldValue, this.endDate);
+ }
+
+ public int getRunLength() {
+ return runLength;
+ }
+
+ public void setRunLength(int runLength) {
+ int oldValue = this.runLength;
+ this.runLength = runLength;
+ this.firePropertyChange(RUN_LENGTH_PROPERTY, oldValue, this.runLength);
+ }
+
+ public void computeRunLength() {
+ if (startDate != null && endDate != null) {
+ long elapsedMillis = endDate.getTime() - startDate.getTime();
+ int elapsedSeconds = (int)((double)elapsedMillis / 1000.);
+ setElapsedTime(elapsedSeconds);
+ }
+ }
+
+ public int getTotalEvents() {
+ return totalEvents;
+ }
+
+ public void setTotalEvents(int totalEvents) {
+ int oldValue = this.totalEvents;
+ this.totalEvents = totalEvents;
+ this.firePropertyChange(TOTAL_EVENTS_PROPERTY, oldValue, this.totalEvents);
+ }
+
+ public int getEventsReceived() {
+ return eventsReceived;
+ }
+
+ public void setEventsReceived(int eventsReceived) {
+ int oldValue = this.eventsReceived;
+ this.eventsReceived = eventsReceived;
+ this.firePropertyChange(EVENTS_RECEIVED_PROPERTY, oldValue, this.eventsReceived);
+ }
+
+ public void incrementEventsReceived() {
+ this.setEventsReceived(eventsReceived + 1);
+ }
+
+ public int getElapsedTime() {
+ return elapsedTime;
+ }
+
+ public void setElapsedTime(int elapsedTime) {
+ int oldValue = this.elapsedTime;
+ this.elapsedTime = elapsedTime;
+ this.firePropertyChange(ELAPSED_TIME_PROPERTY, oldValue, this.elapsedTime);
+ }
+
+ public long getDataReceived() {
+ return dataReceived;
+ }
+
+ public void setDataReceived(long dataReceived) {
+ long oldValue = this.dataReceived;
+ this.dataReceived = dataReceived;
+ this.firePropertyChange(DATA_RECEIVED_PROPERTY, oldValue, this.dataReceived);
+ }
+
+ public void addDataReceived(long addDataReceived) {
+ this.setDataReceived(dataReceived + addDataReceived);
+ }
+
+ public void reset() {
+ setDataReceived(0);
+ setElapsedTime(0);
+ setEndDate(null);
+ setEventsReceived(0);
+ setRunLength(0);
+ setRunNumber(0);
+ setStartDate(null);
+ setTotalEvents(0);
+ }
+}
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/EventProcessingChain.java 2014-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/EventProcessingChain.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -9,6 +9,7 @@
import org.freehep.record.loop.RecordLoop.State;
import org.freehep.record.source.RecordSource;
import org.hps.evio.LCSimEventBuilder;
+import org.hps.monitoring.enums.DataSourceType;
import org.hps.monitoring.record.composite.CompositeRecordLoop;
import org.hps.monitoring.record.composite.CompositeRecordProcessor;
import org.hps.monitoring.record.etevent.EtEventProcessor;
@@ -33,28 +34,23 @@
* can be registered with the three different loops for processing the different
* record types, in order to plot, update a GUI component, or analyze the events.
*/
+// FIXME: Adding of CompositeRecordProcessors has to happen after setup is called because
+// otherwise the CompositeRecord doesn't have the references to EVIO, etc. Instead the
+// additional CompositeRecordProcessors should be stored in a separate list and added
+// automatically after the standard event processing chain is setup.
public class EventProcessingChain extends AbstractLoopListener {
-
+
/**
- * Type of source for events.
- */
- public enum SourceType {
- ET_EVENT,
- EVIO_FILE,
- LCIO_FILE
- }
-
- /**
* Processing stages to execute.
*/
public enum ProcessingStage {
- READ_ET_EVENT,
- BUILD_EVIO_EVENT,
- BUILD_LCIO_EVENT
+ ET,
+ EVIO,
+ LCIO
}
- private SourceType sourceType = SourceType.ET_EVENT;
- private ProcessingStage processingStage = ProcessingStage.BUILD_LCIO_EVENT;
+ private DataSourceType sourceType = DataSourceType.ET_SERVER;
+ private ProcessingStage processingStage = ProcessingStage.LCIO;
private RecordSource recordSource;
private LCSimEventBuilder eventBuilder;
private int totalEventsProcessed;
@@ -94,17 +90,17 @@
throw new RuntimeException("No record source was set.");
// Using the ET server for events.
- if (sourceType == SourceType.ET_EVENT) {
+ if (sourceType == DataSourceType.ET_SERVER) {
// Add the ET event processing step.
compositeLoop.addProcessor(etStep);
}
// Building EVIO events.
- if (processingStage.ordinal() >= ProcessingStage.BUILD_EVIO_EVENT.ordinal()) {
+ if (processingStage.ordinal() >= ProcessingStage.EVIO.ordinal()) {
// Using EVIO event source.
- if (sourceType.ordinal() <= SourceType.EVIO_FILE.ordinal()) {
+ if (sourceType.ordinal() <= DataSourceType.EVIO_FILE.ordinal()) {
// Using ET event source.
- if (sourceType == SourceType.ET_EVENT) {
+ if (sourceType == DataSourceType.ET_SERVER) {
// Use dynamic event queue.
evioStep.setEvioEventQueue(new EvioEventQueue());
}
@@ -114,11 +110,11 @@
}
// Building LCIO events.
- if (processingStage.ordinal() >= ProcessingStage.BUILD_LCIO_EVENT.ordinal()) {
+ if (processingStage.ordinal() >= ProcessingStage.LCIO.ordinal()) {
// Set detector on event builder.
if (eventBuilder != null)
eventBuilder.setDetectorName(detectorName);
- if (sourceType.ordinal() != SourceType.LCIO_FILE.ordinal()) {
+ if (sourceType.ordinal() != DataSourceType.LCIO_FILE.ordinal()) {
// Use dynamic event queue.
lcioStep.setLcioEventQueue(new LcioEventQueue());
}
@@ -137,7 +133,7 @@
* Set the type of source being used.
* @param sourceType The type of source.
*/
- void setSourceType(SourceType sourceType) {
+ void setSourceType(DataSourceType sourceType) {
this.sourceType = sourceType;
}
@@ -164,7 +160,7 @@
public void setRecordSource(EtEventSource recordSource) {
this.recordSource = recordSource;
this.etStep.getLoop().setRecordSource(recordSource);
- this.sourceType = SourceType.ET_EVENT;
+ this.sourceType = DataSourceType.ET_SERVER;
}
/**
@@ -174,7 +170,7 @@
public void setRecordSource(EvioFileSource recordSource) {
this.recordSource = recordSource;
evioStep.getLoop().setRecordSource(recordSource);
- setSourceType(SourceType.EVIO_FILE);
+ setSourceType(DataSourceType.EVIO_FILE);
}
/**
@@ -188,7 +184,7 @@
} catch (IOException e) {
throw new RuntimeException(e);
}
- setSourceType(SourceType.LCIO_FILE);
+ setSourceType(DataSourceType.LCIO_FILE);
}
/**
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/EvioProcessingStep.java 2014-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/EvioProcessingStep.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -8,7 +8,7 @@
import org.freehep.record.loop.RecordLoop.Command;
import org.freehep.record.source.NoSuchRecordException;
import org.hps.evio.EventConstants;
-import org.hps.monitoring.record.EventProcessingChain.SourceType;
+import org.hps.monitoring.enums.DataSourceType;
import org.hps.monitoring.record.composite.CompositeRecord;
import org.hps.monitoring.record.composite.CompositeRecordProcessor;
import org.hps.monitoring.record.evio.EvioEventLoop;
@@ -26,7 +26,7 @@
class EvioProcessingStep extends CompositeRecordProcessor {
EvioEventLoop loop = new EvioEventLoop();
- SourceType sourceType;
+ DataSourceType sourceType;
EvioEventQueue evioEventQueue;
boolean stopOnEndRun;
@@ -73,7 +73,7 @@
* Set the type of event source.
* @param sourceType The type of event source.
*/
- void setSourceType(SourceType sourceType) {
+ void setSourceType(DataSourceType sourceType) {
this.sourceType = sourceType;
}
java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/composite
--- java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/composite/CompositeRecordLoopAdapter.java 2014-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/java/org/hps/monitoring/record/composite/CompositeRecordLoopAdapter.java 2014-08-02 00:29:37 UTC (rev 835)
@@ -20,6 +20,7 @@
* @param loopEvent
*/
public void finish(LoopEvent loopEvent) {
+ System.out.println("CompositeRecordLoopAdapter.finish");
for (CompositeRecordProcessor processor : processors) {
// Call end job hook on all registered processors, which are
// responsible for sending the stop command to their loops.
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-08-01 22:29:57 UTC (rev 834)
+++ java/trunk/monitoring-app/src/main/resources/org/hps/monitoring/config/default_config.prop 2014-08-02 00:29:37 UTC (rev 835)
@@ -7,7 +7,7 @@
DetectorName=HPS-TestRun-v5
DisconnectOnError=true
EventBuilderClassName=org.hps.evio.LCSimTestRunEventBuilder
-#logFileName=
+#LogFileName=
LogLevel=ALL
LogToFile=false
#SteeringFile=
@@ -30,9 +30,7 @@
QueueSize=0
StationName=MY_STATION
Verbose=false
-# Does flow mode need GUI binding?!
-#FlowMode=0
WaitMode=TIMED
-WaitTime=10000000
+WaitTime=1000000000
SVNspam 0.1