File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
common-tools/clas-detector/src/main/java/org/jlab/detector/decode Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -130,23 +130,26 @@ public final void initDecoder(){
130
130
*/
131
131
public void translate (List <DetectorDataDgtz > detectorData ){
132
132
133
- // preload CCDB tables once :
133
+ // Preload CCDB tables:
134
134
ArrayList <IndexedTable > tables = new ArrayList <>();
135
135
for (String name : tablesTrans ) {
136
136
tables .add (translationManager .getConstants (runNumber , name ));
137
137
}
138
138
139
139
for (DetectorDataDgtz data : detectorData ) {
140
140
141
+ // Get the hardware indexing for this detector hit:
141
142
int crate = data .getDescriptor ().getCrate ();
142
143
int slot = data .getDescriptor ().getSlot ();
143
144
int channel = data .getDescriptor ().getChannel ();
144
145
long hash = IndexedTable .DEFAULT_GENERATOR .hashCode (crate ,slot ,channel );
145
-
146
+
147
+ // Try to find it in the translation tables:
146
148
for (int j =0 ; j <tablesTrans .size (); ++j ) {
147
149
148
150
IndexedTable t = tables .get (j );
149
151
152
+ // Found it; now set the detector indexing for this hit:
150
153
if (t .hasEntryByHash (hash )) {
151
154
152
155
int sector = t .getIntValueByHash ("sector" , hash );
You can’t perform that action at this time.
0 commit comments