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

HPS-SVN July 2015

Subject:

r3301 - /java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalerUtilities.java

From:

[log in to unmask]

Reply-To:

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

Date:

Thu, 30 Jul 2015 00:37:20 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (73 lines)

Author: [log in to unmask]
Date: Wed Jul 29 17:37:19 2015
New Revision: 3301

Log:
Use ScalerDataIndex class and give variables better names.

Modified:
    java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalerUtilities.java

Modified: java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalerUtilities.java
 =============================================================================
--- java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalerUtilities.java	(original)
+++ java/trunk/record-util/src/main/java/org/hps/record/scalers/ScalerUtilities.java	Wed Jul 29 17:37:19 2015
@@ -21,7 +21,7 @@
     /**
      * Get a specific live time measurement by index.
      *
-     * @param index The enum of the index type.
+     * @param index the enum of the index type
      * @see LiveTimeIndex
      */
     public static double getLiveTime(final ScalerData data, final LiveTimeIndex index) {
@@ -42,37 +42,37 @@
      * This method assumes the standard scaler data structure as outlined in <a
      * href="https://jira.slac.stanford.edu/browse/HPSJAVA-470">HPSJAVA-470</a>.
      *
-     * @param data The scaler data.
-     * @return The live time measurements.
+     * @param data the scaler data
+     * @return the live time measurements
      */
     public static double[] getLiveTimes(final ScalerData data) {
 
         // [03] - gated faraday cup with "TDC" threshold
-        final int word03 = data.getValue(3);
+        final int fcupTdcGated = data.getValue(ScalerDataIndex.FCUP_TDC_GATED);
 
         // [19] - gated faraday cup with "TRG" threshold
-        final int word19 = data.getValue(19);
+        final int fcupTrgGated = data.getValue(ScalerDataIndex.FCUP_TRG_GATED);
 
         // [35] - ungated faraday cup with "TDC" threshold
-        final int word35 = data.getValue(35);
+        final int fcupTdcUngated = data.getValue(ScalerDataIndex.FCUP_TDC_UNGATED);
 
         // [51] - ungated faraday cup with "TRG" threshold
-        final int word51 = data.getValue(51);
+        final int fcupTrgUndated = data.getValue(ScalerDataIndex.FCUP_TRG_UNGATED);
 
         // [67] - gated clock
-        final int word67 = data.getValue(67);
+        final int clockGated = data.getValue(ScalerDataIndex.CLOCK_GATED);
 
         // [68] - ungated clock
-        final int word68 = data.getValue(68);
+        final int clockUngated = data.getValue(ScalerDataIndex.CLOCK_UNGATED);
 
         // [03]/[35] = FCUP TDC
-        final double fcupTdc = (double) word03 / (double) word35;
+        final double fcupTdc = (double) fcupTdcGated / (double) fcupTdcUngated;
 
         // [19]/[51] = FCUP TRG
-        final double fcupTrg = (double) word19 / (double) word51;
+        final double fcupTrg = (double) fcupTrgGated / (double) fcupTrgUndated;
 
         // [67]/[68] = CLOCK
-        final double clock = (double) word67 / (double) word68;
+        final double clock = (double) clockGated / (double) clockUngated;
 
         // Compute the live times.
         final double[] liveTimes = new double[3];

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