diff --git a/.containers/coatjava.Dockerfile b/.containers/coatjava.Dockerfile
index dbe73116a0..513e16c0a1 100644
--- a/.containers/coatjava.Dockerfile
+++ b/.containers/coatjava.Dockerfile
@@ -22,4 +22,5 @@ ARG REF_NAME=development
# build coatjava
RUN java --version && cd /opt && \
git clone https://code.jlab.org/hallb/alert/coatjava.git && cd coatjava && \
- git fetch origin && git checkout ${REF_NAME} && ./build-coatjava.sh --quiet
+ git fetch origin && git checkout ${REF_NAME} && ./build-coatjava.sh --quiet && \
+ ./install-clara /opt/clara
diff --git a/.containers/coatjava.def b/.containers/coatjava.def
new file mode 100644
index 0000000000..8dc1962ac8
--- /dev/null
+++ b/.containers/coatjava.def
@@ -0,0 +1,14 @@
+Bootstrap: docker
+From: codecr.jlab.org/hallb/alert/coatjava/coatjava:{{ REF_NAME }}
+
+
+%environment
+ export CLAS12DIR=/opt/coatjava/coatjava
+
+%help
+ This is a clas12 coatjava container used to run coatjava on HPC systems
+ and do rapid development.
+
+%labels
+ Author Whitney Armstrong warmstrong@anl.gov
+ REF_NAME {{ REF_NAME }}
diff --git a/.github/workflows/maven.yml b/.github/workflows/ci.yml
similarity index 80%
rename from .github/workflows/maven.yml
rename to .github/workflows/ci.yml
index 5ec80c4110..916e9157b3 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,9 @@ defaults:
env:
java_version: 17
java_distribution: zulu
+ javadoc_version: 24 # newer than `java_version` for better javadoc
groovy_version: 4.x
+ CCDB_CONNECTION: 'sqlite:////cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/noarch/data/ccdb/ccdb_latest.sqlite'
jobs:
@@ -40,11 +42,17 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- - name: Set up JDK
- uses: actions/setup-java@v4
+ - uses: actions/setup-java@v4
with:
java-version: ${{ env.java_version }}
distribution: ${{ env.java_distribution }}
+ - uses: cvmfs-contrib/github-action-cvmfs@v5
+ with:
+ cvmfs_repositories: 'oasis.opensciencegrid.org'
+ - name: cvmfs
+ run: ls /cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/noarch/data/ccdb/ccdb_latest.sqlite
+ - name: echo CCDB_CONNECTION
+ run: echo $CCDB_CONNECTION
- name: build
run: ./build-coatjava.sh --spotbugs --unittests --quiet -T4
- name: tar # tarball to preserve permissions
@@ -103,8 +111,13 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: build_${{ matrix.runner }}
+ - uses: cvmfs-contrib/github-action-cvmfs@v5
+ with:
+ cvmfs_repositories: 'oasis.opensciencegrid.org'
- name: untar build
run: tar xzvf coatjava.tar.gz
+ - name: echo CCDB_CONNECTION
+ run: echo $CCDB_CONNECTION
- name: run test
run: |
cd validation/advanced-tests
@@ -160,55 +173,46 @@ jobs:
- name: pass
run: exit 0
- # generate documentation
+ # documentation
#############################################################################
generate_documentation:
runs-on: ubuntu-latest
+ needs: [ build ]
steps:
+ ### mkdocs
- uses: actions/checkout@v4
- - name: Set up JDK
- uses: actions/setup-java@v4
- with:
- java-version: ${{ env.java_version }}
- distribution: ${{ env.java_distribution }}
- - name: build
- run: ./build-coatjava.sh
- - name: generate documentation
- run: ./build-javadocs.sh
- - uses: actions/upload-artifact@v4
- with:
- name: javadoc
- path: docs/javadoc/
- retention-days: 1
-
- # deploy web pages
- #############################################################################
-
- collect_webpages:
- if: ${{ github.ref == 'refs/heads/development' }}
- needs: [ build, generate_documentation ]
- runs-on: ubuntu-latest
- steps:
- - name: download jacoco report
+ - name: install mkdocs dependencies
+ run: python -m pip install -r docs/mkdocs/requirements.txt
+ - name: generate mkdocs
+ run: docs/mkdocs/generate.sh pages
+ ### jacoco
+ - name: download jacoco report artifact
uses: actions/download-artifact@v4
with:
name: jacoco_report
path: pages/jacoco
- - name: download javadoc documentation
- uses: actions/download-artifact@v4
+ ### javadoc
+ - name: set up JDK
+ uses: actions/setup-java@v4
with:
- name: javadoc
- path: pages/javadoc
- - run: tree pages
+ java-version: ${{ env.javadoc_version }}
+ distribution: ${{ env.java_distribution }}
+ - name: build coatjava
+ run: ./build-coatjava.sh
+ - name: generate javadoc documentation
+ run: |
+ ./build-javadocs.sh
+ mv docs/javadoc pages/
+ ### upload artifacts
- uses: actions/upload-pages-artifact@v3
with:
- retention-days: 1
+ retention-days: 7
path: pages/
deploy_web_pages:
if: ${{ github.ref == 'refs/heads/development' }}
- needs: collect_webpages
+ needs: [ generate_documentation ]
permissions:
pages: write
id-token: write
diff --git a/.gitignore b/.gitignore
index 77c0fd6ff3..900361e56b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,6 +32,12 @@ hs_err_pid*
*.iml
.idea
+# eclipse JDT language server
+.classpath
+.factorypath
+.project
+.settings
+
# no log files:
*.log
*.evio
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index da31aa64a8..51bd6a7da6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ workflow:
variables:
KUBERNETES_MEMORY_LIMIT: "8Gi"
+ REF_NAME: ${CI_COMMIT_REF_NAME}
default:
image: ubuntu:noble
@@ -69,3 +70,34 @@ shared_for_alert_tests:
project: hallb/alert/atof/shared_for_alert
strategy: depend
+coatjava:singularity:
+ image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
+ needs: ["coatjava_build"]
+ tags:
+ - silicon
+ allow_failure: true
+ script:
+ - apptainer build --build-arg REF_NAME=${REF_NAME} coatjava.sif .containers/coatjava.def
+ - ls -lrth
+ artifacts:
+ paths:
+ - coatjava.sif
+
+create-pages:
+ image: codecr.jlab.org/hallb/alert/coatjava/coatjava:development
+ script:
+ - export MAVEN_OPTS=" -Dfile.encoding=UTF-8"
+ - echo "${CI_COMMIT_REF_NAME}"
+ - ls -lrth
+ - mvn --version
+ - java --version
+ - ls -lrth
+ - pwd
+ - ls -lrth docs/javadoc
+ - ./build-javadocs.sh
+ - ls -lrth
+ - ls -lrth docs/
+ - ls -lrth docs/javadoc
+ - mv docs/javadoc public
+ pages: true # specifies that this is a Pages job and publishes the default public directory
+
diff --git a/README.md b/README.md
index 932aa457cd..606d8c9bfd 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
[](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml)
[](https://jeffersonlab.github.io/coatjava/jacoco)
+- [**Documentation Homepage**](https://jeffersonlab.github.io/coatjava)
- [API Documentation (Javadoc)](https://jeffersonlab.github.io/coatjava/javadoc)
----
@@ -58,3 +59,6 @@ http://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-
-->
+
+[Coatjava Apptainer](https://code.jlab.org/hallb/alert/coatjava/-/jobs/artifacts/development/raw/coatjava.sif?job=coatjava%3Asingularity)
+
diff --git a/bin/hipo-multi-merge b/bin/hipo-multi-merge
index 5dcbacea8e..ebed509cec 100755
--- a/bin/hipo-multi-merge
+++ b/bin/hipo-multi-merge
@@ -8,6 +8,8 @@ def print_log(name, val)
puts name.rjust(30) + " = #{val}"
end
+SlurmMemReq = 2048 + 200 # `-Xmx` argument from `hipo-utils`, plus extra padding
+
# user options
@args = OpenStruct.new
@args.inputs = nil
@@ -76,7 +78,7 @@ if @args.use_batch
'job-name' => "hipo_multi_merge___#{@args.prefix}",
'account' => 'clas12',
'partition' => 'production',
- 'mem-per-cpu' => 500,
+ 'mem-per-cpu' => SlurmMemReq,
'time' => '1:00:00',
'ntasks' => 1,
'cpus-per-task' => 1,
diff --git a/bin/recon-util b/bin/recon-util
index a11a11e8c3..e933e14b46 100755
--- a/bin/recon-util
+++ b/bin/recon-util
@@ -2,9 +2,12 @@
. `dirname $0`/../libexec/env.sh
+split_cli $@
+
export MALLOC_ARENA_MAX=1
-java -Xmx1536m -Xms1024m -XX:+UseSerialGC \
+java -Xmx1536m -Xms1024m -XX:+UseSerialGC ${jvm_options[@]} \
-cp "$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/services/*:$CLAS12DIR/lib/utils/*" \
org.jlab.clas.reco.EngineProcessor \
- $*
+ ${class_options[@]}
+
diff --git a/build-javadocs.sh b/build-javadocs.sh
index bfdfe87abd..4932f9ee9d 100755
--- a/build-javadocs.sh
+++ b/build-javadocs.sh
@@ -5,8 +5,10 @@
set -e
+export MAVEN_OPTS=" -Dfile.encoding=UTF-8"
+
##### generate documentation
-mvn javadoc:javadoc -Ddoclint=none
+mvn javadoc:javadoc -Ddoclint=none
##### collect documentation
diff --git a/common-tools/clara-io/pom.xml b/common-tools/clara-io/pom.xml
index 829ad4a1bd..185959920a 100644
--- a/common-tools/clara-io/pom.xml
+++ b/common-tools/clara-io/pom.xml
@@ -3,14 +3,14 @@
4.0.0
org.jlab.clas
clara-io
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
jar
org.jlab.clas
clas12rec
../../parent/pom.xml
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
@@ -61,7 +61,7 @@
org.apache.commons
commons-text
- 1.13.0
+ 1.13.1
diff --git a/common-tools/clas-analysis/pom.xml b/common-tools/clas-analysis/pom.xml
index fd3f5efb02..a6b5d9d850 100644
--- a/common-tools/clas-analysis/pom.xml
+++ b/common-tools/clas-analysis/pom.xml
@@ -3,63 +3,63 @@
4.0.0
org.jlab.clas
clas-analysis
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
jar
org.jlab.clas
clas12rec
../../parent/pom.xml
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-utils
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-physics
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-io
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-geometry
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-jcsg
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
swim-tools
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-detector
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-reco
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
diff --git a/common-tools/clas-detector/pom.xml b/common-tools/clas-detector/pom.xml
index 635bc38466..26933b2080 100644
--- a/common-tools/clas-detector/pom.xml
+++ b/common-tools/clas-detector/pom.xml
@@ -3,21 +3,21 @@
4.0.0
org.jlab.clas
clas-detector
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
jar
org.jlab.clas
clas12rec
../../parent/pom.xml
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-utils
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
@@ -29,13 +29,13 @@
org.jlab.clas
clas-io
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
org.jlab.clas
clas-geometry
- 11.1.2-SNAPSHOT
+ 12.0.6t-SNAPSHOT
diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/banks/RawBank.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/banks/RawBank.java
index fffc360b58..19482d6005 100644
--- a/common-tools/clas-detector/src/main/java/org/jlab/detector/banks/RawBank.java
+++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/banks/RawBank.java
@@ -74,9 +74,9 @@ public static enum OrderType {
BGADDED_NOISE1 ( 70), // background hits retained by level-1 denoising
BGADDED_NOISE2 ( 80), // background hits retained by level-2 denoising
BGADDED_NOISE3 ( 90), // background hits retained by level-3 denoising
- USER1 (100),
- USER2 (110),
- USER3 (120);
+ DECREMOVED (100), // hits removed during decoding
+ USER1 (110),
+ USER2 (120);
private final int rawOrderId;
private OrderType(int id){ rawOrderId = id; }
public int getTypeId() { return rawOrderId; }
diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java
index 763042a2d4..aa366ed859 100644
--- a/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java
+++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoder4.java
@@ -139,6 +139,7 @@ public void initEvent(DataEvent event){
detectorDecoder.translate(dataList);
detectorDecoder.fitPulses(dataList);
+ detectorDecoder.filterTDCs(dataList);
if(this.decoderDebugMode>0){
System.out.println("\n>>>>>>>>> TRANSLATED data");
for(DetectorDataDgtz data : dataList){
@@ -248,7 +249,7 @@ public List getEntriesSCALER(DetectorType type,
}
public void extractPulses(Event event) {
- ahdcExtractor.update(64, null, event, schemaFactory, "AHDC::wf", "AHDC::adc");
+ ahdcExtractor.update(30, null, event, schemaFactory, "AHDC::wf", "AHDC::adc");
}
public Bank getDataBankWF(String name, DetectorType type) {
@@ -260,6 +261,7 @@ public Bank getDataBankWF(String name, DetectorType type) {
b.putShort("component", i, (short) a.get(i).getDescriptor().getComponent());
b.putByte("order", i, (byte) a.get(i).getDescriptor().getOrder());
b.putLong("timestamp", i, a.get(i).getADCData(0).getTimeStamp());
+ b.putInt("time", i, (int)a.get(i).getADCData(0).getTime());
DetectorDataDgtz.ADCData xxx = a.get(i).getADCData(0);
for (int j=0; j getDataEntries(EvioDataEvent event){
// zero out the trigger bits, but let the others properties inherit
// from the previous event, in the case where there's no HEAD bank:
this.setTriggerBits(0);
- List rawEntries = new ArrayList();
+ List rawEntries = new ArrayList<>();
List branches = this.getEventBranches(event);
this.setTimeStamp(event);
for(EvioTreeBranch branch : branches){
@@ -85,7 +85,6 @@ public List getDataEntries(EvioDataEvent event){
rawEntries.addAll(scalerEntries);
this.getDataEntries_EPICS(event);
- this.getDataEntries_HelicityDecoder(event);
return rawEntries;
}
@@ -280,10 +279,13 @@ else if(node.getTag()==57640){
return this.getDataEntries_57640(crate, node, event);
}
else if(node.getTag()==57622){
- // This is regular integrated pulse mode, used for FTOF
- // FTCAL and EC/PCAL
+ // This is regular DCRB bank with TDCs only
return this.getDataEntries_57622(crate, node, event);
}
+ else if(node.getTag()==57648){
+ // This is DCRB bank with TDCs and widths
+ return this.getDataEntries_57648(crate, node, event);
+ }
else if(node.getTag()==57636){
// RICH TDC data
return this.getDataEntries_57636(crate, node, event);
@@ -642,7 +644,6 @@ public List getDataEntries_57601(Integer crate, EvioNode node
System.out.println("Exception in CRATE = " + crate + " RUN = " + this.runNumber
+ " EVENT = " + this.eventNumber + " LENGTH = " + compBuffer.array().length);
this.printByteBuffer(compBuffer, 120, 20);
-// Logger.getLogger(CodaEventDecoder.class.getName()).log(Level.SEVERE, null, ex);
}
}
return entries;
@@ -745,7 +746,7 @@ public List getDataEntries_57640(Integer crate, EvioNode node
int nSamples = nBytes*8/12;
short[] samples = new short[ nSamples ];
- int s = 0;
+ int s;
for( int b=0;b getDataEntries_57641(Integer crate, EvioNode node
for( int ch=0; ch getDataEntries_57641(Integer crate, EvioNode node
int nSamples = nBytes*8/12;
short[] samples = new short[ nSamples ];
- int s = 0;
+ int s;
for( int b=0;b getDataEntries_57622(Integer crate, EvioNode node
}
}
} catch (EvioException ex) {
- //Logger.getLogger(EvioRawDataSource.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(CodaEventDecoder.class.getName()).log(Level.SEVERE, null, ex);
} catch (IndexOutOfBoundsException ex){
- //System.out.println("[ERROR] ----> ERROR DECODING COMPOSITE DATA FOR ONE EVENT");
+ Logger.getLogger(CodaEventDecoder.class.getName()).log(Level.SEVERE, null, ex);
+ }
+
+ }
+ return entries;
+ }
+
+ /**
+ * Bank TAG=57648 used for DC (Drift Chambers) TDC and ToT values.
+ * @param crate
+ * @param node
+ * @param event
+ * @return
+ */
+ public List getDataEntries_57648(Integer crate, EvioNode node, EvioDataEvent event){
+ List entries = new ArrayList<>();
+ if(node.getTag()==57648){
+ try {
+ ByteBuffer compBuffer = node.getByteData(true);
+ CompositeData compData = new CompositeData(compBuffer.array(),event.getByteOrder());
+ //List cdatatypes = compData.getTypes();
+ List