Skip to content

Commit a8038b5

Browse files
committed
test: change the clock freq
1 parent 28dfd97 commit a8038b5

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/DaqScaler.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double sec
8181
final double slm_offset = slmTable.getDoubleValue("offset",0,0,0); // Hz
8282
final double slm_atten = slmTable.getDoubleValue("atten",0,0,0); // attenuation
8383

84+
// increase clock frequency by this factor
85+
// double clockFreqFactor = 10.0;
86+
// seconds /= clockFreqFactor;
87+
// liveSeconds /= clockFreqFactor;
88+
89+
// String prefix = String.format("TICK [%s]", this.getClass().getSimpleName());
90+
// System.out.println(String.format("%s freq(orig)=%f seconds=%f liveSeconds=%f ", prefix, this.clockFreq, seconds, liveSeconds) + this.toString());
91+
8492
double q = (double)this.slm - slm_offset * seconds;
8593
double qg = (double)this.gatedSlm - slm_offset * liveSeconds;
8694
this.beamChargeSLM = q * slm_atten / slm_slope;
@@ -90,13 +98,17 @@ protected void calibrate(IndexedTable fcupTable,IndexedTable slmTable,double sec
9098
if (fcup_atten<1e-8 || fcup_slope<1e-8) {
9199
this.beamCharge = this.beamChargeSLM;
92100
this.beamChargeGated = this.beamChargeGatedSLM;
101+
// System.out.println(String.format("%s [slm]: %f %f", prefix, this.beamChargeGated, this.beamCharge));
93102
}
94103
else {
95104
q = (double)this.fcup - fcup_offset * seconds;
96105
qg = (double)this.gatedFcup - fcup_offset * liveSeconds;
97106
this.beamCharge = q * fcup_atten / fcup_slope;
98107
this.beamChargeGated = qg * fcup_atten / fcup_slope;
108+
// System.out.println(String.format("%s [fcup]: %f %f", prefix, this.beamChargeGated, this.beamCharge));
99109
}
110+
// if(this.getClass().getSimpleName().equals("Dsc2Scaler"))
111+
// System.out.println(String.format("%s %f %f %s", prefix, this.beamChargeGated, this.beamCharge, this.toString()));
100112
}
101113
}
102114

common-tools/clas-detector/src/main/java/org/jlab/detector/scalers/StruckScaler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public Interval getInterval() {
5353

5454
@Override
5555
public String toString() {
56-
return String.format("i=%s h=%d q=%d %s",this.interval,this.helicity.value(),this.quartet.value(),super.toString());
56+
return String.format("[STRUCK] i=%s h=%d q=%d %s",this.interval,this.helicity.value(),this.quartet.value(),super.toString());
5757
}
5858

5959
/**
@@ -239,4 +239,4 @@ else if (Input.equals(Input.CLOCK, chan)) {
239239

240240
this.calibrate(fcupTable,slmTable);
241241
}
242-
}
242+
}

0 commit comments

Comments
 (0)