def openBlob(self, filename): if self._blob_file is not None: self._blob_file.close() logger.info("Opening blob file :{}".format(filename)) self._blob_file = open_output_file(filename, "blob", index=self._index) self._blob_x = [] self._blob_shot = [] self._blob_y = [] self._blob_tof = [] self._blob_tot = []
def __init__(self, name='raw2Disk', dataq=None, fileN=None): multiprocessing.Process.__init__(self) ProcessLogger.__init__(self, name) self.info(f'initialising {name}') if dataq is not None: self._dataq = dataq try: self._raw_file = open_output_file(fileN, 'raw') except: self.info(f'Cannot open file {fileN}') else: self.error('Exception occured in init; no data queue provided?') self._buffer = np.array([], dtype=np.uint64) self._enable = Value(ctypes.c_bool, 1) self._timerBool = Value(ctypes.c_bool, 0) self._startTime = Value(ctypes.c_double, 0) self._stopTime = Value(ctypes.c_double, 1)
def openTof(self, filename): if self._tof_file is not None: self._tof_file.close() logger.info("Opening tof file :{}".format(filename)) self._tof_file = open_output_file(filename, "tof", index=self._index)
def openRaw(self, filename): if self._raw_file is not None: self._raw_file.close() logger.info("Opening raw file :{}".format(filename)) self._raw_file = open_output_file(filename, "raw", index=self._index)