Commit in hps-java/src/main on MAIN
resources/org/lcsim/hps/steering/TestRunEventDisplay.lcsim-21.5 -> 1.6
                                /ECalTriggerWindowMonitoring.lcsim-21.3 -> 1.4
                                /TestRunMonitoring.lcsim+1-11.18 -> 1.19
                                /ECalMonitoring.lcsim+1-11.9 -> 1.10
java/org/lcsim/hps/monitoring/RunControlDialog.java+75added 1.1
                             /AIDAFrame.java+1-71.4 -> 1.5
                             /RunControlDriver.java-841.3 removed
java/org/lcsim/hps/evio/TestRunEvioToLcio.java+11-11.14 -> 1.15
+89-98
1 added + 1 removed + 6 modified, total 8 files
run control window is now built into TestRunEvioToLcio with -r option; no longer a driver

hps-java/src/main/resources/org/lcsim/hps/steering
TestRunEventDisplay.lcsim 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- TestRunEventDisplay.lcsim	18 May 2012 03:50:46 -0000	1.5
+++ TestRunEventDisplay.lcsim	23 May 2012 18:22:16 -0000	1.6
@@ -7,7 +7,6 @@
         <printDriversDetailed>true</printDriversDetailed>
     </control>    
     <execute>
-<!--        <driver name="RunControlDriver"/>-->
         <driver name="HPSCalibrationDriver"/>
         <driver name="EventMarkerDriver"/>
         <driver name="EcalRawConverter"/>
@@ -24,7 +23,6 @@
     </execute>    
     <drivers>
         <driver name="HPSCalibrationDriver" type="org.lcsim.hps.monitoring.HPSCalibrationDriver"/>   
-        <driver name="RunControlDriver" type="org.lcsim.hps.monitoring.RunControlDriver"/>
         <driver name="SVTSimpleEventDisplay" type="org.lcsim.hps.monitoring.svt.SVTSimpleEventDisplay">
             <singleEvent>true</singleEvent>
         </driver>

hps-java/src/main/resources/org/lcsim/hps/steering
ECalTriggerWindowMonitoring.lcsim 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- ECalTriggerWindowMonitoring.lcsim	13 May 2012 21:39:24 -0000	1.3
+++ ECalTriggerWindowMonitoring.lcsim	23 May 2012 18:22:16 -0000	1.4
@@ -7,7 +7,6 @@
         <printDriversDetailed>true</printDriversDetailed>
     </control>    
     <execute>
-        <driver name="RunControlDriver"/>
         <driver name="EventMarkerDriver"/>
         <driver name="HPSEcalConditions"/>
         <driver name="FADCConverter"/>
@@ -27,7 +26,6 @@
 -->
     </execute>    
     <drivers>
-        <driver name="RunControlDriver" type="org.lcsim.hps.monitoring.RunControlDriver"/>
         <driver name="HPSEcalConditions" type="org.lcsim.hps.recon.ecal.HPSEcalConditions"/>
         <driver name="FADCConverter" type="org.lcsim.hps.recon.ecal.FADCConverterDriver">
             <threshold>80</threshold>

hps-java/src/main/resources/org/lcsim/hps/steering
TestRunMonitoring.lcsim 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- TestRunMonitoring.lcsim	18 May 2012 03:50:46 -0000	1.18
+++ TestRunMonitoring.lcsim	23 May 2012 18:22:16 -0000	1.19
@@ -21,7 +21,7 @@
         <driver name="SVTOccupancyPlots"/>
         <driver name="SVTSimpleEventDisplay"/>
 <!--        <driver name="SVTPulsePlots"/>-->
-<!--        <driver name="SVTMonitoringPlots"/>-->
+        <driver name="SVTMonitoringPlots"/>
         <driver name="SVTHitRecoPlots"/>
         <driver name="CleanupDriver"/>
 

hps-java/src/main/resources/org/lcsim/hps/steering
ECalMonitoring.lcsim 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- ECalMonitoring.lcsim	16 May 2012 16:09:27 -0000	1.9
+++ ECalMonitoring.lcsim	23 May 2012 18:22:16 -0000	1.10
@@ -15,8 +15,8 @@
         <driver name="EcalMonitoringPlots"/>
         <driver name="EcalHitPlots"/>
         <driver name="EcalClusterPlots"/>
