This commit is contained in:
@@ -1,39 +1,16 @@
|
||||
tutorial_path = "src/main/assembly/help/Tutorial_py/"
|
||||
run(tutorial_path+"SimulatedDevices")
|
||||
|
||||
|
||||
import ch.psi.pshell.data.LayoutDefault
|
||||
class LayoutParallelScan(ch.psi.pshell.data.LayoutDefault):
|
||||
class MyLayout(ch.psi.pshell.data.LayoutDefault):
|
||||
def getDefaultGroup(self, scan):
|
||||
return scan.readables[0].name
|
||||
return str("test")
|
||||
|
||||
get_context().dataManager.setLayout(MyLayout())
|
||||
|
||||
#get_context().pluginManager.addDynamicClass(LayoutParallel().getClass())
|
||||
tscan (sin,10,0.1)
|
||||
writer = get_context().dataManager.provider.writer
|
||||
o=writer.object()
|
||||
o.createSoftLink("/test/sin", "/data/data1")
|
||||
o.createHardLink("/test/sin", "/data/data2")
|
||||
|
||||
|
||||
#Does not work
|
||||
#lay = LayoutParallelScan().getClass()
|
||||
##print lay
|
||||
#cls = Class.forName(lay.getCanonicalName(), True, lay.getClassLoader())
|
||||
#3print cls
|
||||
#set_exec_pars(layout = "org.python.proxies.__main__$LayoutParallelScan$25")
|
||||
|
||||
|
||||
|
||||
#Must restore the layout
|
||||
#get_context().dataManager.setLayout(LayoutParallelScan())
|
||||
|
||||
set_exec_pars(layout = "Table")
|
||||
|
||||
|
||||
|
||||
def scan1():
|
||||
print "scan1"
|
||||
return lscan(ao1, ai1, 0, 40, 20, 0.1, title = "scan1")
|
||||
|
||||
def scan2():
|
||||
print "scan2"
|
||||
return lscan(ao2, ai2, 0, 40, 20, 0.1, title = "scan2")
|
||||
|
||||
|
||||
parallelize(scan1, scan2)
|
||||
o.createSoftLink("/test", "/link1") #Not supported
|
||||
o.createHardLink("/test", "/link2")
|
||||
Reference in New Issue
Block a user