diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/DaqScaler.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/DaqScaler.java index 8ae107969c..22a8e18f9c 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/DaqScaler.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/DaqScaler.java @@ -74,6 +74,12 @@ public void add(DaqScaler other) { protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double seconds,double liveSeconds) { if (this.clock > 0) { + + String prefix = String.format("clocktest [%s]", this.getClass().getSimpleName()); + System.out.println(String.format("%s: -----------", prefix)); + System.out.println(String.format("%s: toString: %s", prefix, this.toString())); + System.out.println(String.format("%s: seconds=%f liveSeconds=%f", prefix, seconds, liveSeconds)); + final double fcup_slope = fcupTable.getDoubleValue("slope",0,0,0); // Hz/nA final double fcup_offset = fcupTable.getDoubleValue("offset",0,0,0); // Hz final double fcup_atten = fcupTable.getDoubleValue("atten",0,0,0); // attenuation @@ -97,6 +103,10 @@ protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double sec this.beamCharge = q * fcup_atten / fcup_slope; this.beamChargeGated = qg * fcup_atten / fcup_slope; } + + System.out.println(String.format("%s: BANK fcup=%d fcupGated=%d", prefix, this.fcup, this.gatedFcup)); + System.out.println(String.format("%s: CCDB fcup_offset=%f fcup_slope=%f fcup_atten=%f", prefix, fcup_offset, fcup_slope, fcup_atten)); + System.out.println(String.format("%s: clockFreq=%f beamCharge=%f beamChargeGated=%f", prefix, this.clockFreq, this.beamCharge, this.beamChargeGated)); } } diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/Dsc2Scaler.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/Dsc2Scaler.java index 5f48d43421..dd947e0988 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/Dsc2Scaler.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/Dsc2Scaler.java @@ -38,7 +38,7 @@ public Dsc2Scaler() {} * @param seconds dwell time, provided in case the clock rolls over */ public Dsc2Scaler(Bank bank, IndexedTable fcupTable, IndexedTable slmTable, double seconds) { - this.clockFreq=1e6; + this.clockFreq=1e6; // FIXME: this is what's actually used this.read(bank); this.calibrate(fcupTable,slmTable,seconds); } @@ -110,4 +110,4 @@ public final void read(Bank bank) { } } -} \ No newline at end of file +}