From c63de01a423e2073da5389c2b1adb7d5d63b5e4e Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 16 Dec 2016 13:56:26 +0300 Subject: [PATCH] separate grind terminal --- numass-main/build.gradle | 2 +- .../src/main/groovy/inr/numass/LaunchGrindShell.groovy | 6 +++--- .../src/main/java/inr/numass/workspace/NumassFitTask.java | 4 ++-- .../java/inr/numass/models/TestNeLossParametrisation.java | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/numass-main/build.gradle b/numass-main/build.gradle index ce3660b2..6d73b5dd 100644 --- a/numass-main/build.gradle +++ b/numass-main/build.gradle @@ -14,7 +14,7 @@ dependencies { compile project(':dataforge-fx') compile project(':dataforge-plots:plots-jfc') compile project(':numass-storage') - compile project(':dataforge-grind') + compile project(':dataforge-grind:grind-terminal') } task listActions(dependsOn: classes, type: JavaExec) { diff --git a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy index dacec1c2..81531f6d 100644 --- a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy +++ b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy @@ -1,8 +1,8 @@ package inr.numass import hep.dataforge.context.Global -import hep.dataforge.grind.GrindShell import hep.dataforge.grind.GrindWorkspaceBuilder +import hep.dataforge.grind.terminal.GrindTerminal /** * Created by darksnake on 29-Aug-16. @@ -21,11 +21,11 @@ println "Starting Grind shell" if(cfgPath) { try { - new GrindShell().launch { + GrindTerminal.dumb().launch { GrindWorkspaceBuilder numass = new GrindWorkspaceBuilder() .withSpec(NumassWorkspaceSpec) .from(new File(cfgPath)) - bind("numass", numass) + shell.bind("numass", numass) } } catch (Exception ex) { ex.printStackTrace(); diff --git a/numass-main/src/main/java/inr/numass/workspace/NumassFitTask.java b/numass-main/src/main/java/inr/numass/workspace/NumassFitTask.java index dfa7ba2d..48894607 100644 --- a/numass-main/src/main/java/inr/numass/workspace/NumassFitTask.java +++ b/numass-main/src/main/java/inr/numass/workspace/NumassFitTask.java @@ -51,8 +51,8 @@ public class NumassFitTask extends SingleActionTask { } @Override - protected Action getAction(TaskModel model) { - Action action = new FitAction(); + protected Action getAction(TaskModel model) { + Action action = new FitAction(); if (model.meta().getBoolean("fit.plot", false)) { return ActionUtils.compose(action, new PlotFitResultAction()); } else { diff --git a/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java b/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java index ff21705f..9dfa50e8 100644 --- a/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java +++ b/numass-main/src/test/java/inr/numass/models/TestNeLossParametrisation.java @@ -25,6 +25,7 @@ import org.apache.commons.math3.analysis.UnivariateFunction; * * @author Alexander Nozik */ +@SuppressWarnings("unchecked") public class TestNeLossParametrisation { /**