Plugins have immutable configuration
This commit is contained in:
parent
dc27bbb659
commit
8ddf4a30f3
@ -10,7 +10,6 @@ import inr.numass.models.sterile.NumassResolution
|
|||||||
import inr.numass.models.sterile.SterileNeutrinoSpectrum
|
import inr.numass.models.sterile.SterileNeutrinoSpectrum
|
||||||
|
|
||||||
import static hep.dataforge.grind.Grind.buildMeta
|
import static hep.dataforge.grind.Grind.buildMeta
|
||||||
import static hep.dataforge.grind.Grind.morph
|
|
||||||
|
|
||||||
Context ctx = Global.instance()
|
Context ctx = Global.instance()
|
||||||
ctx.getPluginManager().load(FXPlotManager)
|
ctx.getPluginManager().load(FXPlotManager)
|
||||||
@ -22,7 +21,7 @@ shell.eval {
|
|||||||
PlotHelper plot = plots
|
PlotHelper plot = plots
|
||||||
|
|
||||||
|
|
||||||
ParamSet params = morph(ParamSet,[:], "params") {
|
ParamSet params = new ParamSet(buildMeta {
|
||||||
N(value: 2.7e+06, err: 30, lower: 0)
|
N(value: 2.7e+06, err: 30, lower: 0)
|
||||||
bkg(value: 5.0, err: 0.1)
|
bkg(value: 5.0, err: 0.1)
|
||||||
E0(value: 18575.0, err: 0.1)
|
E0(value: 18575.0, err: 0.1)
|
||||||
@ -31,7 +30,7 @@ shell.eval {
|
|||||||
U2(value: 0.0, err: 1e-3)
|
U2(value: 0.0, err: 1e-3)
|
||||||
X(value: 0.0, err: 0.01, lower: 0)
|
X(value: 0.0, err: 0.01, lower: 0)
|
||||||
trap(value: 1.0, err: 0.05)
|
trap(value: 1.0, err: 0.05)
|
||||||
}
|
})
|
||||||
|
|
||||||
def meta1 = buildMeta {
|
def meta1 = buildMeta {
|
||||||
resolution(width: 8.3e-5, tail: "(0.99797 - 3.05346E-7*D - 5.45738E-10 * D**2 - 6.36105E-14 * D**3)")
|
resolution(width: 8.3e-5, tail: "(0.99797 - 3.05346E-7*D - 5.45738E-10 * D**2 - 6.36105E-14 * D**3)")
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
package inr.numass
|
package inr.numass
|
||||||
|
|
||||||
import hep.dataforge.actions.ActionManager
|
import hep.dataforge.actions.ActionManager
|
||||||
import hep.dataforge.context.BasicPlugin
|
import hep.dataforge.context.*
|
||||||
import hep.dataforge.context.Context
|
|
||||||
import hep.dataforge.context.PluginDef
|
|
||||||
import hep.dataforge.fx.FXPlugin
|
import hep.dataforge.fx.FXPlugin
|
||||||
import hep.dataforge.fx.plots.PlotContainer
|
import hep.dataforge.fx.plots.PlotContainer
|
||||||
import hep.dataforge.maths.MathPlugin
|
import hep.dataforge.maths.MathPlugin
|
||||||
@ -267,6 +265,17 @@ class NumassPlugin : BasicPlugin() {
|
|||||||
Adapters.buildXYAdapter(NumassPoint.HV_KEY, NumassAnalyzer.COUNT_RATE_KEY, NumassAnalyzer.COUNT_RATE_ERROR_KEY)
|
Adapters.buildXYAdapter(NumassPoint.HV_KEY, NumassAnalyzer.COUNT_RATE_KEY, NumassAnalyzer.COUNT_RATE_ERROR_KEY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Factory : PluginFactory {
|
||||||
|
|
||||||
|
override fun getTag(): PluginTag {
|
||||||
|
return Plugin.resolveTag(NumassPlugin::class.java)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun build(meta: Meta): Plugin {
|
||||||
|
return NumassPlugin()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1 +0,0 @@
|
|||||||
inr.numass.NumassPlugin
|
|
@ -0,0 +1 @@
|
|||||||
|
inr.numass.NumassPlugin$Factory
|
Loading…
Reference in New Issue
Block a user