diff --git a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy index 8208d0ae..36b16f69 100644 --- a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy +++ b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy @@ -3,7 +3,6 @@ package inr.numass import hep.dataforge.context.Global import hep.dataforge.grind.GrindWorkspaceBuilder import hep.dataforge.grind.terminal.GrindTerminal -import inr.numass.tasks.* /** * Created by darksnake on 29-Aug-16. @@ -16,23 +15,13 @@ println cli.usage String cfgPath = cli.parse(args).c; println "Loading config file from $cfgPath" -//println "Starting numass plugin in GLOBAL" -//Global.instance().pluginManager().load("inr.numass:numass") println "Starting Grind shell" if (cfgPath) { try { GrindTerminal.system().launch { - GrindWorkspaceBuilder numass = new GrindWorkspaceBuilder(it.shell.context).read(new File(cfgPath)).startup { - it.loadTask(NumassPrepareTask) - it.loadTask(NumassTableFilterTask) - it.loadTask(NumassFitScanTask) - it.loadTask(NumassSubstractEmptySourceTask) - it.loadTask(NumassFitScanSummaryTask) - it.loadTask(NumassFitTask) - it.loadTask(NumassFitSummaryTask) - } - it.shell.bind("numass", numass) + GrindWorkspaceBuilder numass = new GrindWorkspaceBuilder(context).read(new File(cfgPath)) + bind("numass", numass) } } catch (Exception ex) { ex.printStackTrace(); diff --git a/numass-main/src/main/java/inr/numass/NumassPlugin.java b/numass-main/src/main/java/inr/numass/NumassPlugin.java index 33e1e112..bd87e6bc 100644 --- a/numass-main/src/main/java/inr/numass/NumassPlugin.java +++ b/numass-main/src/main/java/inr/numass/NumassPlugin.java @@ -35,6 +35,7 @@ import hep.dataforge.tables.XYAdapter; import inr.numass.actions.*; import inr.numass.models.*; import inr.numass.models.sterile.SterileNeutrinoSpectrum; +import inr.numass.tasks.*; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.util.FastMath; @@ -91,6 +92,14 @@ public class NumassPlugin extends BasicPlugin { actions.putAction(AdjustErrorsAction.class); actions.putAction(ShowEnergySpectrumAction.class); actions.putAction(SubstractSpectrumAction.class); + + actions.putTask(NumassPrepareTask.class); + actions.putTask(NumassTableFilterTask.class); + actions.putTask(NumassFitScanTask.class); + actions.putTask(NumassSubstractEmptySourceTask.class); + actions.putTask(NumassFitScanSummaryTask.class); + actions.putTask(NumassFitTask.class); + actions.putTask(NumassFitSummaryTask.class); } @Override