Skip to content

Commit 17750fa

Browse files
committed
bugfix
1 parent e8cf46a commit 17750fa

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

common-tools/clas-detector/src/main/java/org/jlab/detector/decode/DetectorEventDecoder.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.util.HashSet;
88
import java.util.List;
99
import java.util.Map;
10+
import java.util.stream.Collectors;
1011
import org.jlab.detector.banks.RawBank.OrderType;
1112
import org.jlab.detector.base.DetectorType;
1213
import org.jlab.detector.calib.utils.ConstantsManager;
@@ -131,17 +132,17 @@ public final void initDecoder(){
131132
keysMicromega.add(DetectorType.FMT);
132133
keysMicromega.add(DetectorType.FTTRK);
133134

134-
translationManager.init((List)translations.values());
135+
translationManager.init(translations.values().stream().collect(Collectors.toList()));
135136

136-
fitterManager.init((List)fitters.values());
137+
fitterManager.init(fitters.values().stream().collect(Collectors.toList()));
137138

138139
scalerManager.init(Arrays.asList(new String[]{"/runcontrol/fcup","/runcontrol/slm","/runcontrol/hwp",
139140
"/runcontrol/helicity","/daq/config/scalers/dsc1"}));
140141
checkTables();
141142
}
142143

143144
public void checkTables() {
144-
List<String> tables = (List)translations.values();
145+
List<String> tables = (List)translations.values().stream().collect(Collectors.toList());
145146
for (int i=0; i<tables.size(); i++) {
146147
IndexedTable t = translationManager.getConstants(runNumber, tables.get(i));
147148
for (int j=0; j<i; j++)
@@ -179,8 +180,8 @@ public void fitPulses(List<DetectorDataDgtz> detectorData) {
179180

180181
// preload CCDB tables once:
181182
HashMap<DetectorType, IndexedTable> tables = new HashMap<>();
182-
for (DetectorType t : translations.keySet()) {
183-
tables.put(t, fitterManager.getConstants(runNumber, translations.get(t)));
183+
for (DetectorType t : fitters.keySet()) {
184+
tables.put(t, fitterManager.getConstants(runNumber, fitters.get(t)));
184185
}
185186

186187
final long hash0 = IndexedTable.DEFAULT_GENERATOR.hashCode(0,0,0);
@@ -193,7 +194,7 @@ public void fitPulses(List<DetectorDataDgtz> detectorData) {
193194
int channel = data.getDescriptor().getChannel();
194195
DetectorType type = data.getDescriptor().getType();
195196

196-
if (!translations.containsKey(type)) continue;
197+
if (!fitters.containsKey(type)) continue;
197198

198199
IndexedTable daqTable = tables.get(type);
199200

0 commit comments

Comments
 (0)