diff --git a/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt b/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt index 26d7e112..a41b8f8d 100644 --- a/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt +++ b/numass-control/control-room/src/main/kotlin/inr/numass/control/BoardController.kt @@ -17,7 +17,6 @@ import javafx.beans.property.SimpleObjectProperty import javafx.collections.FXCollections import javafx.collections.ObservableList import tornadofx.* -import kotlin.streams.toList /** * Created by darksnake on 12-May-17. @@ -31,7 +30,7 @@ class BoardController() : Controller(), AutoCloseable { val storageProperty = SimpleObjectProperty(null) val serverManagerProperty = objectBinding(contextProperty) { - context.optFeature(ServerManager::class.java).orElse(null) + context.opt(ServerManager::class.java).orElse(null) } val devices: ObservableList = FXCollections.observableArrayList(); diff --git a/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt b/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt index 080dba53..23fcd4e6 100644 --- a/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt +++ b/numass-control/src/main/kotlin/inr/numass/control/NumassControlUtils.kt @@ -57,7 +57,7 @@ fun connectStorage(device: Device, config: Meta) { } fun readResourceMeta(path: String): Meta { - val resource = Global.optResource(path).nullable + val resource = Global.getResource(path) if (resource != null) { return XMLMetaReader().read(resource.stream) } else { diff --git a/numass-main/src/main/kotlin/inr/numass/NumassPlugin.kt b/numass-main/src/main/kotlin/inr/numass/NumassPlugin.kt index 8bca4b37..28b42a44 100644 --- a/numass-main/src/main/kotlin/inr/numass/NumassPlugin.kt +++ b/numass-main/src/main/kotlin/inr/numass/NumassPlugin.kt @@ -43,7 +43,7 @@ import org.apache.commons.math3.util.FastMath @PluginDef( group = "inr.numass", name = "numass", - dependsOn = arrayOf("hep.dataforge:functions", "hep.dataforge:MINUIT", "hep.dataforge:actions", "hep.dataforge:output.dir"), + dependsOn = arrayOf("hep.dataforge:functions", "hep.dataforge:MINUIT", "hep.dataforge:actions"), support = false, info = "Numass data analysis tools" ) diff --git a/numass-main/src/main/kotlin/inr/numass/NumassUtils.kt b/numass-main/src/main/kotlin/inr/numass/NumassUtils.kt index b744f07a..2bdc939d 100644 --- a/numass-main/src/main/kotlin/inr/numass/NumassUtils.kt +++ b/numass-main/src/main/kotlin/inr/numass/NumassUtils.kt @@ -25,7 +25,6 @@ import hep.dataforge.io.envelopes.Envelope import hep.dataforge.io.envelopes.EnvelopeBuilder import hep.dataforge.io.envelopes.TaglessEnvelopeType import hep.dataforge.io.output.StreamOutput -import hep.dataforge.kodex.nullable import hep.dataforge.meta.Meta import hep.dataforge.meta.MetaBuilder import hep.dataforge.plots.jfreechart.JFreeChartFrame @@ -178,7 +177,7 @@ fun getFSS(context: Context, meta: Meta): FSS? { return if (meta.getBoolean("useFSS", true)) { val fssBinary: Binary? = meta.optString("fssFile") .map { fssFile -> context.getFile(fssFile).binary } - .orElse(context.optResource("data/FS.txt").nullable) + .orElse(context.getResource("data/FS.txt")) fssBinary?.let { FSS(it.stream) } ?: throw RuntimeException("Could not load FSS file") } else { null diff --git a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt index b0c1bf8f..9e5e8cee 100644 --- a/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt +++ b/numass-main/src/main/kotlin/inr/numass/scripts/timeanalysis/TestAnalyzer.kt @@ -1,11 +1,13 @@ package inr.numass.scripts.timeanalysis import hep.dataforge.context.Global +import hep.dataforge.fx.output.FXOutputManager import hep.dataforge.kodex.buildMeta import hep.dataforge.kodex.coroutineContext import hep.dataforge.kodex.generate import hep.dataforge.kodex.join import hep.dataforge.maths.chain.MarkovChain +import hep.dataforge.plots.jfreechart.JFreeChartPlugin import inr.numass.NumassPlugin import inr.numass.actions.TimeAnalyzerAction import inr.numass.data.analyzers.TimeAnalyzer @@ -18,6 +20,8 @@ import java.lang.Math.exp import java.time.Instant fun main(args: Array) { + Global.output = FXOutputManager() + JFreeChartPlugin().startGlobal() NumassPlugin().startGlobal() val cr = 30e3