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:

r2443 - /java/trunk/conditions/src/main/java/org/hps/conditions/svt/DaqMapHandler.java

From:

[log in to unmask]

Reply-To:

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

Date:

Sat, 14 Mar 2015 18:59:44 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (95 lines)

Author: [log in to unmask]
Date: Sat Mar 14 11:59:39 2015
New Revision: 2443

Log:
Create a set of SvtChannel's every time a new DAQ map processed and load them to the conditions database.  This assures that SvtChannel sets are created only for FEB/Hybrid pairs that are being used.

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

Modified: java/trunk/conditions/src/main/java/org/hps/conditions/svt/DaqMapHandler.java
 =============================================================================
--- java/trunk/conditions/src/main/java/org/hps/conditions/svt/DaqMapHandler.java	(original)
+++ java/trunk/conditions/src/main/java/org/hps/conditions/svt/DaqMapHandler.java	Sat Mar 14 11:59:39 2015
@@ -4,6 +4,7 @@
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 
+import org.hps.conditions.svt.SvtChannel.SvtChannelCollection;
 import org.hps.conditions.svt.SvtDaqMapping.SvtDaqMappingCollection;
 
 /**
@@ -15,11 +16,20 @@
     
     // Collection of DAQ map objects
     private SvtDaqMappingCollection daqMap = new SvtDaqMappingCollection();
+    
+    // Collection of SVT channel objects
+    private SvtChannelCollection svtChannels = new SvtChannelCollection(); 
  
     // An SVT DAQ map object 
     private SvtDaqMapping daqMapping = null;
+   
+    // Text node inside of an XML element
+    String content;
     
-    String content;
+    // Current SVT channel ID.  This gets incremented every time an SvtChannel
+    // gets added to the map.
+    int currentSvtChannelID = 0; 
+    
     
     // FEB ID (0-9)
     int febID = 0;
@@ -71,6 +81,7 @@
         switch (qName) {
             case "Hybrid":
                 daqMap.add(daqMapping);
+                this.addSvtChannels(febID, hybridID);
                 break; 
             case "Half":
                 daqMapping.setSvtHalf(content);
@@ -101,14 +112,39 @@
        content = String.copyValueOf(ch, start, length).trim();
    }
    
+   /**
+    *   Add a set of {@link SvtChannel}s to the {@link SvtChannelCollection} 
+    *   for each of the hybrids.  A total of 639 channels are added per hybrid.
+    *   
+    *   @param febID : The Front End Board (FEB) ID 
+    *   @param febHybridID : The FEB hybrid ID
+    *   
+    */
+   public void addSvtChannels(int febID, int febHybridID) { 
+       for (int channel = 0; channel < 640; channel++) { 
+           this.svtChannels.add(new SvtChannel(
+                   this.currentSvtChannelID, this.febID, this.hybridID, channel));
+           this.currentSvtChannelID++;
+       }
+   }
+   
     /**
-     *  Get the collection of {@link SvtDaqMappingCollection}s built from 
-     *  parsing the XML input file.
+     *  Get the {@link SvtDaqMappingCollection} built from parsing the XML 
+     *  input file.
      *  
      *   @return The collection of {@link SvtDaqMappingCollection}s
      */
     public SvtDaqMappingCollection getDaqMap() { 
         return daqMap;
     }
+    
+    /**
+     *  Get the {@link SvtChannelCollection} build from parsing the XML input
+     *  file.
+     * 
+     */
+    public SvtChannelCollection getSvtChannels() { 
+        return svtChannels; 
+    }
 
 }

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