sardana-nxsrecorder 3.30.0__tar.gz → 3.33.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/install.sh +8 -8
  2. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.github/workflows/tests.yml +3 -28
  3. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/ChangeLog +16 -0
  4. {sardana-nxsrecorder-3.30.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.33.0}/PKG-INFO +5 -4
  5. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/README.rst +4 -3
  6. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0/sardana_nxsrecorder.egg-info}/PKG-INFO +5 -4
  7. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardananxsrecorder/__init__.py +1 -1
  8. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardananxsrecorder/nxsrecorder.py +176 -38
  9. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian10_py2/Dockerfile +0 -0
  10. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian10_py3/Dockerfile +0 -0
  11. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian8_py2/Dockerfile +0 -0
  12. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian8_py3/Dockerfile +0 -0
  13. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian9_py2/Dockerfile +0 -0
  14. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/debian9_py3/Dockerfile +0 -0
  15. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/run.sh +0 -0
  16. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
  17. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
  18. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
  19. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
  20. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
  21. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.flake8 +0 -0
  22. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/.gitignore +0 -0
  23. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/COPYRIGHT +0 -0
  24. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/MANIFEST.in +0 -0
  25. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/doc/Makefile +0 -0
  26. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/doc/conf.py +0 -0
  27. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/doc/index.rst +0 -0
  28. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/doc/make.bat +0 -0
  29. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/doc/sardananxsrecorder.rst +0 -0
  30. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/man/sardananxsrecorder.1 +0 -0
  31. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
  32. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
  33. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
  34. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
  35. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
  36. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/setup.cfg +0 -0
  37. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/setup.py +0 -0
  38. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/test/__init__.py +0 -0
  39. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/test/__main__.py +0 -0
  40. {sardana-nxsrecorder-3.30.0 → sardana-nxsrecorder-3.33.0}/test/main.py +0 -0
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  # workaround for a bug in debian9, i.e. starting mysql hangs
4
- if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ]; then
4
+ if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian13" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ]; then
5
5
  docker exec --user root ndts service mariadb restart
6
6
  else
7
7
  docker exec --user root ndts service mysql stop
@@ -16,7 +16,7 @@ fi
16
16
 
17
17
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y xvfb libxcb1 libx11-xcb1 libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-render-util0 xkb-data tango-common; sleep 10'
18
18
  if [ "$?" -ne "0" ]; then exit 255; fi
19
- if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ]; then
19
+ if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ]; then
20
20
  # docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
21
21
  docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
22
22
  docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=localhost\npassword=rootpw" > /var/lib/tango/.my.cnf'
@@ -32,7 +32,7 @@ fi
32
32
  echo "install tango-db"
33
33
  docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-db; sleep 10'
34
34
  if [ "$?" -ne "0" ]; then exit 255; fi
35
- if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ]; then
35
+ if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ]; then
36
36
  docker exec --user tango ndts /usr/bin/mysql -e 'create database tango'
37
37
  docker exec --user tango ndts /bin/bash -c '/usr/bin/mysql tango < /usr/share/dbconfig-common/data/tango-db/install/mysql'
38
38
  fi
@@ -67,20 +67,20 @@ else
67
67
  docker exec --user root ndts /bin/bash -c 'cd itango-src; git checkout tags/v0.1.7 -b b0.1.7; python3 setup.py install'
68
68
  # docker exec --user root ndts /bin/bash -c 'cd taurus-src; git checkout; python3 setup.py install'
69
69
  fi
70
- if [ "$1" = "debian10" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] ; then
70
+ if [ "$1" = "debian10" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian13" ] ; then
71
71
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y git python3-six python3-numpy graphviz python3-sphinx g++ build-essential python3-dev pkg-config python3-all-dev python3-setuptools libtango-dev python3-setuptools python3-tango python3-tz; apt-get -qq install -y nxsconfigserver-db; sleep 10'
72
72
  else
73
73
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y git python3-six python3-numpy graphviz python3-sphinx g++ build-essential python3-dev pkg-config python3-all-dev python3-setuptools libtango-dev python3-setuptools python3-pytango python3-tz; apt-get -qq install -y nxsconfigserver-db; sleep 10'
74
74
  fi
75
75
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y libboost-python-dev libboost-dev python3-h5py python3-qtpy python3-click python3-setuptools python3-pint'
76
- if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu22.04" ]|| [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian10" ]; then
76
+ if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu22.04" ]|| [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] [ "$1" = "debian13" ] || [ "$1" = "debian10" ]; then
77
77
  echo " "
78
78
  else
79
79
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get install -y libtango-dev python3-dev'
80
80
  docker exec --user root ndts /bin/bash -c 'git clone https://gitlab.com/tango-controls/pytango pytango; cd pytango; git checkout tags/v9.2.5 -b b9.2.5'
81
81
  docker exec --user root ndts /bin/bash -c 'cd pytango; python3 setup.py install'
82
82
  fi
83
- if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ]; then
83
+ if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ]; then
84
84
  docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"%" identified by "rootpw"'
85
85
  docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"localhost" identified by "rootpw"'
86
86
  docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
@@ -91,7 +91,7 @@ fi
91
91
  if [ "$?" -ne "0" ]; then exit 255; fi
92
92
 
93
93
  echo "install qt5"
