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

HPS-SVN March 2015

Subject:

r2303 - in /java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger: AbstractTablePanel.java AbstractTriggerTablePanel.java ClusterTablePanel.java TriggerDiagnosticGUIDriver.java

From:

[log in to unmask]

Reply-To:

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

Date:

Fri, 6 Mar 2015 20:39:42 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (142 lines)

Author: [log in to unmask]
Date: Fri Mar  6 12:39:38 2015
New Revision: 2303

Log:
Fixed some rendering bugs in the trigger monitoring GUI panels.

Modified:
    java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTablePanel.java
    java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTriggerTablePanel.java
    java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/ClusterTablePanel.java
    java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/TriggerDiagnosticGUIDriver.java

Modified: java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTablePanel.java
 =============================================================================
--- java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTablePanel.java	(original)
+++ java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTablePanel.java	Fri Mar  6 12:39:38 2015
@@ -44,7 +44,7 @@
 	
 	/**
 	 * Instantiates an <code>AbstractTablePanel</code>.
-	 * @param args Arguments to be usd when generating the panel tables.
+	 * @param args Arguments to be used when generating the panel tables.
 	 */
 	public AbstractTablePanel(Object... args) {
 		// Initialize the tables.

Modified: java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTriggerTablePanel.java
 =============================================================================
--- java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTriggerTablePanel.java	(original)
+++ java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/AbstractTriggerTablePanel.java	Fri Mar  6 12:39:38 2015
@@ -81,9 +81,10 @@
 			int mostDigits = ComponentUtils.max(lstat.getReconTriggerCount(), lstat.getSSPBankTriggerCount(),
 					lstat.getSSPSimTriggerCount(), rstat.getReconTriggerCount(), rstat.getSSPBankTriggerCount(),
 					rstat.getSSPSimTriggerCount());
+			int spaces = ComponentUtils.getDigits(mostDigits);
 			
 			// Update the single-value counters.
-			String countFormat = "%" + mostDigits + "d";
+			String countFormat = "%" + spaces + "d";
 			setLocalRowValue(ROW_RECON_COUNT,     String.format(countFormat, lstat.getReconTriggerCount()));
 			setLocalRowValue(ROW_SSP_SIM_COUNT,   String.format(countFormat, lstat.getSSPSimTriggerCount()));
 			setLocalRowValue(ROW_SSP_BANK_COUNT,  String.format(countFormat, lstat.getSSPBankTriggerCount()));
@@ -92,7 +93,7 @@
 			setGlobalRowValue(ROW_SSP_BANK_COUNT, String.format(countFormat, rstat.getSSPBankTriggerCount()));
 			
 			// Update the percentage counters.
-			String percentFormat = "%" + mostDigits + "d / %" + mostDigits + "d (%7.3f)";
+			String percentFormat = "%" + spaces + "d / %" + spaces + "d (%7.3f)";
 			
 			setLocalRowValue(ROW_SSP_EFFICIENCY, String.format(percentFormat, lstat.getMatchedSSPTriggers(),
 					lstat.getSSPSimTriggerCount(), (100.0 * lstat.getMatchedSSPTriggers() / lstat.getSSPSimTriggerCount())));

Modified: java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/ClusterTablePanel.java
 =============================================================================
--- java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/ClusterTablePanel.java	(original)
+++ java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/ClusterTablePanel.java	Fri Mar  6 12:39:38 2015
@@ -66,6 +66,7 @@
 					lstat.getPositionFailures(), lstat.getEnergyFailures(), lstat.getHitCountFailures(),
 					rstat.getReconClusterCount(), rstat.getSSPClusterCount(), rstat.getMatches(),
 					rstat.getPositionFailures(), rstat.getEnergyFailures(), rstat.getHitCountFailures());
+			int spaces = ComponentUtils.getDigits(mostDigits);
 			
 			// Put the number of reconstructed and SSP clusters into
 			// the tables.
