Fixed FX outupt
This commit is contained in:
parent
4a1752ca07
commit
1447ed5f70
@ -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<Storage>(null)
|
||||
|
||||
val serverManagerProperty = objectBinding(contextProperty) {
|
||||
context.optFeature(ServerManager::class.java).orElse(null)
|
||||
context.opt(ServerManager::class.java).orElse(null)
|
||||
}
|
||||
|
||||
val devices: ObservableList<Device> = FXCollections.observableArrayList();
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
)
|
||||
|
@ -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
|
||||
|
@ -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<String>) {
|
||||
Global.output = FXOutputManager()
|
||||
JFreeChartPlugin().startGlobal()
|
||||
NumassPlugin().startGlobal()
|
||||
|
||||
val cr = 30e3
|
||||
|
Loading…
Reference in New Issue
Block a user