Skip to content

Commit 5fc6715

Browse files
committed
fix oops
1 parent b5cbe3b commit 5fc6715

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

common-tools/clas-detector/src/main/java/org/jlab/detector/serial/SerialHoncho.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void process(Event event) {
8383
processEventUnix(event, cfg);
8484
if (evt.getRows() > 0) {
8585
event.remove(evt.getSchema());
86-
//processHelicity(event, cfg, evt);
86+
processHelicity(event, cfg, evt);
8787
processScalers(cfg, evt);
8888
event.write(evt);
8989
}
@@ -118,6 +118,10 @@ public void clear() {
118118
helicitySequence = null;
119119
}
120120

121+
public TreeSet<HelicityState> getHelicities() {
122+
return helicities;
123+
}
124+
121125
public DaqScalersSequence getScalers() {
122126
return scalers;
123127
}
@@ -130,10 +134,6 @@ public SchemaFactory getSchemaFactory() {
130134
return schema;
131135
}
132136

133-
public TreeSet<HelicityState> getHelicities() {
134-
return helicities;
135-
}
136-
137137
public void updateHelicitySequence() {
138138
helicitySequence = new HelicitySequenceDelayed(
139139
conman.getConstants(run, "/runcontrol/helicity").getIntValue("delay",0,0,0));

common-tools/clas-reco/src/main/java/org/jlab/clas/reco/ReconMutil.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545
final class ReconMutil {
4646

47-
boolean DEBUG = true;
47+
boolean DEBUG = false;
4848

4949
// Performance parameters:
5050
final int BENCH_SECONDS = 30;
@@ -190,7 +190,11 @@ void decode(int thread) {
190190
while (true) {
191191
List<Object> input = decoQueue.poll();
192192
if (input == null) {
193-
if (decoQueue.isEmpty() && readerThread.isDone() && decoQueue.isEmpty()) break;
193+
if (decoQueue.isEmpty() && readerThread.isDone() && decoQueue.isEmpty()) {
194+
if (thread == 0) serial.updateHelicitySequence();
195+
System.err.println("recon-mutil:: Helicity sequence updated");
196+
break;
197+
}
194198
sleep(100);
195199
}
196200
else {
@@ -224,7 +228,7 @@ void process(int thread) {
224228
continue;
225229
}
226230
if (procQueue.isEmpty() && decoThreads.isEmpty() && procQueue.isEmpty()) {
227-
if (writeEvents+skipEvents+failEvents >= readEvents) break;
231+
if (writeEvents+skipEvents+failEvents >= readEvents+taggedEvents.get()) break;
228232
sleep(100);
229233
}
230234
List<HipoDataEvent> input = procQueue.poll();
@@ -246,7 +250,6 @@ void process(int thread) {
246250
Event e = input.get(i).getHipoEvent();
247251
Benchmark.getInstance().resume("post");
248252
serial.process(e);
249-
serial.process(e);
250253
Benchmark.getInstance().pause("post");
251254
output.add(e);
252255
}

0 commit comments

Comments
 (0)