-<!--
         <driver name="EcalEvsX"/>
+<!--
         <driver name="EcalEventMonitor"/>
         <driver name="EcalWindowPlots"/>
         <driver name="EcalDaqPlots"/>

hps-java/src/main/java/org/lcsim/hps/monitoring
RunControlDialog.java added at 1.1
diff -N RunControlDialog.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ RunControlDialog.java	23 May 2012 18:22:16 -0000	1.1
@@ -0,0 +1,75 @@
+package org.lcsim.hps.monitoring;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import org.lcsim.event.EventHeader;
+
+/**
+ * Lightweight driver for stepping through events in offline analysis, without
+ * running the MonitoringApp.
+ *
+ * @author Sho Uemura <[log in to unmask]>
+ * @version $Id: RunControlDialog.java,v 1.1 2012/05/23 18:22:16 meeg Exp $
+ */
+public class RunControlDialog implements ActionListener {
+
+    JButton nextButton;
+    JButton runButton;
+    JFrame nextFrame;
+    boolean run = false;
+    final Object syncObject = new Object();
+
+    public RunControlDialog() {
+        nextFrame = new JFrame();
+        nextFrame.setAlwaysOnTop(true);
+        nextFrame.getContentPane().setLayout(new BoxLayout(nextFrame.getContentPane(), BoxLayout.X_AXIS));
+
+        nextButton = new JButton("Next event");
+        nextButton.addActionListener(this);
+        nextFrame.add(nextButton);
+        runButton = new JButton("Run");
+        runButton.addActionListener(this);
+        nextFrame.add(runButton);
+
+        nextFrame.pack();
+        nextFrame.setVisible(true);
+        nextFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+    }
+
+	//return true to process the event; return false to discard; waits if in pause mode
+    public boolean process(EventHeader event) {
+        if (!run) {
+            synchronized (syncObject) {
+                try {
+                    syncObject.wait();
+                } catch (InterruptedException e) {
+                }
+            }
+        }
+		return true;
+    }
+
+	@Override
+    public void actionPerformed(ActionEvent ae) {
+        if (ae.getSource() == nextButton) {
+            synchronized (syncObject) {
+                syncObject.notify();
+            }
+        }
+        if (ae.getSource() == runButton) {
+            if (!run) {
+                runButton.setText("Pause");
+                run = true;
+                synchronized (syncObject) {
+                    syncObject.notify();
+                }
+            } else {
+                run = false;
+                runButton.setText("Run");
+            }
+        }
+    }
+}

