LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  November 2014

HPS-SVN November 2014

Subject:

r1435 - in /java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay: io/LCIOManager.java ui/CalorimeterPanel.java ui/DataFileViewer.java ui/FileViewer.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Wed, 5 Nov 2014 12:08:42 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (148 lines)

Author: mccaky
Date: Wed Nov  5 04:08:38 2014
New Revision: 1435

Log:
Fixed event display to keep filtered highlighting when events change.

Modified:
    java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/io/LCIOManager.java
    java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/CalorimeterPanel.java
    java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/DataFileViewer.java
    java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/FileViewer.java

Modified: java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/io/LCIOManager.java
 =============================================================================
--- java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/io/LCIOManager.java	(original)
+++ java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/io/LCIOManager.java	Wed Nov  5 04:08:38 2014
@@ -47,10 +47,18 @@
         nextEvent();
     }
     
+    /**
+     * Sets the name of the LCIO collection for cluster objects.
+     * @param clusterCollectionName - The cluster collection name.
+     */
     public void setClusterCollectionName(String clusterCollectionName) {
         this.clusterCollectionName = clusterCollectionName;
     }
     
+    /**
+     * Sets the name of the LCIO collection for hit objects.
+     * @param hitCollectionName
+     */
     public void setHitCollectionName(String hitCollectionName) {
         this.hitCollectionName = hitCollectionName;
     }
@@ -69,6 +77,8 @@
         else { return -1; }
     }
     
+    // TODO: LCIO files can't actually store an HPSEcalCluster; this
+    // needs to be converted to use regular LCIO clusters instead.
     @Override
     public List<Cluster> getClusters() {
         // If the current event is undefined, return an empty list.
@@ -181,6 +191,8 @@
         }
     }
     
+    // TODO: LCIO files can't actually store an HPSEcalCluster; this
+    // needs to be converted to use regular LCIO clusters instead.
     public static final Cluster toPanelCluster(HPSEcalCluster lcioCluster) {
         // If the argument is null, return null.
         if(lcioCluster == null) { return null; }
@@ -199,6 +211,8 @@
         if(lcioHit == null) { return null; }
         
         // Otherwise, get the cluster x/y indices and energy.
+        // TODO: This fails to acquire an IDDecoder; needs to be fixed
+        // before it can be pushed into production.
         int ix = lcioHit.getIdentifierFieldValue("ix");
         int iy = lcioHit.getIdentifierFieldValue("iy");
         double energy = lcioHit.getCorrectedEnergy();

Modified: java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/CalorimeterPanel.java
 =============================================================================
--- java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/CalorimeterPanel.java	(original)
+++ java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/CalorimeterPanel.java	Wed Nov  5 04:08:38 2014
@@ -31,7 +31,7 @@
  */
 public final class CalorimeterPanel extends JPanel {
     // Java-suggested variable.
-    private static final long serialVersionUID = 2L;
+    private static final long serialVersionUID = 3L;
     // The color used for rendering seed hits.
     private Color clusterColor = Color.GREEN;
     // The default color of the calorimeter crystals.
@@ -209,10 +209,28 @@
      * clears all highlighting. This <b>does not</b> enable disabled
      * crystals.
      */
+    public void clearAll() {
+        for (int ix = 0; ix < xBoxes; ix++) {
+            for (int iy = 0; iy < yBoxes; iy++) {
+                crystal[ix][iy].setState(0.0, false, null);
+                crystal[ix][iy].clearAssociations();
+                extremum[0] = Double.MAX_VALUE;
+                extremum[1] = 0.0;
+            }
+        }
+    }
+    
+    /**
+     * Sets all crystal energies to zero, removes all clusters, and
+     * clears all highlighting associated with an individual crystal.
+     * This <b>does not</b> enable disabled crystals or remove general
+     * highlighting.
+     */
     public void clearCrystals() {
         for (int ix = 0; ix < xBoxes; ix++) {
             for (int iy = 0; iy < yBoxes; iy++) {
-                crystal[ix][iy].setState(0.0, false, null);
+                crystal[ix][iy].setEnergy(0.0);
+                crystal[ix][iy].setClusterCenter(false);
                 crystal[ix][iy].clearAssociations();
                 extremum[0] = Double.MAX_VALUE;
                 extremum[1] = 0.0;

Modified: java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/DataFileViewer.java
 =============================================================================
--- java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/DataFileViewer.java	(original)
+++ java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/DataFileViewer.java	Wed Nov  5 04:08:38 2014
@@ -97,6 +97,9 @@
         filterPanel.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
+            	// Suppress panel redrawing until the highlights are set.
+            	ecalPanel.setSuppressRedraw(true);
+            	
                 // Clear the panel highlighting.
                 ecalPanel.clearHighlight();
                 
@@ -111,6 +114,10 @@
                         ecalPanel.setCrystalHighlight(toPanelPoint(crystal), java.awt.Color.WHITE);
                     }
                 }
+                
+                // Redraw the highlights.
+                ecalPanel.setSuppressRedraw(false);
+                ecalPanel.repaint();
             }
         });
         

Modified: java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/FileViewer.java
 =============================================================================
--- java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/FileViewer.java	(original)
+++ java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/FileViewer.java	Wed Nov  5 04:08:38 2014
@@ -32,7 +32,7 @@
  * @author Kyle McCarty
  */
 public class FileViewer extends Viewer {
-    private static final long serialVersionUID = 17058336873349781L;
+    private static final long serialVersionUID = 3L;
     
     // Gets events from some file.
     protected EventManager em = null;

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use