From efc6a5bb8b8e27fa07ff0d87e425fd5f22bd1356 Mon Sep 17 00:00:00 2001 From: darksnake Date: Wed, 7 Sep 2016 16:48:25 +0300 Subject: [PATCH] Descriptor fixes --- .../src/main/groovy/inr/numass/LaunchGrindShell.groovy | 5 +---- .../java/inr/numass/workspace/NumassPrepareTask.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy index 0f7828da..6b3c1dca 100644 --- a/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy +++ b/numass-main/src/main/groovy/inr/numass/LaunchGrindShell.groovy @@ -2,17 +2,14 @@ package inr.numass import hep.dataforge.grind.GrindLauncher import hep.dataforge.grind.GrindShell -import hep.dataforge.workspace.Workspace /** * Created by darksnake on 29-Aug-16. */ new GrindShell().start { - Workspace numass = new GrindLauncher() + GrindLauncher numass = new GrindLauncher() .withSpec(NumassWorkspaceSpec) .from(new File("D:\\Work\\Numass\\sterile2016\\workspace.groovy")) - .buildWorkspace() - setContext(numass.getContext()) bind("numass", numass) } \ No newline at end of file diff --git a/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java b/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java index 7835b58e..ef8de10a 100644 --- a/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java +++ b/numass-main/src/main/java/inr/numass/workspace/NumassPrepareTask.java @@ -9,6 +9,8 @@ import hep.dataforge.actions.Action; import hep.dataforge.computation.ProgressCallback; import hep.dataforge.context.Context; import hep.dataforge.data.*; +import hep.dataforge.description.DescriptorBuilder; +import hep.dataforge.description.NodeDescriptor; import hep.dataforge.meta.Meta; import hep.dataforge.meta.MetaBuilder; import hep.dataforge.meta.Template; @@ -166,4 +168,12 @@ public class NumassPrepareTask extends AbstractTask { return "numass.prepare"; } + @Override + public NodeDescriptor getDescriptor() { + return new DescriptorBuilder(getName()) + .addNode("prepare", PrepareDataAction.class) + .addNode("monitor", MonitorCorrectAction.class) + .addNode("merge", MergeDataAction.class) + .build(); + } }