Skip to content

Commit bd1e2fd

Browse files
N-Plxzieglerbaltzellraffaelladevitadependabot[bot]
authored
feat: indexed table class can handle more than 4 indices (#756)
* feat: indexed table class can handle more than 4 indices * feat: default constructor for the IndexGenerator class * restoring main class as it was * update branch (#768) * update to DC tracking to read and use the new TDC cuts ccdb table. * use live database * build: bump version number to 13.1.0 (#757) * remove unused/defunct classes * convert tabs to spaces * remove unused/defunct classes * remove long-defunct main methods * cleanup * switch example to hipo4 * remove hipo3 support * remove unused/defunct classes * cleanup, tabs/spaces, formatting, ide warnings * cleanup, formatting, ide warnings * cleanup, formatting, tabs/spaces, ide warnings * cleanup, formatting, tabs/spaces, ide warnings * remove (newly) unused dependencies * restore object creation * convert tabs to spaces * cleanup * remove no-op * build(deps): bump org.apache.maven.plugins:maven-enforcer-plugin (#759) * apply fine timestamp correction to leadingEdgeTime * ahdc hit time corrected * add modeAHDC in PulseExtractorEngine * use wf type for hit selection * take into account simulation * replace string manipulation with bit operation * comment unnecessary code lines * use wfType 0 or 1 * fix: reduce the number of CODEOWNERS (#764) * fix: remove unused `etc/` files (#765) They are 7-8 years old, and it is not clear what they are; they are apparently unused here. --------- Co-authored-by: ziegler <[email protected]> Co-authored-by: Nathan Baltzell <[email protected]> Co-authored-by: raffaelladevita <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Felix Touchte Codjo <[email protected]> Co-authored-by: Christopher Dilks <[email protected]> * feat: can parse any byte shifts array for indexed tables * default byte shift array can only be used for less than 4 indices * misc fixes to compute long key and checks for byte shifts and index format * check bin width compatible with int * fix retrieving index from key --------- Co-authored-by: ziegler <[email protected]> Co-authored-by: Nathan Baltzell <[email protected]> Co-authored-by: raffaelladevita <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Felix Touchte Codjo <[email protected]> Co-authored-by: Christopher Dilks <[email protected]>
1 parent 23d5c5a commit bd1e2fd

File tree

4 files changed

+304
-60
lines changed

4 files changed

+304
-60
lines changed

common-tools/clas-detector/src/main/java/org/jlab/detector/base/DetectorCollection.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public Set<Integer> getSectors(){
8282
Set<Integer> sectors = new HashSet<Integer>();
8383

8484
for(Long item : list){
85-
int sect = IndexedList.IndexGenerator.getIndex(item, 0);
85+
int sect = this.collection.getIndexGenerator().getIndex(item, 0);
8686
sectors.add(sect);
8787
}
8888
return sectors;
@@ -97,9 +97,9 @@ public Set<Integer> getLayers(int sector){
9797
Set<Long> list = this.collection.getMap().keySet();
9898
Set<Integer> layers = new HashSet<Integer>();
9999
for(Long item : list){
100-
int sect = IndexedList.IndexGenerator.getIndex(item, 0);
100+
int sect = this.collection.getIndexGenerator().getIndex(item, 0);
101101
if(sect==sector){
102-
int lay = IndexedList.IndexGenerator.getIndex(item, 1);
102+
int lay = this.collection.getIndexGenerator().getIndex(item, 1);
103103
layers.add(lay);
104104
}
105105
}
@@ -115,10 +115,10 @@ public Set<Integer> getComponents(int sector, int layer){
115115
Set<Long> list = this.collection.getMap().keySet();
116116
Set<Integer> components = new HashSet<Integer>();
117117
for(Long item : list){
118-
int sect = IndexedList.IndexGenerator.getIndex(item, 0);
119-
int lay = IndexedList.IndexGenerator.getIndex(item, 1);
118+
int sect = this.collection.getIndexGenerator().getIndex(item, 0);
119+
int lay = this.collection.getIndexGenerator().getIndex(item, 1);
120120
if(sect==sector&&lay==layer){
121-
int comp = IndexedList.IndexGenerator.getIndex(item, 2);
121+
int comp = this.collection.getIndexGenerator().getIndex(item, 2);
122122
components.add(comp);
123123
}
124124
}

common-tools/clas-detector/src/main/java/org/jlab/detector/calib/utils/CalibrationConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void save(String file){
6767
StringBuilder str = new StringBuilder();
6868
for(int i = 0; i < nindex; i++){
6969
str.append(
70-
String.format("%3d ",IndexedList.IndexGenerator.getIndex(entry.getKey(),i)));
70+
String.format("%3d ",this.getList().getIndexGenerator().getIndex(entry.getKey(),i)));
7171
}
7272
int ncolumns = entry.getValue().getSize();
7373
for(int i = 0; i < ncolumns; i++){

0 commit comments

Comments
 (0)