hps-java/src/main/java/org/lcsim/hps/monitoring
AIDAFrame.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- AIDAFrame.java	4 May 2012 16:35:44 -0000	1.4
+++ AIDAFrame.java	23 May 2012 18:22:16 -0000	1.5
@@ -8,7 +8,7 @@
 /**
  *
  * @author Sho Uemura <[log in to unmask]>
- * @version $Id: AIDAFrame.java,v 1.4 2012/05/04 16:35:44 meeg Exp $
+ * @version $Id: AIDAFrame.java,v 1.5 2012/05/23 18:22:16 meeg Exp $
  */
 public class AIDAFrame extends JFrame {
 
@@ -21,10 +21,6 @@
         this.getContentPane().setLayout(new BorderLayout());
 
         menubar = new JMenuBar();
-//		JMenu menu = new JMenu("File");
-//		JMenuItem item = new JMenuItem("meeg");
-//		menu.add(item);
-//		menubar.add(menu);
         this.setJMenuBar(menubar);
 
         this.add(tabbedPane, BorderLayout.NORTH);
@@ -32,8 +28,6 @@
         controlsPanel = new JPanel();
         controlsPanel.setLayout(new BoxLayout(controlsPanel, BoxLayout.X_AXIS));
         this.add(controlsPanel, BorderLayout.SOUTH);
-
-        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     }
 
     public void addPlotter(IPlotter plotter) {

hps-java/src/main/java/org/lcsim/hps/monitoring
RunControlDriver.java removed after 1.3
diff -N RunControlDriver.java
--- RunControlDriver.java	13 May 2012 21:39:24 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,84 +0,0 @@
-package org.lcsim.hps.monitoring;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JFrame;
-import org.lcsim.event.EventHeader;
-import org.lcsim.util.Driver;
-
-/**
- * Lightweight driver for stepping through events in offline analysis, without
- * running the MonitoringApp.
- *
- * @author Sho Uemura <[log in to unmask]>
- * @version $Id: RunControlDriver.java,v 1.3 2012/05/13 21:39:24 meeg Exp $
- */
-public class RunControlDriver extends Driver implements ActionListener {
-
-    JButton nextButton;
-    JButton runButton;
-    JFrame nextFrame;
-    boolean run = false;
-    final Object syncObject;
-
-    public RunControlDriver() {
-        syncObject = new Object();
-    }
-
-    @Override
-    protected void startOfData() {
-        nextFrame = new JFrame();
-        nextFrame.setAlwaysOnTop(true);
-        nextFrame.getContentPane().setLayout(new BoxLayout(nextFrame.getContentPane(), BoxLayout.X_AXIS));
-
-        nextButton = new JButton("Next event");
-        nextButton.addActionListener(this);
-        nextFrame.add(nextButton);
-        runButton = new JButton("Run");
-        runButton.addActionListener(this);
-        nextFrame.add(runButton);
-
-        nextFrame.pack();
-        nextFrame.setVisible(true);
-    }
-
-    @Override
-    protected void process(EventHeader event) {
-        if (!run) {
-            synchronized (syncObject) {
-                try {
-                    syncObject.wait();
-                } catch (InterruptedException e) {
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void endOfData() {
-        nextFrame.setVisible(false);
-    }
-
-    @Override
-    public void actionPerformed(ActionEvent ae) {
-        if (ae.getSource() == nextButton) {
-            synchronized (syncObject) {
-                syncObject.notify();
-            }
-        }
-        if (ae.getSource() == runButton) {
-            if (!run) {
-                runButton.setText("Pause");
-                run = true;
-                synchronized (syncObject) {
-                    syncObject.notify();
-                }
-            } else {
-                run = false;
-                runButton.setText("Run");
-            }
-        }
-    }
-}

hps-java/src/main/java/org/lcsim/hps/evio
TestRunEvioToLcio.java 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- TestRunEvioToLcio.java	22 May 2012 20:14:18 -0000	1.14
+++ TestRunEvioToLcio.java	23 May 2012 18:22:17 -0000	1.15
@@ -15,6 +15,7 @@
 import org.lcsim.conditions.ConditionsManager.ConditionsNotFoundException;
 import org.lcsim.event.EventHeader;
 import org.lcsim.hps.monitoring.HPSCalibrationListener;
+import org.lcsim.hps.monitoring.RunControlDialog;
 import org.lcsim.job.JobControlManager;
 import org.lcsim.util.lcio.LCIOWriter;
 
@@ -49,6 +50,7 @@
 		options.addOption(new Option("s", true, "Sleep duration between events (in ms)"));
 		options.addOption(new Option("e", true, "Stop after N events"));
 		options.addOption(new Option("w", false, "Wait after end of data"));
+		options.addOption(new Option("r", false, "Show run control window"));
 
 		return options;
 	}
@@ -127,6 +129,12 @@
 			maxEvents = Integer.valueOf(cl.getOptionValue("e"));
 		}
 
+		RunControlDialog runControl = null;
+
+		if (cl.hasOption("r")) {
+			runControl = new RunControlDialog();
+		}
+
 		// LCIO writer.
 		if (lcioFileName != null) {
 			try {
@@ -198,7 +206,9 @@
 						calibListener.endRun(seconds, nevents);
 					} else if (eventBuilder.isPhysicsEvent(evioEvent)) {
 						EventHeader lcioEvent = eventBuilder.makeLCSimEvent(evioEvent);
-						jobManager.processEvent(lcioEvent);
+						if (runControl.process(lcioEvent)) {
+							jobManager.processEvent(lcioEvent);
+						}
 						if (writer != null) {
 							writer.write(lcioEvent);
 							writer.flush();
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1