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

HPS-SVN April 2015

Subject:

r2769 - /java/trunk/conditions/src/main/java/org/hps/conditions/svt/SvtShapeFitParameters.java

From:

[log in to unmask]

Reply-To:

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

Date:

Tue, 21 Apr 2015 21:07:45 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (111 lines)

Author: [log in to unmask]
Date: Tue Apr 21 14:07:39 2015
New Revision: 2769

Log:
Add tp2 parameter to SVT shape fit class.  HPSJAVA-495

Modified:
    java/trunk/conditions/src/main/java/org/hps/conditions/svt/SvtShapeFitParameters.java

Modified: java/trunk/conditions/src/main/java/org/hps/conditions/svt/SvtShapeFitParameters.java
 =============================================================================
--- java/trunk/conditions/src/main/java/org/hps/conditions/svt/SvtShapeFitParameters.java	(original)
+++ java/trunk/conditions/src/main/java/org/hps/conditions/svt/SvtShapeFitParameters.java	Tue Apr 21 14:07:39 2015
@@ -13,7 +13,7 @@
  * @author <a href="mailto:[log in to unmask]">Jeremy McCormick</a>
  * @author <a href="mailto:[log in to unmask]">Omar Moreno</a>
  */
-@Table(names = { "svt_shape_fit_parameters", "test_run_svt_shape_fit_parameters" })
+@Table(names = {"svt_shape_fit_parameters", "test_run_svt_shape_fit_parameters"})
 @Converter(multipleCollectionsAction = MultipleCollectionsAction.LAST_CREATED)
 // TODO: This class needs better documentation as to what these parameters actually mean.
 public final class SvtShapeFitParameters extends BaseConditionsObject {
@@ -26,23 +26,28 @@
     }
 
     /**
+     * Size of array when retrieving all parameters together using {@link #toArray()}.
+     */
+    private static final int ARRAY_SIZE = 4;
+
+    /**
+     * Get the amplitude.
+     *
+     * @return The amplitude.
+     */
+    @Field(names = {"amplitude"})
+    public double getAmplitude() {
+        return getFieldValue(Double.class, "amplitude");
+    }
+
+    /**
      * Get the SVT channel ID.
      *
      * @return The SVT channel ID.
      */
-    @Field(names = { "svt_channel_id" })
+    @Field(names = {"svt_channel_id"})
     public int getChannelID() {
         return getFieldValue(Integer.class, "svt_channel_id");
-    }
-
-    /**
-     * Get the amplitude.
-     *
-     * @return The amplifude.
-     */
-    @Field(names = { "amplitude" })
-    public double getAmplitude() {
-        return getFieldValue(Double.class, "amplitude");
     }
 
     /**
@@ -50,19 +55,29 @@
      *
      * @return t0
      */
-    @Field(names = { "t0" })
+    @Field(names = {"t0"})
     public double getT0() {
         return getFieldValue(Double.class, "t0");
     }
 
     /**
-     * Get tp.
+     * Get shaping time parameter.
      *
-     * @return tp
+     * @return the shaping time parameter
      */
-    @Field(names = { "tp" })
+    @Field(names = {"tp"})
     public double getTp() {
         return getFieldValue(Double.class, "tp");
+    }
+
+    /**
+     * Get the second shaping time parameter.
+     *
+     * @return the second shaping time parameter
+     */
+    @Field(names = {"tp2"})
+    public double getTp2() {
+        return getFieldValue(Double.class, "tp2");
     }
 
     /**
@@ -71,10 +86,11 @@
      * @return This object converted to an array of doubles.
      */
     public double[] toArray() {
-        final double[] values = new double[3];
+        final double[] values = new double[ARRAY_SIZE];
         values[0] = getAmplitude();
         values[1] = getT0();
         values[2] = getTp();
+        values[3] = getTp2();
         return values;
     }
 }

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