sardana-nxsrecorder 3.32.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.32.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.32.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 {}
@@ -832,6 +834,7 @@ class NXS_FileRecorder(BaseFileRecorder):
832
834
 
833
835
  # (:obj:`list` <:obj:`str`>) all component source names
834
836
  allcpdss = []
837
+ cachedss = []
835
838
  cpReq = {}
836
839
  keyFound = set()
837
840
 
@@ -859,7 +862,7 @@ class NXS_FileRecorder(BaseFileRecorder):
859
862
  # "componentSources",
860
863
  # cmps))
861
864
  self.debug("__searchDataSources: component loop: %s"
862
- % str([cfm, dyncp]))
865
+ % str([cfm, dyncp, hascpsrcs]))
863
866
  for cp in cmps:
864
867
  self.debug("__searchDataSources: component item: %s" % cp)
865
868
  try:
@@ -872,6 +875,11 @@ class NXS_FileRecorder(BaseFileRecorder):
872
875
  [ds["dsname"] for ds in cpdss
873
876
  if ("parentobj" not in ds or
874
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"])])
875
883
 
876
884
  else:
877
885
  cpdss = json.loads(
@@ -955,7 +963,7 @@ class NXS_FileRecorder(BaseFileRecorder):
955
963
  "NeXusDynamicComponents=True" % ds)
956
964
  self.debug("__searchDataSources: "
957
965
  "dynamic component loop end: %s" % str([cfm, dyncp]))
958
- return (nds, dsNotFound, cpReq, list(missingKeys))
966
+ return (nds, dsNotFound, cpReq, list(missingKeys), cachedss)
959
967
 
960
968
  def __createConfiguration(self, userdata):
961
969
  """ create NeXus configuration
@@ -1010,9 +1018,10 @@ class NXS_FileRecorder(BaseFileRecorder):
1010
1018
 
1011
1019
  self.debug("__createConfiguration: Search DataSources: %s"
1012
1020
  % self.__oddmntgrp)
1013
- nds, dsNotFound, cpReq, missingKeys = self.__searchDataSources(
1014
- allnexuscomponents,
1015
- cfm, dyncp, userdata.keys())
1021
+ nds, dsNotFound, cpReq, missingKeys, cachedss = \
1022
+ self.__searchDataSources(
1023
+ allnexuscomponents,
1024
+ cfm, dyncp, userdata.keys())
1016
1025
  self.debug("__createConfiguration: Get User data: %s"
1017
1026
  % self.__oddmntgrp)
1018
1027
 
@@ -1038,10 +1047,11 @@ class NXS_FileRecorder(BaseFileRecorder):
1038
1047
  # udata = {ky: userdata[ky] for ky in missingKeys}
1039
1048
  if userdata:
1040
1049
  userdata.update(udata)
1050
+ ids = list(set(ids or []) - set(cachedss))
1041
1051
  self.debug("__createConfiguration: Create dynamic components: %s"
1042
1052
  % self.__oddmntgrp)
1043
1053
  self.__createDynamicComponent(
1044
- dsNotFound if dyncp else [], ids or [], udata, nexuscomponents)
1054
+ dsNotFound if dyncp else [], ids, udata, nexuscomponents)
1045
1055
  nexuscomponents.append(str(self.__dynamicCP))
1046
1056
  self.debug("__createConfiguration: Add Components: %s"
1047
1057
  % self.__oddmntgrp)
@@ -1,6 +0,0 @@
1
- sardananxsrecorder/__init__.py,sha256=_bIX5ViOWt3Bnv7n4bn44XacPyir-PKQzzrHdOmIi-c,896
2
- sardananxsrecorder/nxsrecorder.py,sha256=sNY9soUv-C7Hrrcxbrnh6yh3-cSBbqmpsxRcq7anEpw,67979
3
- sardana_nxsrecorder-3.32.0.dist-info/METADATA,sha256=-8OWatm0mP0tl7g9eoIghSPFbBlmI5YBrbT8gCIRRX0,8256
4
- sardana_nxsrecorder-3.32.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- sardana_nxsrecorder-3.32.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
- sardana_nxsrecorder-3.32.0.dist-info/RECORD,,