94
- if [ "$1" = "debian12" ] ||[ "$1" = "debian11" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ]; then
94
+ if [ "$1" = "debian12" ] || [ "$1" = "debian13" ] || [ "$1" = "debian11" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ]; then
95
95
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y qtbase5-dev-tools'
96
96
  else
97
97
  docker exec --user root ndts /bin/bash -c 'export DEBIAN_FRONTEND=noninteractive; apt-get -qq update; apt-get -qq install -y qtbase5-dev-tools qt5-default'
@@ -105,7 +105,7 @@ if [ "$2" = "2" ]; then
105
105
  echo "install pytango and nxsconfigserver-db"
106
106
  docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get install -y python-pytango nxsconfigserver-db ; sleep 10'
107
107
  else
108
- if [ "$1" = "debian10" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] ; then
108
+ if [ "$1" = "debian10" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu25.04" ] || [ "$1" = "ubuntu25.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "debian13" ] ; then
109
109
  echo "install pytango"
110
110
  docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get install -y python3-tango'
111
111
  echo "install nxsconfigserver-db"
@@ -24,7 +24,7 @@ jobs:
24
24
  runs-on: ubuntu-latest
25
25
  strategy:
26
26
  matrix:
27
- os: [debian12, debian11, debian10, ubuntu25.04, ubuntu24.04, ubuntu22.04]
27
+ os: [debian13, debian12, debian11, ubuntu25.10, ubuntu24.04, ubuntu22.04]
28
28
  steps:
29
29
  - uses: actions/checkout@v2
30
30
  - uses: actions/setup-python@v2
@@ -45,31 +45,6 @@ jobs:
45
45
  - name: run tests
46
46
  run: .ci/run.sh 3
47
47
  - name: Stop the docker
48
- run: docker container stop ndts
49
-
50
- python2_tests:
51
- runs-on: ubuntu-latest
52
- strategy:
53
- matrix:
54
- os: [debian10]
55
- steps:
56
- - uses: actions/checkout@v2
57
- - uses: actions/setup-python@v2
58
- - name: Update bash files
59
48
  run: |
