Print

Print


Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25 on MAIN
SvtReadout.java+20-21.5 -> 1.6
Store the number of SVT Triggers; Allow for a pedestal run to be taken

hps-java/src/main/java/org/lcsim/hps/recon/tracking/apv25
SvtReadout.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- SvtReadout.java	17 Aug 2012 01:17:08 -0000	1.5
+++ SvtReadout.java	6 Sep 2012 09:30:03 -0000	1.6
@@ -37,7 +37,7 @@
 /**
  * 
  * @author Omar Moreno <[log in to unmask]>
- * @version $Id: SvtReadout.java,v 1.5 2012/08/17 01:17:08 omoreno Exp $
+ * @version $Id: SvtReadout.java,v 1.6 2012/09/06 09:30:03 omoreno Exp $
  */
 public class SvtReadout extends Driver {
 
@@ -54,6 +54,9 @@
     
     boolean debug = false;
     boolean timingIn = false;
+    boolean pedestalRun = false;
+    
+    static private int nTriggers = 0;
     
     public SvtReadout(){
     	// Load the driver which transfers SimTrackerHits to their 
@@ -79,6 +82,20 @@
     /**
      * 
      */
+    public void setPedestalRun(boolean pedestalRun){
+    	this.pedestalRun = pedestalRun;
+    }
+    
+    /**
+     * 
+     */
+    static public int getNumberOfTriggers(){
+    	return nTriggers;
+    }
+    
+    /**
+     * 
+     */
     @Override
     public void detectorChanged(Detector detector){
         super.detectorChanged(detector);
@@ -120,6 +137,7 @@
         // samples
         if(Apv25Full.readoutBit){
             
+        	nTriggers++;
             Apv25Full.readoutBit = false;
 
             if(debug) System.out.println(this.getClass().getSimpleName() + ": APVs have been triggered!");
@@ -199,7 +217,7 @@
                     SiElectrodeData electrodeData = electrodeDataCol.get(physicalChannel);
                     
                     // Get the charge in units of electrons
-                    double charge = electrodeData.getCharge();
+                    double charge = pedestalRun ? 0 : electrodeData.getCharge();
                     
                     if(debug){
                         if(charge > 0) System.out.println(this.getClass().getSimpleName() + ": Injecting charge " + charge + " into channel " + physicalChannel);
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1