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  October 2014

HPS-SVN October 2014

Subject:

r1310 - /java/branches/hps_java_trunk_HPSJAVA-255/conditions/src/main/java/org/hps/conditions/svt/AbstractSvtConditions.java

From:

[log in to unmask]

Reply-To:

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

Date:

Mon, 27 Oct 2014 18:26:07 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (108 lines)

Author: omoreno
Date: Mon Oct 27 11:26:05 2014
New Revision: 1310

Log:
Add abstract generic methods for obtaining the SVT DAQ map and the SVT channel map. 

Modified:
    java/branches/hps_java_trunk_HPSJAVA-255/conditions/src/main/java/org/hps/conditions/svt/AbstractSvtConditions.java

Modified: java/branches/hps_java_trunk_HPSJAVA-255/conditions/src/main/java/org/hps/conditions/svt/AbstractSvtConditions.java
 =============================================================================
--- java/branches/hps_java_trunk_HPSJAVA-255/conditions/src/main/java/org/hps/conditions/svt/AbstractSvtConditions.java	(original)
+++ java/branches/hps_java_trunk_HPSJAVA-255/conditions/src/main/java/org/hps/conditions/svt/AbstractSvtConditions.java	Mon Oct 27 11:26:05 2014
@@ -3,6 +3,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.hps.conditions.svt.AbstractSvtChannel.AbstractSvtChannelCollection;
+import org.hps.conditions.svt.AbstractSvtDaqMapping.AbstractSvtDaqMappingCollection;
 import org.hps.conditions.svt.SvtChannel.SvtChannelCollection;
 import org.hps.conditions.svt.SvtT0Shift.SvtT0ShiftCollection;
 
@@ -12,29 +14,35 @@
  * 
  * @author Omar Moreno <[log in to unmask]>
  *
- * @param <T>  SVT conditions object type
  */
-public class AbstractSvtConditions {
+public abstract class AbstractSvtConditions {
 
-    protected Map<SvtChannel, ChannelConstants> channelData = new HashMap<SvtChannel, ChannelConstants>();
-    protected SvtChannelCollection channelMap = null;
+    protected Map<AbstractSvtChannel, ChannelConstants> channelData 
+        = new HashMap<AbstractSvtChannel, ChannelConstants>(); 
     protected SvtT0ShiftCollection t0Shifts = null;
+    protected AbstractSvtChannel.AbstractSvtChannelCollection<? extends AbstractSvtChannel> channelMap = null;
 
-    public AbstractSvtConditions() {}
+    
+    /**
+     * Get the DAQ map associated with these conditions.
+     * 
+     * @return The SVT DAQ map.
+     */
+    public abstract AbstractSvtDaqMappingCollection<? extends AbstractSvtDaqMapping> getDaqMap(); 
     
     /**
      * Get the conditions constants for a specific channel. These will be created if they
      * do not exist for the given channel, BUT only channels in the current channel map
      * are allowed as an argument.
      * 
-     * @param channel The SVT channel.
-     * @return The conditions constants for the channel.
+     * @param channel The SVT channel of interest
+     * @return The conditions constants for the given channel
      * @throws IllegalArgumentException if .
      */
-    public ChannelConstants getChannelConstants(SvtChannel channel) {
+    public ChannelConstants getChannelConstants(AbstractSvtChannel channel) {
         // This channel must come from the map.
         if (!channelMap.getObjects().contains(channel)) {
-            System.err.println("Channel not found in map => " + channel);
+            System.err.println("[ " + this.getClass().getSimpleName() + " ]: Channel not found in map => " + channel);
             throw new IllegalArgumentException("Channel was not found in map.");
         }
         // If channel has no data yet, then add it.
@@ -48,9 +56,7 @@
      * 
      * @return The SVT channel map.
      */
-    public SvtChannelCollection getChannelMap() {
-        return channelMap;
-    }
+    public abstract AbstractSvtChannelCollection<? extends AbstractSvtChannel> getChannelMap();
     
     /**
      * Get the {@link SvtT0ShiftCollection}.
@@ -59,23 +65,15 @@
      */
     public SvtT0ShiftCollection getT0Shifts() {
         return t0Shifts;
+    
     }
-
+   
     /**
-     * Set the channel map of type {@link SvtChannelCollection}.
-     * 
-     *  @param channelMap The SVT channel map.
-     */
-    public void setChannelMap(SvtChannelCollection channelMap){
-    	this.channelMap = channelMap;
-    }
-
-    /**
-     * Set the sensor t0 shifts.
+     * Set the sensor t0 shifts of type {@link SvtT0ShiftCollection}
      * 
      * @param t0Shifts The sensor time shifts collection.
      */
-    public void setTimeShifts(SvtT0ShiftCollection t0Shifts) {
+    public void setT0Shifts(SvtT0ShiftCollection t0Shifts) {
         this.t0Shifts = t0Shifts;
     }
 }

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