60
- chmod +x .ci/run.sh
61
- chmod +x .ci/install.sh
62
- - name: Build the docker
63
- env:
64
- OS: ${{ matrix.os }}
65
- run: docker build -t ndts .ci/${OS}_py2
66
- - name: Run the docker
67
- run: docker run --name ndts -d -it -v `pwd`:/home/tango ndts
68
- - name: install tango
69
- env:
70
- OS: ${{ matrix.os }}
71
- run: .ci/install.sh ${OS} 2
72
- - name: run tests
73
- run: .ci/run.sh 2
74
- - name: Stop the docker
75
- run: docker container stop ndts
49
+ docker exec --user root ndts /bin/bash -c "chown -R 1001 /home/tango "
50
+ docker container stop ndts
@@ -1,3 +1,19 @@
1
+ 2026-02-05 Jan Kotanski <jankotan@gmail.com>
2
+ * skip cached init datasource for dynamic component (#170)
3
+ * tagged as 3.33.0
4
+
5
+ 2026-01-21 Jan Kotanski <jankotan@gmail.com>
6
+ * update configuration cache when profile created outside the nxselector #167
7
+ * tagged as 3.32.0
8
+
9
+ 2026-01-16 Jan Kotanski <jankotan@gmail.com>
10
+ * add support for cache configuration
11
+ * tagged as 3.31.0
12
+
13
+ 2026-01-13 Jan Kotanski <jankotan@gmail.com>
14
+ * add debug info
15
+ * tagged as 3.30.1
16
+
1
17
  2025-07-29 Jan Kotanski <jankotan@gmail.com>
2
18
  * add support for tango datasources from defmeas macro (#155)
3
19
  * tagged as 3.30.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.30.0
3
+ Version: 3.33.0
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -85,21 +85,22 @@ defining the package location, e.g.
85
85
  Debian packages
86
86
  """""""""""""""
87
87
 
88
- Debian Bookworm, Bullseye, Buster and Ubuntu Oracular, Noble Jammy packages can be found in the HDRI repository.
88
+ Debian Trixie, Bookworm, Bullseye and Ubuntu Questing, Noble Jammy packages can be found in the HDRI repository.
89
89
 
90
90
  To install the debian packages, add the PGP repository key
91
91
 
92
92
  .. code-block:: console
93
93
 
94
94
  $ sudo su
95
- $ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
95
+ $ curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
96
+ $ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg
96
97
 
97
98
  and then download the corresponding source list
98
99
 
99
100
  .. code-block:: console
100
101
 
101
102
  $ cd /etc/apt/sources.list.d
102
- $ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list
103
+ $ wget http://repos.pni-hdri.de/trixie-pni-hdri.sources
103
104
 
104
105
 
105
106
  Finally, for python2.7
@@ -60,21 +60,22 @@ defining the package location, e.g.
60
60
  Debian packages
61
61
  """""""""""""""
62
62
 
63
- Debian Bookworm, Bullseye, Buster and Ubuntu Oracular, Noble Jammy packages can be found in the HDRI repository.
63
+ Debian Trixie, Bookworm, Bullseye and Ubuntu Questing, Noble Jammy packages can be found in the HDRI repository.
64
64
 
65
65
  To install the debian packages, add the PGP repository key
66
66
 
67
67
  .. code-block:: console
68
68
 
69
69
  $ sudo su
70
- $ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
70
+ $ curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
71
+ $ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg
71
72
 
72
73
  and then download the corresponding source list
73
74
 
74
75
  .. code-block:: console
75
76
 
76
77
  $ cd /etc/apt/sources.list.d
77
- $ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list
78
+ $ wget http://repos.pni-hdri.de/trixie-pni-hdri.sources
78
79
 
79
80
 
80
81
  Finally, for python2.7
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.30.0
3
+ Version: 3.33.0
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -85,21 +85,22 @@ defining the package location, e.g.
85
85
  Debian packages
86
86
  """""""""""""""
87
87
 
88
- Debian Bookworm, Bullseye, Buster and Ubuntu Oracular, Noble Jammy packages can be found in the HDRI repository.
88
+ Debian Trixie, Bookworm, Bullseye and Ubuntu Questing, Noble Jammy packages can be found in the HDRI repository.
89
89
 
90
90
  To install the debian packages, add the PGP repository key
91
91
 
92
92
  .. code-block:: console
93
93
 
94
94
  $ sudo su
95
- $ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
95
+ $ curl -s http://repos.pni-hdri.de/debian_repo.pub.gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-hdri-repo.gpg --import
96
+ $ chmod 644 /etc/apt/trusted.gpg.d/debian-hdri-repo.gpg
96
97
 
97
98
  and then download the corresponding source list
98
99
 
99
100
  .. code-block:: console
100
101
 
101
102
  $ cd /etc/apt/sources.list.d
102
- $ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list
103
+ $ wget http://repos.pni-hdri.de/trixie-pni-hdri.sources
103
104
 
104
105
 
105
106
  Finally, for python2.7
@@ -20,4 +20,4 @@
20
20
  """ Sardana Scan Recorders """
21
21
 
22
22
  #: package version
23
- __version__ = "3.30.0"
23
+ __version__ = "3.33.0"
@@ -99,6 +99,7 @@ class NXS_FileRecorder(BaseFileRecorder):
99
99
  :type macro: :class:`sardana.macroserver.macro.Macro`
100
100
  """
101
101
  BaseFileRecorder.__init__(self)
102
+ self.debug('__init__: Init NXS_FileRecorder: %s' % str(filename))
102
103
  #: (:obj:`str`) base filename
103
104
  self.__base_filename = filename
104
105
  #: (:obj:`str`) raw filename
@@ -116,7 +117,8 @@ class NXS_FileRecorder(BaseFileRecorder):
116
117
  self.__nexussettings_device = None
117
118
 
118
119
  #: (:obj:`int`) device proxy timeout
119
- self.__timeout = 100000
120
+ # self.__timeout = 100000
121
+ self.__timeout = 10000000
120
122
  #: (:obj:`dict` <:obj:`str`, :obj:`list` <:obj:`str`>
121
123
  #: or :obj:`dict` <:obj:`str` , `any`> > ) Custom variables
122
124
  self.__vars = {"data": {},
@@ -132,6 +134,8 @@ class NXS_FileRecorder(BaseFileRecorder):
132
134
 
133
135
  #: (:obj:`str`) dynamic components
134
136
  self.__dynamicCP = "__dynamic_component__"
137
+ #: (:obj:`str`) cache component prefix
138
+ self.__cacheCPPrefix = "__configuration_"
135
139
 
136
140
  #: (:obj:`dict` <:obj:`str` , `any`> ) environment
137
141
  self.__env = macro.getAllEnv() if macro else {}
@@ -167,13 +171,17 @@ class NXS_FileRecorder(BaseFileRecorder):
167
171
  #: (:obj:`bool`) external measurement group
168
172
  self.__oddmntgrp = False
169
173
 
174
+ self.debug('__init__: Set NeXus: %s' % str(filename))
170
175
  self.__setNexusDevices(onlyconfig=True)
171
176
 
177
+ self.debug('__init__: Set Append Entry: %s' % str(filename))
172
178
  appendentry = self.__getConfVar("AppendEntry", True)
173
179
  scanID = self.__env["ScanID"] \
174
180
  if "ScanID" in self.__env.keys() else -1
181
+ self.debug('__init__: Set FileName: %s' % str(filename))
175
182
  self.__setFileName(
176
183
  self.__base_filename, not appendentry, scanID)
184
+ self.debug('__init__: Done: %s' % str(filename))
177
185
 
178
186
  def _serial(self, scanID):
179
187
  serial = None
@@ -411,7 +419,8 @@ class NXS_FileRecorder(BaseFileRecorder):
411
419
  subs = False
412
420
  if not self.__raw_filename:
413
421
  self.__raw_filename = self.__rawfilename(self.__serial)
414
- self.debug('Raw Filename: %s' % str(self.__raw_filename))
422
+ self.debug('__setFileName: '
423
+ 'Raw Filename: %s' % str(self.__raw_filename))
415
424
  if not subs and self.__raw_filename and \
416
425
  "{ScanID" in self.__raw_filename:
417
426
  try:
@@ -453,6 +462,9 @@ class NXS_FileRecorder(BaseFileRecorder):
453
462
  profile configuration of NXSRecSelector
454
463
  :type onlyconfig: :obj:`bool`
455
464
  """
465
+ self.debug(
466
+ '__setNexusDevices: NXSRecSelector: %s'
467
+ % str(self.__raw_filename))
456
468
  vl = self.__getEnvVar("NeXusSelectorDevice", None)
457
469
  if vl is None:
458
470
  servers = self.__db.get_device_exported_for_class(
@@ -474,6 +486,8 @@ class NXS_FileRecorder(BaseFileRecorder):
474
486
  "Cannot connect to '%s'" % servers[0])
475
487
  else:
476
488
  self.__nexussettings_device = None
489
+ self.debug('__setNexusDevices: import profile: %s'
490
+ % str(self.__raw_filename))
477
491
  if self.__nexussettings_device is None:
478
492
  from nxsrecconfig import Settings
479
493
  self.__nexussettings_device = Settings.Settings()
@@ -483,10 +497,13 @@ class NXS_FileRecorder(BaseFileRecorder):
483
497
  raise Exception("NXSRecSelector (%s) version below 2.0.0" %
484
498
  (servers[0] if servers else "module"))
485
499
 
500
+ self.debug('__setNexusDevices: set MG: %s' % str(self.__raw_filename))
486
501
  mntgrp = self.__getServerVar("mntGrp", None)
487
502
  amntgrp = self.__getEnvVar("ActiveMntGrp", None)
488
503
  if mntgrp and amntgrp != mntgrp:
489
504
  self.__nexussettings_device.mntgrp = amntgrp
505
+ self.debug('__setNexusDevices: list profile: %s'
506
+ % str(self.__raw_filename))
490
507
  if amntgrp not in self.__command(
491
508
  self.__nexussettings_device, "availableProfiles"):
492
509
  if onlyconfig:
@@ -507,15 +524,29 @@ class NXS_FileRecorder(BaseFileRecorder):
507
524
  self.info(
508
525
  "NXS_FileRecorer: descriptive components will be reset")
509
526
  else:
527
+ self.debug('__setNexusDevices: fetch profile: %s'
528
+ % str(self.__raw_filename))
510
529
  self.__command(self.__nexussettings_device, "fetchProfile")
530
+ self.debug('__setNexusDevices: reset profile: %s'
531
+ % str(self.__raw_filename))
511
532
  self.__asynchcommand(self.__nexussettings_device,
512
533
  "resetPreselectedComponents")
534
+ self.debug('__setNexusDevices: reset profile Done: %s'
535
+ % str(self.__raw_filename))
513
536
  self.__oddmntgrp = True
514
537
  else:
538
+ self.debug('__setNexusDevices: '
539
+ 'fetch profile 2: %s' % str(self.__raw_filename))
515
540
  self.__command(self.__nexussettings_device, "fetchProfile")
541
+ self.debug('__setNexusDevices: fetch profile 2 Done: %s' %
542
+ str(self.__raw_filename))
516
543
  self.__vars["vars"]["measurement_group"] = amntgrp
517
544
 
545
+ self.debug('__setNexusDevices: '
546
+ 'profile config: %s' % str(self.__raw_filename))
518
547
  self.__conf = self.__getServerVar("profileConfiguration", {}, True)
548
+ self.debug('__setNexusDevices: '
549
+ 'MG config: %s' % str(self.__raw_filename))
519
550
  if not self.__oddmntgrp and not onlyconfig:
520
551
  if "MntGrpConfiguration" in self.__conf.keys():
521
552
  poolmg = self.__command(
@@ -525,16 +556,27 @@ class NXS_FileRecorder(BaseFileRecorder):
525
556
  poolmg = None
526
557
  profmg = None
527
558
  if not poolmg or not profmg or poolmg != profmg:
528
- self.debug(
529
- "ActiveMntGrp created outside NXSRecSelector v3. "
530
- "Updating ActiveMntGrp")
559
+ self.debug("__setNexusDevices: "
560
+ "ActiveMntGrp created outside NXSRecSelector v3. "
561
+ "Updating ActiveMntGrp")
531
562
  if self.__macro:
532
563
  self.__macro().debug(
533
564
  "ActiveMntGrp created outside NXSRecSelector v3. "
534
565
  "Updating ActiveMntGrp")
535
566
  self.__command(self.__nexussettings_device, "importMntGrp")
536
567
  self.__command(self.__nexussettings_device, "updateMntGrp")
537
-
568
+ if hasattr(self.__nexussettings_device, "cachecomponent"):
569
+ ccomp = self.__nexussettings_device.cachecomponent
570
+ if ccomp:
571
+ self.debug('__setNexusDevices: '
572
+ 'Cache Writer Configuration: %s'
573
+ % str(ccomp))
574
+ self.__command(
575
+ self.__nexussettings_device,
576
+ "cacheWriterConfiguration", [])
577
+
578
+ self.debug('__setNexusDevices: '
579
+ 'Writer Device: %s' % str(self.__raw_filename))
538
580
  if not onlyconfig:
539
581
  vl = self.__getConfVar("WriterDevice", None)
540
582
  if not vl:
@@ -560,6 +602,8 @@ class NXS_FileRecorder(BaseFileRecorder):
560
602
  else:
561
603
  self.__nexuswriter_device = None
562
604
 
605
+ self.debug('__setNexusDevices: Writer Device Properties: %s'
606
+ % str(self.__raw_filename))
563
607
  if self.__nexuswriter_device is None:
564
608
  from nxswriter import TangoDataWriter
565
609
  self.__nexuswriter_device = TangoDataWriter.TangoDataWriter()
@@ -575,6 +619,7 @@ class NXS_FileRecorder(BaseFileRecorder):
575
619
  for ky, vl in properties.items():
576
620
  if hasattr(self.__nexuswriter_device, ky):
577
621
  setattr(self.__nexuswriter_device, ky, vl)
622
+ self.debug('__setNexusDevices: End: %s' % str(self.__raw_filename))
578
623
 
579
624
  def __get_alias(self, name):
580
625
  """ provides a device alias
@@ -669,9 +714,9 @@ class NXS_FileRecorder(BaseFileRecorder):
669
714
  :param nexuscomponents: nexus component list
670
715
  :type nexuscomponents: :obj:`list` <:obj:`str`>
671
716
  """
672
- self.debug("Step DSs: %s" % dss)
673
- self.debug("Init DSs: %s" % keys)
674
- self.debug("Init User Data: %s" % udata)
717
+ self.debug("__createDynamicComponent: Step DSs: %s" % dss)
718
+ self.debug("__createDynamicComponent: Init DSs: %s" % keys)
719
+ self.debug("__createDynamicComponent: Init User Data: %s" % udata)
675
720
  envRec = self.recordlist.getEnviron()
676
721
  lddict = []
677
722
  tdss = [ds for ds in dss if not ds.startswith("tango://")
@@ -718,12 +763,13 @@ class NXS_FileRecorder(BaseFileRecorder):
718
763
  if fld and att:
719
764
  if fld in fields.keys():
720
765
  fields[fld][att] = vl
721
- else:
722
- fields[fld] = {
723
- "name": fld,
724
- "dtype": "string",
725
- "shape": tuple(),
726
- att: vl}
766
+ # else:
767
+ # fields[fld] = {
768
+ # "name": fld,
769
+ # "strategy": "INIT",
770
+ # "dtype": "string",
771
+ # "shape": tuple(),
772
+ # att: vl}
727
773
 
728
774
  for mdd in fields.values():
729
775
  lddict.append(mdd)
@@ -732,9 +778,12 @@ class NXS_FileRecorder(BaseFileRecorder):
732
778
  jddict = json.dumps(lddict, cls=NXS_FileRecorder.numpyEncoder)
733
779
  jdss = json.dumps(tdss, cls=NXS_FileRecorder.numpyEncoder)
734
780
  jkeys = json.dumps(keys, cls=NXS_FileRecorder.numpyEncoder)
735
- self.debug("JDD: %s" % jddict)
736
- self.debug("JDs: %s" % tdss)
737
- self.debug("Jk: %s" % jkeys)
781
+ self.debug("__createDynamicComponent: "
782
+ "tango STEP datasources: %s" % tdss)
783
+ self.debug("__createDynamicComponent: "
784
+ "sardana STEP datasources: %s" % jddict)
785
+ self.debug("__createDynamicComponent: "
786
+ "INIT datasources: %s" % jkeys)
738
787
  self.__dynamicCP = \
739
788
  self.__command(self.__nexussettings_device,
740
789
  "createDynamicComponent",
@@ -778,11 +827,14 @@ class NXS_FileRecorder(BaseFileRecorder):
778
827
  :rtype: (`list` <:obj:`str`>, `list` <:obj:`str`>,
779
828
  `list` <:obj:`str`>, `list` <:obj:`str`>)
780
829
  """
830
+ self.debug("__searchDataSources: Init: %s"
831
+ % str([nexuscomponents, cfm, dyncp, userkeys]))
781
832
  dsFound = {}
782
833
  dsNotFound = []
783
834
 
784
835
  # (:obj:`list` <:obj:`str`>) all component source names
785
836
  allcpdss = []
837
+ cachedss = []
786
838
  cpReq = {}
787
839
  keyFound = set()
788
840
 
@@ -793,6 +845,8 @@ class NXS_FileRecorder(BaseFileRecorder):
793
845
  else:
794
846
  cmps = list(set(nexuscomponents) &
795
847
  set(self.__availableComponents()))
848
+ self.debug("__searchDataSources: Get selected DSs: %s"
849
+ % str([cfm, dyncp]))
796
850
  if self.__oddmntgrp:
797
851
  nds = []
798
852
  else:
@@ -800,8 +854,17 @@ class NXS_FileRecorder(BaseFileRecorder):
800
854
  "selectedDataSources")
801
855
  nds = nds if nds else []
802
856
  datasources = list(set(nds) | set(self.__deviceAliases.keys()))
857
+ self.debug("__searchDataSources: Get components DSs: %s"
858
+ % str([cfm, dyncp]))
803
859
  hascpsrcs = hasattr(self.__nexussettings_device, 'componentSources')
860
+ # aacpdss = json.loads(
861
+ # self.__command(self.__nexussettings_device,
862
+ # "componentSources",
863
+ # cmps))
864
+ self.debug("__searchDataSources: component loop: %s"
865
+ % str([cfm, dyncp, hascpsrcs]))
804
866
  for cp in cmps:
867
+ self.debug("__searchDataSources: component item: %s" % cp)
805
868
  try:
806
869
  if hascpsrcs:
807
870
  cpdss = json.loads(
@@ -812,6 +875,11 @@ class NXS_FileRecorder(BaseFileRecorder):
812
875
  [ds["dsname"] for ds in cpdss
813
876
  if ("parentobj" not in ds or
814
877
  ds["parentobj"] in ["field"])])
878
+ if cp.startswith(self.__cacheCPPrefix):
879
+ cachedss.extend(
880
+ [ds["dsname"] for ds in cpdss
881
+ if ("parentobj" not in ds or
882
+ ds["parentobj"] in ["field"])])
815
883
 
816
884
  else:
817
885
  cpdss = json.loads(
@@ -833,28 +901,38 @@ class NXS_FileRecorder(BaseFileRecorder):
833
901
  "Component '%s' wrongly defined in DB!" % cp)
834
902
  # self.__macro().warning("Error: '%s'" % str(e))
835
903
  else:
836
- self.debug("Component '%s' wrongly defined in DB!" % cp)
904
+ self.debug(
905
+ "__searchDataSources: "
906
+ "Component '%s' wrongly defined in DB!" % cp)
837
907
  self.warning("Error: '%s'" % str(e))
838
908
  if self.__macro:
839
909
  self.__macro().debug(
910
+ "__searchDataSources: "
840
911
  "Component '%s' wrongly defined in DB!" % cp)
841
912
  self.__macro.debug("Error: '%s'" % str(e))
842
913
  dss = []
843
914
  if dss:
844
915
  cdss = list(set(dss) & set(datasources))
845
916
  for ds in cdss:
846
- self.debug("'%s' found in '%s'" % (ds, cp))
917
+ self.debug("__searchDataSources: '%s' found in '%s'"
918
+ % (ds, cp))
847
919
  if ds not in dsFound.keys():
848
920
  dsFound[ds] = []
849
921
  dsFound[ds].append(cp)
850
922
  if cp not in cpReq.keys():
851
923
  cpReq[cp] = []
852
924
  cpReq[cp].append(ds)
925
+ self.debug("__searchDataSources: "
926
+ "component loop end: %s" % str([cfm, dyncp]))
853
927
  missingKeys = set(userkeys) - keyFound
854
928
 
929
+ self.debug("__searchDataSources: "
930
+ "dynamic component loop: %s" % str([cfm, dyncp]))
855
931
  datasources.extend(self.__dynamicDataSources.keys())
856
932
  #: get not found datasources
857
933
  for ds in datasources:
934
+ self.debug("__searchDataSources: "
935
+ " dynamic component item: %s" % ds)
858
936
  if ds not in dsFound.keys() and ds not in allcpdss:
859
937
  dsNotFound.append(ds)
860
938
  if not dyncp:
@@ -883,7 +961,9 @@ class NXS_FileRecorder(BaseFileRecorder):
883
961
  "It was not found in User Components!"
884
962
  " Consider setting: "
885
963
  "NeXusDynamicComponents=True" % ds)
886
- return (nds, dsNotFound, cpReq, list(missingKeys))
964
+ self.debug("__searchDataSources: "
965
+ "dynamic component loop end: %s" % str([cfm, dyncp]))
966
+ return (nds, dsNotFound, cpReq, list(missingKeys), cachedss)
887
967
 
888
968
  def __createConfiguration(self, userdata):
889
969
  """ create NeXus configuration
@@ -893,14 +973,19 @@ class NXS_FileRecorder(BaseFileRecorder):
893
973
  :returns: configuration xml string
894
974
  :rtype: :obj:`str`
895
975
  """
976
+ self.debug("__createConfiguration: Init: %s" % self.__oddmntgrp)
896
977
  cfm = self.__getConfVar("ComponentsFromMntGrp",
897
978
  False, pass_default=self.__oddmntgrp)
898
979
  dyncp = self.__getConfVar("DynamicComponents",
899
980
  True, pass_default=self.__oddmntgrp)
900
981
 
901
982
  envRec = self.recordlist.getEnviron()
983
+ self.debug("__createConfiguration: CollectAllises: %s"
984
+ % self.__oddmntgrp)
902
985
  self.__collectAliases(envRec)
903
986
 
987
+ self.debug("__createConfiguration: Get Components: %s"
988
+ % self.__oddmntgrp)
904
989
  mandatory = self.__command(self.__nexussettings_device,
905
990
  "mandatoryComponents")
906
991
  self.info("Default Components %s" % str(mandatory))
@@ -912,6 +997,15 @@ class NXS_FileRecorder(BaseFileRecorder):
912
997
  nexuscomponents.extend(lst)
913
998
  self.info("User Components %s" % str(nexuscomponents))
914
999
 
1000
+ ccomp = None
1001
+ if hasattr(self.__nexussettings_device, "cachecomponent"):
1002
+ ccomp = self.__nexussettings_device.cachecomponent
1003
+ allnexuscomponents = list(set(nexuscomponents) | set(mandatory))
1004
+ if ccomp:
1005
+ self.info("Cache Component %s" % str(ccomp))
1006
+ nexuscomponents = [ccomp]
1007
+ allnexuscomponents = [ccomp]
1008
+
915
1009
  self.__availableComps = []
916
1010
  lst = self.__getConfVar("OptionalComponents",
917
1011
  None, True, pass_default=self.__oddmntgrp)
@@ -922,13 +1016,20 @@ class NXS_FileRecorder(BaseFileRecorder):
922
1016
  self.info("Available Components %s" % str(
923
1017
  self.__availableComponents()))
924
1018
 
925
- nds, dsNotFound, cpReq, missingKeys = self.__searchDataSources(
926
- list(set(nexuscomponents) | set(mandatory)),
927
- cfm, dyncp, userdata.keys())
928
-
929
- self.debug("DataSources Not Found : %s" % dsNotFound)
930
- self.debug("Components required : %s" % cpReq)
931
- self.debug("Missing User Data : %s" % missingKeys)
1019
+ self.debug("__createConfiguration: Search DataSources: %s"
1020
+ % self.__oddmntgrp)
1021
+ nds, dsNotFound, cpReq, missingKeys, cachedss = \
1022
+ self.__searchDataSources(
1023
+ allnexuscomponents,
1024
+ cfm, dyncp, userdata.keys())
1025
+ self.debug("__createConfiguration: Get User data: %s"
1026
+ % self.__oddmntgrp)
1027
+
1028
+ self.debug("__createConfiguration: DataSources Not Found : %s"
1029
+ % dsNotFound)
1030
+ self.debug("__createConfiguration: Components required : %s" % cpReq)
1031
+ self.debug("__createConfiguration: Missing User Data : %s"
1032
+ % missingKeys)
932
1033
  if "InitDataSources" in self.__conf.keys():
933
1034
  # compatibility with version 2
934
1035
  ids = self.__getConfVar(
@@ -946,9 +1047,14 @@ class NXS_FileRecorder(BaseFileRecorder):
946
1047
  # udata = {ky: userdata[ky] for ky in missingKeys}
947
1048
  if userdata:
948
1049
  userdata.update(udata)
1050
+ ids = list(set(ids or []) - set(cachedss))
1051
+ self.debug("__createConfiguration: Create dynamic components: %s"
1052
+ % self.__oddmntgrp)
949
1053
  self.__createDynamicComponent(
950
- dsNotFound if dyncp else [], ids or [], udata, nexuscomponents)
1054
+ dsNotFound if dyncp else [], ids, udata, nexuscomponents)
951
1055
  nexuscomponents.append(str(self.__dynamicCP))
1056
+ self.debug("__createConfiguration: Add Components: %s"
1057
+ % self.__oddmntgrp)
952
1058
 
953
1059
  if cfm:
954
1060
  self.info("Sardana Components %s" % cpReq.keys())
@@ -996,25 +1102,38 @@ class NXS_FileRecorder(BaseFileRecorder):
996
1102
  if self.__macro:
997
1103
  self.__macro().debug(
998
1104
  "VAR %s" % self.__nexussettings_device.configVariables)
1105
+ self.debug("__createConfiguration: Update Config Varialels: %s"
1106
+ % self.__oddmntgrp)
999
1107
  self.__command(self.__nexussettings_device,
1000
1108
  "updateConfigVariables")
1001
1109
 
1002
- self.debug("Aliases: %s" % str(self.__aliases))
1003
- self.debug("Switching to STEP mode: %s" % stepdss)
1110
+ self.debug("__createConfiguration: Aliases: %s"
1111
+ % str(self.__aliases))
1112
+ self.debug("__createConfiguration: Switching to STEP mode: %s"
1113
+ % stepdss)
1004
1114
  oldtoswitch = self.__getServerVar("stepdatasources", "[]", False)
1005
1115
  stepdss = str(json.dumps(list(toswitch)))
1116
+ self.debug("__createConfiguration: Set STEP datasources: %s"
1117
+ % self.__oddmntgrp)
1006
1118
  self.__nexussettings_device.stepdatasources = stepdss
1119
+ self.debug("__createConfiguration: Set LINK datasources: %s"
1120
+ % self.__oddmntgrp)
1007
1121
  if hasattr(self.__nexussettings_device, "linkdatasources"):
1008
1122
  self.__nexussettings_device.linkdatasources = stepdss
1123
+ self.debug("__createConfiguration: "
1124
+ "Create Writer configuration: %s" % self.__oddmntgrp)
1009
1125
  cnfxml = self.__command(
1010
1126
  self.__nexussettings_device, "createWriterConfiguration",
1011
1127
  nexuscomponents)
1012
1128
  finally:
1129
+ self.debug("__createConfiguration: Reset variables: %s"
1130
+ % self.__oddmntgrp)
1013
1131
  self.__nexussettings_device.configVariables = json.dumps(
1014
1132
  nexusvariables)
1015
1133
  if oldtoswitch is not None:
1016
1134
  self.__nexussettings_device.stepdatasources = oldtoswitch
1017
1135
 
1136
+ self.debug("__createConfiguration: End: %s" % self.__oddmntgrp)
1018
1137
  return cnfxml
1019
1138
 
1020
1139
  def _startRecordList(self, recordlist):
@@ -1025,12 +1144,17 @@ class NXS_FileRecorder(BaseFileRecorder):
1025
1144
  :type recordlist: :class:`sardana.macroserver.scan.scandata.RecordList`
1026
1145
  """
1027
1146
  try:
1147
+ self.debug('_startRecordList: Start %s' % self.__base_filename)
1028
1148
  self.__env = self.__macro().getAllEnv() if self.__macro else {}
1029
1149
  if self.__base_filename is None:
1030
1150
  return
1031
1151
  self.__udata = None
1032
1152
 
1153
+ self.debug('_startRecordList: Set NeXus %s'
1154
+ % self.__base_filename)
1033
1155
  self.__setNexusDevices()
1156
+ self.debug('_startRecordList: Set Variables %s'
1157
+ % self.__base_filename)
1034
1158
 
1035
1159
  appendentry = self.__getConfVar("AppendEntry", True)
1036
1160
  appendscanid = not self.__setFileName(
@@ -1056,7 +1180,11 @@ class NXS_FileRecorder(BaseFileRecorder):
1056
1180
  self.__vars["vars"]["filename"] = str(self.filename)
1057
1181
 
1058
1182
  envrecord = self.__appendRecord(self.__vars, 'INIT')
1183
+ self.debug('_startRecordList: Create Configuration %s'
1184
+ % self.__base_filename)
1059
1185
  cnfxml = self.__createConfiguration(envrecord["data"])
1186
+ self.debug('_startRecordList: Set Remove dynamic components %s'
1187
+ % self.__base_filename)
1060
1188
  rec = json.dumps(
1061
1189
  envrecord, cls=NXS_FileRecorder.numpyEncoder)
1062
1190
  # self.debug('XML: %s' % str(cnfxml))
@@ -1074,24 +1202,31 @@ class NXS_FileRecorder(BaseFileRecorder):
1074
1202
  self.__vars["data"]["beamtime_id"] = \
1075
1203
  self.__vars["vars"]["beamtime_id"]
1076
1204
 
1205
+ self.debug('_startRecordList: Init writer %s'
1206
+ % self.__base_filename)
1077
1207
  if hasattr(self.__nexuswriter_device, 'Init'):
1078
1208
  self.__command(self.__nexuswriter_device, "Init")
1079
1209
  self.__nexuswriter_device.fileName = str(self.filename)
1080
1210
  self.__command(self.__nexuswriter_device, "openFile")
1081
1211
  self.__nexuswriter_device.xmlsettings = cnfxml
1082
1212
 
1083
- # self.debug('START_DATA: %s' % str(envRec))
1213
+ if "DEBUG_INIT_DATA" in self.writerModes:
1214
+ self.debug('_startRecordList: INIT_DATA: %s' % str(envRec))
1084
1215
 
1216
+ self.debug('_startRecordList: Set JSON %s' % self.__base_filename)
1085
1217
  self.__nexuswriter_device.jsonrecord = rec
1086
1218
  self.writerModes = self.__variableList(
1087
1219
  "NeXusWriterModes")
1088
1220
  if "NOINIT" in self.writerModes:
1089
1221
  self.__nexuswriter_device.skipAcquisition = True
1090
1222
 
1223
+ self.debug('_startRecordList SE: Open Entry %s' %
1224
+ self.__base_filename)
1091
1225
  self.__command(self.__nexuswriter_device, "openEntry")
1092
1226
  except Exception:
1093
1227
  self.__removeDynamicComponent()
1094
1228
  raise
1229
+ self.debug('_startRecordList SE: END %s' % self.__base_filename)
1095
1230
 
1096
1231
  def __appendRecord(self, var, mode=None):
1097
1232
  """ merges userdata with variable dictionary
@@ -1177,9 +1312,10 @@ class NXS_FileRecorder(BaseFileRecorder):
1177
1312
  if "NOSTEP" in self.writerModes:
1178
1313
  self.__nexuswriter_device.skipAcquisition = True
1179
1314
 
1180
- # self.debug('DATA: {"data":%s}' % json.dumps(
1181
- # record.data,
1182
- # cls=NXS_FileRecorder.numpyEncoder))
1315
+ if "DEBUG_STEP_DATA" in self.writerModes:
1316
+ self.debug('_writeRecord DATA: {"data":%s}' % json.dumps(
1317
+ record.data,
1318
+ cls=NXS_FileRecorder.numpyEncoder))
1183
1319
 
1184
1320
  jsonString = '{"data":%s}' % json.dumps(
1185
1321
  record.data,
@@ -1243,7 +1379,8 @@ class NXS_FileRecorder(BaseFileRecorder):
1243
1379
  self.__env = self.__macro().getAllEnv() if self.__macro else {}
1244
1380
  envRec = recordlist.getEnviron()
1245
1381
 
1246
- # self.debug('END_DATA: %s ' % str(envRec))
1382
+ if "DEBUG_FINAL_DATA" in self.writerModes:
1383
+ self.debug('_endRecordList: FINAL_DATA: %s ' % str(envRec))
1247
1384
 
1248
1385
  tzone = self.__getConfVar("TimeZone", self.__timezone)
1249
1386
  self.__vars["data"]["end_time"] = \
@@ -1312,7 +1449,7 @@ class NXS_FileRecorder(BaseFileRecorder):
1312
1449
  if isinstance(msvar, str):
1313
1450
  msvar = re.split(r"[-;,.\s]\s*", msvar)
1314
1451
  if msvar:
1315
- self.debug('%s: %s' % (variable, str(msvar)))
1452
+ self.debug('__variableList: %s: %s' % (variable, str(msvar)))
1316
1453
  return msvar
1317
1454
 
1318
1455
  def __rawfilename(self, serial):
@@ -1517,7 +1654,8 @@ class NXS_FileRecorder(BaseFileRecorder):
1517
1654
  (pdir, fname, entryname), rt, sname)
1518
1655
  else:
1519
1656
  h5writer.link("%s:/%s" % (fname, entryname), rt, sname)
1520
- self.debug("Link '%s' in '%s' created " % (sname, mntname))
1657
+ self.debug("__createMeasurementFile: "
1658
+ "Link '%s' in '%s' created " % (sname, mntname))
1521
1659
  rt.close()
1522
1660
  fl.close()
1523
1661