@@ -136,7 +136,7 @@ public void translate(List<DetectorDataDgtz> detectorData){
136
136
tables .add (translationManager .getConstants (runNumber , name ));
137
137
}
138
138
139
- for (DetectorDataDgtz data : detectorData ){
139
+ for (DetectorDataDgtz data : detectorData ) {
140
140
141
141
int crate = data .getDescriptor ().getCrate ();
142
142
int slot = data .getDescriptor ().getSlot ();
@@ -145,26 +145,24 @@ public void translate(List<DetectorDataDgtz> detectorData){
145
145
146
146
for (int j =0 ; j <tablesTrans .size (); ++j ) {
147
147
148
- IndexedTable table = tables .get (j );
148
+ IndexedTable t = tables .get (j );
149
+
150
+ if (t .hasEntryByHash (hash )) {
149
151
150
- if (table .hasEntryByHash (hash )==true ){
151
- int sector = table .getIntValueByHash ("sector" , hash );
152
- int layer = table .getIntValueByHash ("layer" , hash );
153
- int component = table .getIntValueByHash ("component" , hash );
154
- int order = table .getIntValueByHash ("order" , hash );
152
+ int sector = t .getIntValueByHash ("sector" , hash );
153
+ int layer = t .getIntValueByHash ("layer" , hash );
154
+ int component = t .getIntValueByHash ("component" , hash );
155
+ int order = t .getIntValueByHash ("order" , hash );
155
156
156
157
data .getDescriptor ().setSectorLayerComponent (sector , layer , component );
157
158
data .getDescriptor ().setOrder (order );
158
159
data .getDescriptor ().setType (keysTrans .get (j ));
159
160
160
- for (int i = 0 ; i < data .getADCSize (); i ++) {
161
- data .getADCData (i ).setOrder (order );
162
- }
163
- for (int i = 0 ; i < data .getTDCSize (); i ++) {
164
- data .getTDCData (i ).setOrder (order );
165
- }
161
+ for (int i = 0 ; i < data .getADCSize (); i ++) data .getADCData (i ).setOrder (order );
162
+ for (int i = 0 ; i < data .getTDCSize (); i ++) data .getTDCData (i ).setOrder (order );
166
163
167
- // crate/slot/channel must map to a unique detector:
164
+ // Assume there's only one instance of this crate/slot/channel
165
+ // in all translation tables, and we found it, so stop:
168
166
break ;
169
167
}
170
168
}
0 commit comments