Author: [log in to unmask]
Date: Thu Mar 19 11:24:28 2015
New Revision: 2493
Log:
Updated the the RawConverterDriver to support the shorter SSP deadtime when using the DAQ configuration and mode 1 data. This more accurately simulates the hardware. ALso added documentation to the associated driver for the 'useDAQConfig' parameter.
Modified:
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverter.java Thu Mar 19 11:24:28 2015
@@ -122,7 +122,13 @@
NSB = config.getNSB();
NSA = config.getNSA();
windowSamples = config.getWindowWidth() / 4;
- nPeak = config.getMaxPulses();
+
+ // Get the number of peaks.
+ if(config.getMode() == 1) {
+ nPeak = Integer.MAX_VALUE;
+ } else {
+ nPeak = config.getMaxPulses();
+ }
// Print the FADC configuration.
System.out.println();
@@ -403,7 +409,11 @@
thresholdCrossings.add(ii);
// search for next threshold crossing begins at end of this pulse:
- ii += NSA/nsPerSample-1;
+ if(useDAQConfig && ConfigurationManager.getInstance().getFADCConfig().getMode() == 1) {
+ ii += 8;
+ } else {
+ ii += NSA/nsPerSample - 1;
+ }
// firmware limit on # of peaks:
if (thresholdCrossings.size() >= nPeak) break;
Modified: java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java
=============================================================================
--- java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java (original)
+++ java/trunk/ecal-recon/src/main/java/org/hps/recon/ecal/EcalRawConverterDriver.java Thu Mar 19 11:24:28 2015
@@ -134,6 +134,22 @@
this.useTruthTime = useTruthTime;
}
+ /**
+ * Sets whether the driver should use the DAQ configuration from
+ * EvIO file for its parameters. If activated, the converter will
+ * obtain gains, thresholds, pedestals, the window size, and the
+ * pulse integration window from the EvIO file. This will replace
+ * and overwrite any manually defined settings.<br/>
+ * <br/>
+ * Note that if this setting is active, the driver will not output
+ * any data until a DAQ configuration has been read from the data
+ * stream.
+ * @param state - <code>true</code> indicates that the configuration
+ * should be read from the DAQ data in an EvIO file. Setting this
+ * to <code>false</code> will cause the driver to use its regular
+ * manually-defined settings and pull gains and pedestals from the
+ * conditions database.
+ */
public void setUseDAQConfig(boolean state) {
useDAQConfig = state;
converter.setUseDAQConfig(state);
|