Skip to content

Commit c28490c

Browse files
Merge pull request JeffersonLab#625 from JeffersonLab/development
Merge for production tag
2 parents 17bd1a7 + 957ea47 commit c28490c

44 files changed

Lines changed: 759 additions & 139 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build-coatjava.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@ cp reconstruction/fvt/target/clas12detector-fmt-*-SNAPSHOT.jar coatjava/lib/serv
111111
cp reconstruction/eb/target/clas12detector-eb-*-SNAPSHOT.jar coatjava/lib/services/
112112
cp reconstruction/band/target/clas12detector-band-*-SNAPSHOT.jar coatjava/lib/services/
113113
cp reconstruction/rtpc/target/clas12detector-rtpc-*-SNAPSHOT.jar coatjava/lib/services/
114+
cp reconstruction/swaps/target/clas12detector-swaps-*-SNAPSHOT.jar coatjava/lib/services/
114115

115116
echo "COATJAVA SUCCESSFULLY BUILT !"

common-tools/clas-analysis/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.jlab.clas</groupId>
55
<artifactId>clas-analysis</artifactId>
6-
<version>6.5.11-SNAPSHOT</version>
6+
<version>6.5.12-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<parent>
1010
<groupId>org.jlab.clas</groupId>
1111
<artifactId>clas12rec</artifactId>
1212
<relativePath>../../parent/pom.xml</relativePath>
13-
<version>6.5.11-SNAPSHOT</version>
13+
<version>6.5.12-SNAPSHOT</version>
1414
</parent>
1515

1616
<build>
@@ -30,37 +30,37 @@
3030
<dependency>
3131
<groupId>org.jlab.clas</groupId>
3232
<artifactId>clas-utils</artifactId>
33-
<version>6.5.11-SNAPSHOT</version>
33+
<version>6.5.12-SNAPSHOT</version>
3434
</dependency>
3535

3636
<dependency>
3737
<groupId>org.jlab.clas</groupId>
3838
<artifactId>clas-physics</artifactId>
39-
<version>6.5.11-SNAPSHOT</version>
39+
<version>6.5.12-SNAPSHOT</version>
4040
</dependency>
4141

4242
<dependency>
4343
<groupId>org.jlab.clas</groupId>
4444
<artifactId>clas-io</artifactId>
45-
<version>6.5.11-SNAPSHOT</version>
45+
<version>6.5.12-SNAPSHOT</version>
4646
</dependency>
4747

4848
<dependency>
4949
<groupId>org.jlab.clas</groupId>
5050
<artifactId>clas-geometry</artifactId>
51-
<version>6.5.11-SNAPSHOT</version>
51+
<version>6.5.12-SNAPSHOT</version>
5252
</dependency>
5353

5454
<dependency>
5555
<groupId>org.jlab.clas</groupId>
5656
<artifactId>clas-detector</artifactId>
57-
<version>6.5.11-SNAPSHOT</version>
57+
<version>6.5.12-SNAPSHOT</version>
5858
</dependency>
5959

6060
<dependency>
6161
<groupId>org.jlab</groupId>
6262
<artifactId>groot</artifactId>
63-
<version>2.2.0-SNAPSHOT</version>
63+
<version>3.0.0-SNAPSHOT</version>
6464
</dependency>
6565
</dependencies>
6666

common-tools/clas-analysis/src/main/java/org/jlab/analysis/plotting/TCanvasP.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ public TCanvasP(String name, int xsize, int ysize, int nColumns, int nRows) {
2121
this.divide(nColumns, nRows);
2222
}
2323

