From 18cc9112b57db51e86e6cb98161cb6b0c21ff840 Mon Sep 17 00:00:00 2001 From: darksnake Date: Tue, 18 Apr 2017 11:28:25 +0300 Subject: [PATCH] Fixed plugin loading bug --- numass-main/build.gradle | 9 ++++++++ .../src/main/groovy/inr/numass/RunTask.groovy | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 numass-main/src/main/groovy/inr/numass/RunTask.groovy diff --git a/numass-main/build.gradle b/numass-main/build.gradle index ea851034..7d61967e 100644 --- a/numass-main/build.gradle +++ b/numass-main/build.gradle @@ -36,6 +36,15 @@ task repl(dependsOn: classes, type: JavaExec) { } } +task grindTask(dependsOn: classes, type: JavaExec){ + group "numass" + main 'inr.numass.RunTask' + classpath = sourceSets.main.runtimeClasspath + description "Run a task in a numass workspace" + standardInput = System.in + standardOutput = System.out +} + task simulate(dependsOn: classes, type: JavaExec) { group "numass" main 'inr.numass.scripts.Simulate' diff --git a/numass-main/src/main/groovy/inr/numass/RunTask.groovy b/numass-main/src/main/groovy/inr/numass/RunTask.groovy new file mode 100644 index 00000000..c0a10980 --- /dev/null +++ b/numass-main/src/main/groovy/inr/numass/RunTask.groovy @@ -0,0 +1,23 @@ +package inr.numass + +import hep.dataforge.grind.GrindWorkspaceBuilder +import inr.numass.tasks.* + +/** + * Created by darksnake on 18-Apr-17. + */ + + +cfgPath = "D:\\Work\\Numass\\sterile2016_10\\workspace.groovy" + +GrindWorkspaceBuilder numass = new GrindWorkspaceBuilder().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) +} + +numass.scansum "fill_1" \ No newline at end of file