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  September 2015

HPS-SVN September 2015

Subject:

r3602 - /java/trunk/ecal-event-display/src/main/java/org/hps/monitoring/ecal/eventdisplay/ui/FileViewer.java

From:

[log in to unmask]

Reply-To:

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

Date:

Tue, 15 Sep 2015 18:02:04 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (82 lines)

Author: [log in to unmask]
Date: Tue Sep 15 11:02:02 2015
New Revision: 3602

Log:
Updated stand-alone event display to show hit time-stamps.

Modified:
    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/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	Tue Sep 15 11:02:02 2015
@@ -42,16 +42,18 @@
     
     // Map cluster location to a cluster object.
     private HashMap<Point, Cluster> clusterMap = new HashMap<Point, Cluster>();
+    private HashMap<Point, Double> crystalTimeMap = new HashMap<Point, Double>();
     
     // Additional status display field names for this data type.
-    private static final String[] fieldNames = { "Event Number", "Shared Hits", "Component Hits", "Cluster Energy", "Cluster Time" };
+    private static final String[] fieldNames = { "Event Number", "Shared Hits", "Component Hits", "Hit Time", "Cluster Energy", "Cluster Time" };
     
     // Indices for the field values.
     private static final int EVENT_NUMBER   = 0;
     private static final int SHARED_HITS    = 1;
     private static final int COMPONENT_HITS = 2;
-    private static final int CLUSTER_ENERGY = 3;
-    private static final int CLUSTER_TIME   = 4;
+    private static final int HIT_TIME       = 3;
+    private static final int CLUSTER_ENERGY = 4;
+    private static final int CLUSTER_TIME   = 5;
     
     /**
      * Constructs a new <code>Viewer</code> for displaying data read
@@ -159,18 +161,26 @@
                     DecimalFormat formatter = new DecimalFormat("0.####E0");
                     energy = formatter.format(activeCluster.getClusterEnergy());
                 }
-                else { energy = "---"; }
+                else { energy = ResizableFieldPanel.NULL_VALUE; }
                 setStatusField(fieldNames[CLUSTER_ENERGY], energy);
                 
                 // Format the cluster time, or account for it if it
                 // doesn't exist.
                 String time;
                 if(activeCluster.getClusterTime() != Double.NaN) {
-                    DecimalFormat formatter = new DecimalFormat("0.####E0");
-                    time = formatter.format(activeCluster.getClusterEnergy());
-                }
-                else { time = "---"; }
+                    time = Double.toString(activeCluster.getClusterTime());
+                }
+                else { time = ResizableFieldPanel.NULL_VALUE; }
                 setStatusField(fieldNames[CLUSTER_TIME], time);
+            }
+            
+            // If there is a hit time associated with this point, it should
+            // be displayed.
+            Double hitTime = crystalTimeMap.get(crystal);
+            if(hitTime != null) {
+            	setStatusField(fieldNames[HIT_TIME], Double.toString(hitTime));
+            } else {
+            	setStatusField(fieldNames[HIT_TIME], ResizableFieldPanel.NULL_VALUE);
             }
         }
         // Otherwise, clear the field values.
@@ -243,6 +253,12 @@
         // Load the cluster map.
         clusterMap.clear();
         for(Cluster c : em.getClusters()) { clusterMap.put(toPanelPoint(c.getClusterCenter()), c); }
+        
+        // Load hit time map.
+        crystalTimeMap.clear();
+        for(EcalHit hit : em.getHits()) {
+        	crystalTimeMap.put(new Point(toPanelX(hit.getX()), toPanelY(hit.getY())), hit.getTime());
+        }
         
         // Display it.
         displayEvent(em.getHits(), em.getClusters());

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