Skip to content

Commit 2e038ac

Browse files
committed
more comments
1 parent 6ceceeb commit 2e038ac

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,26 @@ public final void initDecoder(){
130130
*/
131131
public void translate(List<DetectorDataDgtz> detectorData){
132132

133-
// preload CCDB tables once:
133+
// Preload CCDB tables:
134134
ArrayList<IndexedTable> tables = new ArrayList<>();
135135
for (String name : tablesTrans) {
136136
tables.add(translationManager.getConstants(runNumber, name));
137137
}
138138

139139
for (DetectorDataDgtz data : detectorData) {
140140

141+
// Get the hardware indexing for this detector hit:
141142
int crate = data.getDescriptor().getCrate();
142143
int slot = data.getDescriptor().getSlot();
143144
int channel = data.getDescriptor().getChannel();
144145
long hash = IndexedTable.DEFAULT_GENERATOR.hashCode(crate,slot,channel);
145-
146+
147+
// Try to find it in the translation tables:
146148
for (int j=0; j<tablesTrans.size(); ++j) {
147149

148150
IndexedTable t = tables.get(j);
149151

152+
// Found it; now set the detector indexing for this hit:
150153
if (t.hasEntryByHash(hash)) {
151154

152155
int sector = t.getIntValueByHash("sector", hash);

0 commit comments

Comments
 (0)