public void Dispose() { CloseRead(); CloseWrite(); Reader = null; Writer = null; }
public bool GetROI(double energyStart, double energyEnd, double backCh, double limitUnc) { bool success = false; CAMSRCLib.CamDatasourceClass ReaderAux = new CAMSRCLib.CamDatasourceClass(); exception = null; try { ReaderAux.OpenEx(detectorCodeName, this.camReadonly, type, this.server); /* * object o = device.get_Information( CAMSRCLib.InformationType.camName); * object time = device.get_Parameter(CanberraDataAccessLib.ParamCodes.CAM_X_EREAL, 0, 0); * object roi = device.get_Parameter(CanberraDeviceAccessLib.ParamCodes.CAM_L_SHOWROIS, 0, 0); * object f = o; * o = device.get_Parameter(CanberraDeviceAccessLib.ParamCodes.CAM_L_EXPROIS, 0, 0); * */ } catch (SystemException ex) { exception = ex; } try { object[] argsIn = new object[] { energyStart, energyEnd, backCh, 1, true }; object result = ReaderAux.Evaluate.Evaluate(CAMSRCLib.EvaluateOptions.camRoiInformation, argsIn); double[] args = result as double[]; if (args[2] < limitUnc) { success = true; } this.area = args[1]; this.integral = args[0]; this.areaUnc = args[2]; this.countTime = (double)ReaderAux.get_Parameter(CanberraDataAccessLib.ParamCodes.CAM_X_EREAL, 0, 0); } catch (SystemException ex) { exception = ex; } try { ReaderAux.Close(); } catch (SystemException ex) { exception = ex; } ReaderAux = null; return(success); }
public DetectorX() { try { Reader = new CAMSRCLib.CamDatasourceClass(); Writer = new CAMSRCLib.CamDatasourceClass(); } catch (SystemException EX) { exception = EX; } }