Commit 6d57071c authored by mkomm's avatar mkomm
Browse files

update etaphi view to extended plugin system

parent 2abf9109
......@@ -52,7 +52,7 @@ class PXLBrowserExtension(AbstractExtension):
for plugin in pluginList:
instance = plugin()
#---------------------------------------------------------------------------------------------------for dev
if instance.getPluginName()=="ContainerView":
if instance.getPluginName()=="EtaPhiView":
logging.getLogger(__name__+".plugins").info("Load plugin config: "+plugin.__module__)
self.pluginConfigList.append(instance)
for jsfile in instance.getJSFiles():
......
......@@ -8,7 +8,7 @@ class PluginConfig(PXLBrowserPluginConfig):
return [os.path.join('ContainerView','controller.js')]
def getDescription(self):
return "Plugin for simple navigation in pxlio-file"
return "Plugin to display the data structure"
def getPluginName(self):
return "ContainerView"
......
import os
from vispa.extensions.pxlbrowser.plugins import PXLBrowserPluginConfig
class PluginConfig(PXLBrowserPluginConfig):
def __init__(self):
PXLBrowserPluginConfig.__init__(self)
@staticmethod
def getJSFiles():
return ['EtaPhiView/controller.js']
def getJSFiles(self):
return [os.path.join('EtaPhiView','controller.js')]
@staticmethod
def getDescription():
return "Plugin for simple navigation in pxlio-file"
def getDescription(self):
return "Plugin for 3d drawing of particle decays"
@staticmethod
def getName():
return "View.EtaPhi"
def getPluginName(self):
return "EtaPhiView"
@staticmethod
def getRemoteDirectory():
return os.path.join("plugins","EtaPhiView","remote")
def getRemoteDirectories(self):
return []
@staticmethod
def getControllerClass():
return "vispa.extensions.pxlbrowser.plugins.EtaPhiView.EtaPhiView.EtaPhiView"
\ No newline at end of file
def getCherrypyController(self):
return None
def getRemoteControllerClassString(self):
return None
\ No newline at end of file
......@@ -87,7 +87,9 @@ var EtaPhiView=PxlBrowserPlugin.extend({
this.dynamicContent=new THREE.Object3D();
this.scene.add(this.dynamicContent);
//----------------------------------------------------------------------------------
//generates some pseudo data
//----------------------------------------------------------------------------------
for (var cnt=0;cnt<40;++cnt) {
var eta = Math.random()*6-3;
var pt = Math.exp(-Math.random()*8)*150+1;
......@@ -210,7 +212,8 @@ var EtaPhiView=PxlBrowserPlugin.extend({
});
$(document).ready(function() {
StaticPxlBrowserPluginManager.registerPlugin({
name: "View.EtaPhi",
pluginname: "EtaPhiView",
modulename: "View.EtaPhi",
constructor: EtaPhiView,
isModule: true,
dependencies: ["Cache.Container", "Navigation"]
......
from vispa.extensions.pxlbrowser.plugins import *
class EtaPhiView(PXLBrowserPluginController):
def __init__(self,pxlioreader):
PXLBrowserPluginController.__init__(self,pxlioreader)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment