Skip to content

Commit

Permalink
rollback unnecessary changes (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan authored Jul 7, 2024
1 parent 3d45a5a commit f2a1ce5
Show file tree
Hide file tree
Showing 26 changed files with 61 additions and 85 deletions.
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger1m16vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger1m16vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger1m16vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [1065 , 1030], "uint16", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [1065 , 1030], "uint16", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger1m32vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger1m32vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger1m32vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [1065 , 1030], "uint32", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [1065 , 1030], "uint32", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger4m16vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger4m16vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger4m16vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [2167 , 2070], "uint16", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [2167 , 2070], "uint16", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger4m32vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger4m32vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger4m32vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [2167 , 2070], "uint32", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [2167 , 2070], "uint32", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger9m16vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger9m16vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger9m16vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [3269, 3110], "uint16", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [3269, 3110], "uint16", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eiger9m32vds_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger9m32vds_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eiger9m32vds_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [3269, 3110], "uint32", "$var.acq_modes")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter", True, [3269, 3110], "uint32", "$var.acq_modes")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
7 changes: 2 additions & 5 deletions nxstools/xmltemplates/eigerdectris_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
try:
import tango
except Exception:
import PyTango as tango
ds.result = tango.DeviceProxy("$(hostname)/$(device)").NbImages
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eigerdectris_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eigerdectris_triggermode_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_triggermode_cb">
<result name="result">
from nxstools.pyeval import eigerdectris
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages_cb, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter")
ds.result = eigerdectris.triggermode_cb(commonblock, "$(name)", ds.$(name)_triggermode, ds.$(name)_nbimages, "$(hostname)", "$(device)", "$var.filename", "$(name)_stepindex", "$var.entryname#'$(__entryname__)'$var.serialno", "$(__insname__)", "EigerDectris", "EigerFilewriter")
</result>
$datasources.$(name)_triggermode
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
9 changes: 9 additions & 0 deletions nxstools/xmltemplates/eigerdectrismesh_nbimages_cb.ds.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version='1.0'?>
<definition>
<datasource type="PYEVAL" name="$(name)_nbimages_cb">
<result name="result">
ds.result = ds.$(name)_nbimages
</result>
$datasources.$(name)_nbimages
</datasource>
</definition>
4 changes: 2 additions & 2 deletions nxstools/xmltemplates/eigerdectrismesh_stepindex.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<datasource type="PYEVAL" name="$(name)_stepindex">
<result name="result">
from nxstools.pyeval import common
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages_cb)
ds.result = common.blockitem_addint(commonblock, "$(name)_stepindex", ds.$(name)_nbimages)
ds.result = len(commonblock["$(name)_stepindex"])
</result>
$datasources.$(name)_nbimages_cb
$datasources.$(name)_nbimages
</datasource>
</definition>
6 changes: 1 addition & 5 deletions nxstools/xmltemplates/lambdavds_framenumbers_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
<datasource type="PYEVAL" name="$(name)_framenumbers_cb">
<result name="result">
from nxstools.pyeval import common
try:
import tango
except Exception:
import PyTango as tango
ds.result = common.blockitem_addint(commonblock, "$(name)_framenumbers", tango.DeviceProxy("$(hostname)/$(device)").FrameNumbers)
ds.result = common.blockitem_addint(commonblock, "$(name)_framenumbers", ds.$(name)_framenumbers)
</result>
$datasources.$(name)_framenumbers
</datasource>
Expand Down
6 changes: 1 addition & 5 deletions nxstools/xmltemplates/lambdavds_savefilename_cb.ds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
<datasource type="PYEVAL" name="$(name)_savefilename_cb">
<result name="result">
from nxstools.pyeval import common
try:
import tango
except Exception:
import PyTango as tango
ds.result = common.blockitem_add(commonblock, "$(name)_savefilename", tango.DeviceProxy("$(hostname)/$(device)").SaveFileName)
ds.result = common.blockitem_add(commonblock, "$(name)_savefilename", ds.$(name)_savefilename)
</result>
$datasources.$(name)_savefilename
</datasource>
Expand Down
16 changes: 6 additions & 10 deletions test/NXSCreateOnlineCPFS2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,9 @@ def test_onlinecp_eigerdectris_fileprefix(self):
' name="myeigerdectris_nbimages_cb"'
'>\n'
' <result name="result">\n'
'try:\n'
' import tango\n'
'except Exception:\n'
' import PyTango as tango\n'
'ds.result = tango.DeviceProxy('
'"haso000:10000/p09/eigerdectris/exp.01").NbImages\n'
'ds.result = ds.myeigerdectris_nbimages\n'
' </result>\n'
' $datasources.myeigerdectris_nbimages\n'
' </datasource>\n'
'</definition>\n',
'<?xml version=\'1.0\' encoding=\'utf8\'?>\n'
Expand Down Expand Up @@ -366,11 +362,11 @@ def test_onlinecp_eigerdectris_fileprefix(self):
'from nxstools.pyeval import common\n'
'ds.result = common.blockitem_addint('
'commonblock, "myeigerdectris_stepindex", '
'ds.myeigerdectris_nbimages_cb)\n'
'ds.myeigerdectris_nbimages)\n'
'ds.result = len(commonblock['
'"myeigerdectris_stepindex"])\n'
' </result>\n'
' $datasources.myeigerdectris_nbimages_cb\n'
' $datasources.myeigerdectris_nbimages\n'
' </datasource>\n'
'</definition>\n',
'<?xml version=\'1.0\' encoding=\'utf8\'?>\n'
Expand All @@ -394,7 +390,7 @@ def test_onlinecp_eigerdectris_fileprefix(self):
'commonblock,'
' "myeigerdectris",'
' ds.myeigerdectris_triggermode,'
' ds.myeigerdectris_nbimages_cb,'
' ds.myeigerdectris_nbimages,'
' "haso000:10000",'
' "p09/eigerdectris/exp.01",'
' "$var.filename",'
Expand All @@ -406,7 +402,7 @@ def test_onlinecp_eigerdectris_fileprefix(self):
')\n'
' </result>\n'
' $datasources.myeigerdectris_triggermode\n'
' $datasources.myeigerdectris_nbimages_cb\n'
' $datasources.myeigerdectris_nbimages\n'
' </datasource>\n'
'</definition>\n',
'<?xml version=\'1.0\' encoding=\'utf8\'?>\n'
Expand Down

0 comments on commit f2a1ce5

Please sign in to comment.