Skip to content

Commit e738d19

Browse files
committed
cleanup
1 parent 2cf0e67 commit e738d19

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
- name: build
9797
run: |
9898
./build-coatjava.sh --no-progress -T${{ env.nthreads }}
99-
./bin/install-clara -b -c ./coatjava ./clara
99+
./bin/install-clara -c ./coatjava ./clara
100100
- name: tar # tarball to preserve permissions
101101
run: |
102102
tar czvf coatjava.tar.gz coatjava

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ public class DetectorEventDecoder {
3737
private TranslationTable translator = new TranslationTable();
3838

3939
public DetectorEventDecoder(boolean development){
40-
if(development==true){
41-
this.initDecoderDev();
42-
} else {
43-
this.initDecoder();
44-
}
40+
if(development==true) this.initDecoderDev();
41+
else this.initDecoder();
4542
}
4643

4744
public void setTimestamp(String timestamp) {
@@ -58,10 +55,9 @@ public void setVariation(String variation) {
5855

5956
public void setRunNumber(int run){
6057
if (run != this.runNumber) {
61-
// Load a global translation table:
6258
translator = new TranslationTable();
6359
for (int i=0; i<keysTrans.size(); i++)
64-
translator.add(keysTrans.get(i), translationManager.getConstants(runNumber, tablesTrans.get(i)));
60+
translator.add(keysTrans.get(i), translationManager.getConstants(run, tablesTrans.get(i)));
6561
}
6662
this.runNumber = run;
6763
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ public class TranslationTable extends IndexedTable {
1111

1212
public TranslationTable() {
1313
super(3,new String[]{"sector/I","layer/I","component/I","order/I","type/I"});
14+
String[] x = new String[entryMap.keySet().size()];
15+
for (String name : entryMap.keySet())
16+
x[entryMap.get(name)] = name + "/" + entryTypes.get(name);
1417
};
1518

1619
public void add(DetectorType dt, IndexedTable it) {

common-tools/clas-utils/src/main/java/org/jlab/utils/groups/IndexedTable.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@
2222
public class IndexedTable extends DefaultTableModel {
2323

2424
public static final IndexGenerator DEFAULT_GENERATOR = new IndexGenerator();
25+
26+
protected Map<String,Integer> entryMap = new LinkedHashMap<>();
27+
protected Map<String,String> entryTypes = new LinkedHashMap<>();
2528

2629
private IndexedList<IndexedEntry> entries = null;
27-
private Map<String,Integer> entryMap = new LinkedHashMap<>();
28-
private Map<String,String> entryTypes = new LinkedHashMap<>();
2930
private List<String> entryNames = new ArrayList<>();
3031
private List<String> indexNames = new ArrayList<>();
3132
private String precisionFormat = "%.6f";
32-
3333
private Map<Integer,List<RowConstraint>> constrains = new HashMap<>();
34-
3534
private int DEBUG_MODE = 0;
3635

3736
public IndexedTable(int indexCount){

0 commit comments

Comments
 (0)