sardana-nxsrecorder 3.31.0__py3-none-any.whl → 3.33.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.31.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
@@ -0,0 +1,6 @@
1
+ sardananxsrecorder/__init__.py,sha256=4e2Fl7DUKh8tAn6rUcW2Fq8YwV736mYirt_mgKwkv9Q,896
2
+ sardananxsrecorder/nxsrecorder.py,sha256=4SwxqkaeHMaP_C0GQwZy9rK-YaPPNCNDAQLY3CMZHzY,68478
3
+ sardana_nxsrecorder-3.33.0.dist-info/METADATA,sha256=8H3pLDfI8K9FzblJOV_F7U1IYHZc2irfV8IszGznFHw,8256
4
+ sardana_nxsrecorder-3.33.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ sardana_nxsrecorder-3.33.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
+ sardana_nxsrecorder-3.33.0.dist-info/RECORD,,
@@ -20,4 +20,4 @@
20
20
  """ Sardana Scan Recorders """
21
21
 
22
22
  #: package version
23
- __version__ = "3.31.0"
23
+ __version__ = "3.33.0"
@@ -134,6 +134,8 @@ class NXS_FileRecorder(BaseFileRecorder):
134
134
 
135
135
  #: (:obj:`str`) dynamic components
136
136
  self.__dynamicCP = "__dynamic_component__"
137
+ #: (:obj:`str`) cache component prefix
138
+ self.__cacheCPPrefix = "__configuration_"
137
139
 
138
140
  #: (:obj:`dict` <:obj:`str` , `any`> ) environment
139
141
  self.__env = macro.getAllEnv() if macro else {}
@@ -563,6 +565,15 @@ class NXS_FileRecorder(BaseFileRecorder):
563
565
  "Updating ActiveMntGrp")
564
566
  self.__command(self.__nexussettings_device, "importMntGrp")
565
567
  self.__command(self.__nexussettings_device, "updateMntGrp")
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", [])
566
577
 
567
578
  self.debug('__setNexusDevices: '
568
579
  'Writer Device: %s' % str(self.__raw_filename))
@@ -823,6 +834,7 @@ class NXS_FileRecorder(BaseFileRecorder):
823
834
 
824
835
  # (:obj:`list` <:obj:`str`>) all component source names
825
836
  allcpdss = []
837
+ cachedss = []
826
838
  cpReq = {}
827
839
  keyFound = set()
828
840
 
@@ -850,7 +862,7 @@ class NXS_FileRecorder(BaseFileRecorder):
850
862
  # "componentSources",
851
863
  # cmps))
852
864
  self.debug("__searchDataSources: component loop: %s"
853
- % str([cfm, dyncp]))
865
+ % str([cfm, dyncp, hascpsrcs]))
854
866
  for cp in cmps:
855
867
  self.debug("__searchDataSources: component item: %s" % cp)
856
868
  try:
@@ -863,6 +875,11 @@ class NXS_FileRecorder(BaseFileRecorder):
863
875
  [ds["dsname"] for ds in cpdss
864
876
  if ("parentobj" not in ds or
865
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"])])
866
883
 
867
884
  else:
868
885
  cpdss = json.loads(
@@ -946,7 +963,7 @@ class NXS_FileRecorder(BaseFileRecorder):
946
963
  "NeXusDynamicComponents=True" % ds)
947
964
  self.debug("__searchDataSources: "
948
965
  "dynamic component loop end: %s" % str([cfm, dyncp]))
949
- return (nds, dsNotFound, cpReq, list(missingKeys))
966
+ return (nds, dsNotFound, cpReq, list(missingKeys), cachedss)
950
967
 
951
968
  def __createConfiguration(self, userdata):
952
969
  """ create NeXus configuration
@@ -1001,9 +1018,10 @@ class NXS_FileRecorder(BaseFileRecorder):
1001
1018
 
1002
1019
  self.debug("__createConfiguration: Search DataSources: %s"
1003
1020
  % self.__oddmntgrp)
1004
- nds, dsNotFound, cpReq, missingKeys = self.__searchDataSources(
1005
- allnexuscomponents,
1006
- cfm, dyncp, userdata.keys())
1021
+ nds, dsNotFound, cpReq, missingKeys, cachedss = \
1022
+ self.__searchDataSources(
1023
+ allnexuscomponents,
1024
+ cfm, dyncp, userdata.keys())
1007
1025
  self.debug("__createConfiguration: Get User data: %s"
1008
1026
  % self.__oddmntgrp)
1009
1027
 
@@ -1029,10 +1047,11 @@ class NXS_FileRecorder(BaseFileRecorder):
1029
1047
  # udata = {ky: userdata[ky] for ky in missingKeys}
1030
1048
  if userdata:
1031
1049
  userdata.update(udata)
1050
+ ids = list(set(ids or []) - set(cachedss))
1032
1051
  self.debug("__createConfiguration: Create dynamic components: %s"
1033
1052
  % self.__oddmntgrp)
1034
1053
  self.__createDynamicComponent(
1035
- dsNotFound if dyncp else [], ids or [], udata, nexuscomponents)
1054
+ dsNotFound if dyncp else [], ids, udata, nexuscomponents)
1036
1055
  nexuscomponents.append(str(self.__dynamicCP))
1037
1056
  self.debug("__createConfiguration: Add Components: %s"
1038
1057
  % self.__oddmntgrp)
@@ -1,6 +0,0 @@
1
- sardananxsrecorder/__init__.py,sha256=GgJQbb7Mf0ShhuhsJbq443ks6XofF4HKFmzYHxikBAg,896
2
- sardananxsrecorder/nxsrecorder.py,sha256=BRwQmLSkS6mpj19u5uog6V1e3uUc3IWKeddtysuZo40,67472
3
- sardana_nxsrecorder-3.31.0.dist-info/METADATA,sha256=_4xnp4oP9-ji-6ucQwrvUj_vrUEwWQEGl_Py1oekaXY,8256
4
- sardana_nxsrecorder-3.31.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- sardana_nxsrecorder-3.31.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
- sardana_nxsrecorder-3.31.0.dist-info/RECORD,,