Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #625 from JeffersonLab/development
Browse files Browse the repository at this point in the history
Merge for production tag
  • Loading branch information
raffaelladevita authored Oct 23, 2020
2 parents 57f2cd0 + 401de76 commit 0b35a02
Show file tree
Hide file tree
Showing 44 changed files with 759 additions and 139 deletions.
1 change: 1 addition & 0 deletions build-coatjava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ cp reconstruction/fvt/target/clas12detector-fmt-*-SNAPSHOT.jar coatjava/lib/serv
cp reconstruction/eb/target/clas12detector-eb-*-SNAPSHOT.jar coatjava/lib/services/
cp reconstruction/band/target/clas12detector-band-*-SNAPSHOT.jar coatjava/lib/services/
cp reconstruction/rtpc/target/clas12detector-rtpc-*-SNAPSHOT.jar coatjava/lib/services/
cp reconstruction/swaps/target/clas12detector-swaps-*-SNAPSHOT.jar coatjava/lib/services/

echo "COATJAVA SUCCESSFULLY BUILT !"
16 changes: 8 additions & 8 deletions common-tools/clas-analysis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-analysis</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.jlab.clas</groupId>
<artifactId>clas12rec</artifactId>
<relativePath>../../parent/pom.xml</relativePath>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</parent>

<build>
Expand All @@ -30,37 +30,37 @@
<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-utils</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-physics</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-io</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-geometry</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-detector</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab</groupId>
<artifactId>groot</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ public TCanvasP(String name, int xsize, int ysize, int nColumns, int nRows) {
this.divide(nColumns, nRows);
}

@Override
public void divide(int nColumns, int nRows) {
@Override
public TCanvasP divide(int nColumns, int nRows) {
super.divide(nColumns, nRows);
this.nColumns = nColumns;
this.nRows = nRows;
if(nColumns*nRows <= 9) setFontSizes(22);
else if(nColumns*nRows > 9 && nColumns*nRows <= 16) setFontSizes(20);
else if(nColumns*nRows > 16 && nColumns*nRows <= 25) setFontSizes(16);
else setFontSizes(14);
return this;
}

public void setFontSizes(int size) {
Expand Down
12 changes: 6 additions & 6 deletions common-tools/clas-detector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-detector</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.jlab.clas</groupId>
<artifactId>clas12rec</artifactId>
<relativePath>../../parent/pom.xml</relativePath>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</parent>

<build>
Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-utils</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
Expand All @@ -42,19 +42,19 @@
<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-io</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-geometry</artifactId>
<version>6.5.11-SNAPSHOT</version>
<version>6.5.12-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.jlab</groupId>
<artifactId>groot</artifactId>
<version>2.2.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public class CodaEventDecoder {
JsonObject epicsData = new JsonObject();

private final long timeStampTolerance = 0L;

private int tiMaster = -1;

public CodaEventDecoder(){

}
Expand Down Expand Up @@ -128,29 +129,45 @@ public byte getHelicityLevel3() {
}

public void setTimeStamp(EvioDataEvent event) {

long ts = -1;

List<DetectorDataDgtz> tiEntries = this.getDataEntries_TI(event);
boolean tiSync=true;
if(tiEntries.size()>0) {
long ts = tiEntries.get(0).getTimeStamp();
for(int i=1; i<tiEntries.size(); i++) {
if(Math.abs(tiEntries.get(i).getTimeStamp()-ts)>this.timeStampTolerance) {

if(tiEntries.size()==1) {
ts = tiEntries.get(0).getTimeStamp();
}
else if(tiEntries.size()>1) {
// check sychronization
boolean tiSync=true;
int i0 = -1;
// set reference timestamp from first entry which is not the tiMaster
for(int i=0; i<tiEntries.size(); i++) {
if(tiEntries.get(i).getDescriptor().getCrate()!=this.tiMaster) {
i0 = i;
break;
}
}
for(int i=0; i<tiEntries.size(); i++) {
long deltaTS = this.timeStampTolerance;
if(tiEntries.get(i).getDescriptor().getCrate()==this.tiMaster) deltaTS = deltaTS + 1; // add 1 click tolerance for tiMaster
if(Math.abs(tiEntries.get(i).getTimeStamp()-tiEntries.get(i0).getTimeStamp())>deltaTS) {
tiSync=false;
if(this.timeStampErrors<100) {
System.out.println("WARNING: mismatch in TI time stamps: crate "
System.err.println("WARNING: mismatch in TI time stamps: crate "
+ tiEntries.get(i).getDescriptor().getCrate() + " reports "
+ tiEntries.get(i).getTimeStamp() + " instead of the " + ts
+ " from crate " + tiEntries.get(0).getDescriptor().getCrate());
this.timeStampErrors++;
+ " from crate " + tiEntries.get(i0).getDescriptor().getCrate());
}
else if(this.timeStampErrors==100) {
System.err.println("WARNING: reached the maximum number of timeStamp errors (100), supressing future warnings.");
}
}
if(this.timeStampErrors==100) {
System.out.println("Reached the maximum number of timeStamp errors (100)");
this.timeStampErrors++;
}
}
if(tiSync) this.timeStamp = ts ;
else this.timeStamp = -1 ;
if(tiSync) ts = tiEntries.get(i0).getTimeStamp();
}
this.timeStamp = ts ;
}

public long getTriggerBits() {
Expand Down Expand Up @@ -236,7 +253,7 @@ public List<DetectorDataDgtz> getDataEntries(EvioDataEvent event, int crate){
// This is regular integrated pulse mode, used for FTOF
// FTCAL and EC/PCAL
//return this.getDataEntries_57602(crate, node, event);

this.tiMaster = crate;
this.readHeaderBank(crate, node, event);
//return this.getDataEntriesMode_7(crate,node, event);
}
Expand Down
Loading

0 comments on commit 0b35a02

Please sign in to comment.