Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: move javafx-dependent CVT code to new module `common-tool…
…s/clas-qcddat`
  • Loading branch information
c-dilks committed Oct 12, 2026
commit 24130dbd1e4ed17fb82ab6b14f37530f7b6ff4c3
2 changes: 1 addition & 1 deletion bin/run_cvt_viewer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ if [ ! -f "$INPUT_ABS" ]; then
fi

mvn -f "$POM_FILE" -q exec:java \
-Dexec.mainClass="org.jlab.rec.cvt.ml.qcddat.Browser" \
-Dexec.mainClass="org.jlab.qcddat.CVTBrowser" \
-Dexec.args="$INPUT_ABS"

39 changes: 39 additions & 0 deletions common-tools/clas-qcddat/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.jlab.clas</groupId>
<artifactId>clas-qcddat</artifactId>
<version>14.1.2-SNAPSHOT</version>
<packaging>jar</packaging>

<parent>
<groupId>org.jlab.clas</groupId>
<artifactId>common-tools</artifactId>
<version>14.1.2-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>org.jlab.clas</groupId>
<artifactId>clas-io</artifactId>
<version>14.1.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<classifier>linux</classifier>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package org.jlab.rec.cvt.ml.qcddat;
package org.jlab.qcddat;

import javafx.application.Application;
/**
*
* @author veronique
*/
public class Browser {
public class CVTBrowser {

public static void main(String[] args) {
if (args.length < 1) {
Expand All @@ -20,7 +16,7 @@ public static void main(String[] args) {

String inputFile = args[0];

Viewer.configure(inputFile);
Application.launch(Viewer.class);
CVTViewer.configure(inputFile);
Application.launch(CVTViewer.class);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jlab.rec.cvt.ml.qcddat;
package org.jlab.qcddat;

import javafx.application.Application;
import javafx.geometry.Insets;
Expand Down Expand Up @@ -30,7 +30,7 @@
* @author veronique
*/

public class Viewer extends Application {
public class CVTViewer extends Application {

// ---------- config ----------
private static String inputFile;
Expand All @@ -43,7 +43,7 @@ public static void configure(String input) {

public static void main(String[] args) {
if (args.length < 1) {
System.err.println("Usage: java org.jlab.rec.cvt.ml.qcddat.Viewer <input.hipo>");
System.err.println("Usage: java org.jlab.qcddat.CVTViewer <input.hipo>");
System.exit(1);
}
configure(args[0]);
Expand Down Expand Up @@ -125,7 +125,7 @@ private static class HitPoint {
@Override
public void start(Stage stage) {
if (inputFile == null || bankName == null) {
throw new IllegalStateException("Viewer.configure(inputFile) must be called before launch.");
throw new IllegalStateException("CVTViewer.configure(inputFile) must be called before launch.");
}

initializeFile(inputFile);
Expand Down Expand Up @@ -607,4 +607,4 @@ private Color colorFor(DetectorKind kind) {
case UNKNOWN -> Color.WHITE;
};
}
}
}
1 change: 1 addition & 0 deletions common-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<module>clara-io</module>
<module>clas-tracking</module>
<module>clas-decay-tools</module>
<module>clas-qcddat</module>
<module>coat-libs</module>
</modules>

Expand Down
2 changes: 1 addition & 1 deletion etc/services/mc-qcddat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ io-services:
services:
- class: org.jlab.clas.swimtools.MagFieldsEngine
name: MAGFIELDS
- class: org.jlab.rec.cvt.ml.qcddat.SampleMaker
- class: org.jlab.rec.cvt.ml.QCDDATSampleMaker
name: CVTFP
configuration:
global:
Expand Down
18 changes: 0 additions & 18 deletions reconstruction/cvt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- FIXME(CD): only the new code in `src/main/java/org/jlab/rec/cvt/ml` needs this dependency;
should we move this `ml/qcddat` directory to a new module? -->
<dependency>
<groupId>org.jlab.jnp</groupId>
<artifactId>jnp-hipo4</artifactId>
</dependency>
<!-- FIXME(CD): within this `ml/` directory, the `qcddat` subdirectory additionally needs these `javafx` dependencies -->
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<classifier>linux</classifier>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.jlab.rec.cvt.ml.qcddat;
package org.jlab.rec.cvt.ml;

import org.jlab.rec.cvt.ml.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -27,15 +26,15 @@
* @author ziegler
*
*/
public class SampleMaker extends ReconstructionEngine {
public class QCDDATSampleMaker extends ReconstructionEngine {

private String svtHitBank;

public SampleMaker(String name) {
public QCDDATSampleMaker(String name) {
super(name, "ziegler", "6.0");
}

public SampleMaker() {
public QCDDATSampleMaker() {
super("CVTQCDDATEngine", "ziegler", "6.0");
}

Expand Down