24-
@Override
25-
public void divide(int nColumns, int nRows) {
24+
@Override
25+
public TCanvasP divide(int nColumns, int nRows) {
2626
super.divide(nColumns, nRows);
2727
this.nColumns = nColumns;
2828
this.nRows = nRows;
2929
if(nColumns*nRows <= 9) setFontSizes(22);
3030
else if(nColumns*nRows > 9 && nColumns*nRows <= 16) setFontSizes(20);
3131
else if(nColumns*nRows > 16 && nColumns*nRows <= 25) setFontSizes(16);
3232
else setFontSizes(14);
33+
return this;
3334
}
3435

3536
public void setFontSizes(int size) {

common-tools/clas-detector/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.jlab.clas</groupId>
55
<artifactId>clas-detector</artifactId>
6-
<version>6.5.11-SNAPSHOT</version>
6+
<version>6.5.12-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<parent>
1010
<groupId>org.jlab.clas</groupId>
1111
<artifactId>clas12rec</artifactId>
1212
<relativePath>../../parent/pom.xml</relativePath>
13-
<version>6.5.11-SNAPSHOT</version>
13+
<version>6.5.12-SNAPSHOT</version>
1414
</parent>
1515

1616
<build>
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>org.jlab.clas</groupId>
3232
<artifactId>clas-utils</artifactId>
33-
<version>6.5.11-SNAPSHOT</version>
33+
<version>6.5.12-SNAPSHOT</version>
3434
</dependency>
3535

3636
<dependency>
@@ -42,19 +42,19 @@
4242
<dependency>
4343
<groupId>org.jlab.clas</groupId>
4444
<artifactId>clas-io</artifactId>
45-
<version>6.5.11-SNAPSHOT</version>
45+
<version>6.5.12-SNAPSHOT</version>
4646
</dependency>
4747

4848
<dependency>
4949
<groupId>org.jlab.clas</groupId>
5050
<artifactId>clas-geometry</artifactId>
51-
<version>6.5.11-SNAPSHOT</version>
51+
<version>6.5.12-SNAPSHOT</version>
5252
</dependency>
5353

5454
<dependency>
5555
<groupId>org.jlab</groupId>
5656
<artifactId>groot</artifactId>
57-
<version>2.2.0-SNAPSHOT</version>
57+
<version>3.0.0-SNAPSHOT</version>
5858
</dependency>
5959
</dependencies>
6060

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

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public class CodaEventDecoder {
4848
JsonObject epicsData = new JsonObject();
4949

5050
private final long timeStampTolerance = 0L;
51-
51+
private int tiMaster = -1;
52+
5253
public CodaEventDecoder(){
5354

5455
}
@@ -128,29 +129,45 @@ public byte getHelicityLevel3() {
128129
}
129130

130131
public void setTimeStamp(EvioDataEvent event) {
132+
133+
long ts = -1;
134+
131135
List<DetectorDataDgtz> tiEntries = this.getDataEntries_TI(event);
132-
boolean tiSync=true;
133-
if(tiEntries.size()>0) {
134-
long ts = tiEntries.get(0).getTimeStamp();
135-
for(int i=1; i<tiEntries.size(); i++) {
136-
if(Math.abs(tiEntries.get(i).getTimeStamp()-ts)>this.timeStampTolerance) {
136+
137+
if(tiEntries.size()==1) {
138+
ts = tiEntries.get(0).getTimeStamp();
139+
}
140+
else if(tiEntries.size()>1) {
141+
// check sychronization
142+
boolean tiSync=true;
143+
int i0 = -1;
144+
// set reference timestamp from first entry which is not the tiMaster
145+
for(int i=0; i<tiEntries.size(); i++) {
146+
if(tiEntries.get(i).getDescriptor().getCrate()!=this.tiMaster) {
147+
i0 = i;
148+
break;
149+
}
150+
}
151+
for(int i=0; i<tiEntries.size(); i++) {
152+
long deltaTS = this.timeStampTolerance;
153+
if(tiEntries.get(i).getDescriptor().getCrate()==this.tiMaster) deltaTS = deltaTS + 1; // add 1 click tolerance for tiMaster
154+
if(Math.abs(tiEntries.get(i).getTimeStamp()-tiEntries.get(i0).getTimeStamp())>deltaTS) {
137155
tiSync=false;
138156
if(this.timeStampErrors<100) {
139-
System.out.println("WARNING: mismatch in TI time stamps: crate "
157+
System.err.println("WARNING: mismatch in TI time stamps: crate "
140158
+ tiEntries.get(i).getDescriptor().getCrate() + " reports "
141159
+ tiEntries.get(i).getTimeStamp() + " instead of the " + ts
142-
+ " from crate " + tiEntries.get(0).getDescriptor().getCrate());
143-
this.timeStampErrors++;
160+
+ " from crate " + tiEntries.get(i0).getDescriptor().getCrate());
161+
}
162+
else if(this.timeStampErrors==100) {
163+
System.err.println("WARNING: reached the maximum number of timeStamp errors (100), supressing future warnings.");
144164
}
145-
}
146-
if(this.timeStampErrors==100) {
147-
System.out.println("Reached the maximum number of timeStamp errors (100)");
148165
this.timeStampErrors++;
149166
}
150167
}
151-
if(tiSync) this.timeStamp = ts ;
152-
else this.timeStamp = -1 ;
168+
if(tiSync) ts = tiEntries.get(i0).getTimeStamp();
153169
}
170+
this.timeStamp = ts ;
154171
}
155172

156173
public long getTriggerBits() {
@@ -236,7 +253,7 @@ public List<DetectorDataDgtz> getDataEntries(EvioDataEvent event, int crate){
236253
// This is regular integrated pulse mode, used for FTOF
237254
// FTCAL and EC/PCAL
238255
//return this.getDataEntries_57602(crate, node, event);
239-
256+
this.tiMaster = crate;
240257
this.readHeaderBank(crate, node, event);
241258
//return this.getDataEntriesMode_7(crate,node, event);
242259
}

0 commit comments

Comments
 (0)