@@ -75,15 +76,20 @@
 					rstat.getReconClusterCount(),
 					rstat.getSSPClusterCount()
 			};
-			String countFormat = "%" + mostDigits + "d";
+			String countFormat = "%" + spaces + "d";
 			setLocalRowValue(ROW_RECON_COUNT,  String.format(countFormat, clusterValue[0]));
 			setLocalRowValue(ROW_SSP_COUNT,    String.format(countFormat, clusterValue[1]));
 			setGlobalRowValue(ROW_RECON_COUNT, String.format(countFormat, clusterValue[2]));
 			setGlobalRowValue(ROW_SSP_COUNT,   String.format(countFormat, clusterValue[3]));
 			
+			
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_RECON_COUNT, 1, String.format(countFormat, clusterValue[0]));
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_SSP_COUNT,   1, String.format(countFormat, clusterValue[1]));
+			
+			
 			// Output the tracked statistical data.
 			int total;
-			String percentFormat = "%" + mostDigits + "d / %" + mostDigits + "d (%7.3f)";
+			String percentFormat = "%" + spaces + "d / %" + spaces + "d (%7.3f)";
 			int[] statValue = {
 					lstat.getMatches(),
 					lstat.getPositionFailures(),
@@ -106,6 +112,12 @@
 			setGlobalRowValue(ROW_FAILED_POSITION,  String.format(percentFormat, statValue[5], total, 100.0 * statValue[5] / total));
 			setGlobalRowValue(ROW_FAILED_ENERGY,    String.format(percentFormat, statValue[6], total, 100.0 * statValue[6] / total));
 			setGlobalRowValue(ROW_FAILED_HIT_COUNT, String.format(percentFormat, statValue[7], total, 100.0 * statValue[7] / total));
+			
+			
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_MATCHED,          1, String.format(percentFormat, statValue[0], total, 100.0 * statValue[0] / total));
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_FAILED_POSITION,  1, String.format(percentFormat, statValue[1], total, 100.0 * statValue[1] / total));
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_FAILED_ENERGY,    1, String.format(percentFormat, statValue[2], total, 100.0 * statValue[2] / total));
+			System.out.printf("(row = %d, col = %d) --> %s%n", ROW_FAILED_HIT_COUNT, 1, String.format(percentFormat, statValue[3], total, 100.0 * statValue[3] / total));
 		}
 	}
 }

Modified: java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/TriggerDiagnosticGUIDriver.java
 =============================================================================
--- java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/TriggerDiagnosticGUIDriver.java	(original)
+++ java/trunk/monitoring-util/src/main/java/org/hps/monitoring/trigger/TriggerDiagnosticGUIDriver.java	Fri Mar  6 12:39:38 2015
@@ -11,14 +11,20 @@
 public class TriggerDiagnosticGUIDriver extends Driver {
 	private JFrame window = new JFrame();
 	private ClusterTablePanel clusterTable = new ClusterTablePanel();
+	private SinglesTablePanel singlesTable = new SinglesTablePanel();
+	private PairTablePanel pairTable = new PairTablePanel();
+	private EfficiencyTablePanel efficiencyTable = new EfficiencyTablePanel();
 	private String diagnosticCollectionName = "DiagnosticSnapshot";
 	
 	@Override
 	public void startOfData() {
-		window.add(clusterTable);
-		window.setVisible(true);
 		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 		window.setSize(500, 400);
+		//window.add(clusterTable);
+		//window.add(singlesTable);
+		//window.add(pairTable);
+		window.add(efficiencyTable);
+		window.setVisible(true);
 	}
 	
 	@Override
@@ -33,7 +39,10 @@
 			DiagSnapshot snapshot = snapshotList.get(0);
 			
 			// Feed it to the table.
-			clusterTable.updatePanel(snapshot);
+			//clusterTable.updatePanel(snapshot);
+			singlesTable.updatePanel(snapshot);
+			pairTable.updatePanel(snapshot);
+			efficiencyTable.updatePanel(snapshot);
 		}
 	}
 	

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