00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef _A_EXTERN_H
00012
#define _A_EXTERN_H
00013
00014
#include "difrkmty\d_extern.h"
00015
#include "detecuse\detecuse.h"
00016
00017
00018
00019
00020
00021
00022
00023 class TAreaScanParameters
00024 {
00025
private:
00028
struct TReportUse
00029 {
00030 BOOL bMonitor;
00031 BOOL bAbsorber;
00032 BOOL bTime;
00033 BOOL bIntegral;
00034 };
00035
00036
00037
00038
00039
00040
00041
public:
00042
TAreaScanParameters(
void );
00043
00044
00045 TDetector*
GetDetector()
00046 {
00047
return Detector;
00048 };
00049 TDetector*
GetMonitor()
00050 {
00051
return Monitor;
00052 };
00053
00054 void SetDetector(
TDetector* detectorParam)
00055 {
00056
Detector= detectorParam;
00057 };
00058 void SetMonitor(
TDetector* monitorParam)
00059 {
00060
Monitor= monitorParam;
00061 };
00062
00065
TOneDimDetector*
GetPsd();
00066
00067
00068
public:
00069
00070 char DataFile[ 40 ];
00071 BOOL
bAquisitionActive;
00072 int nLinePoints;
00073 BOOL
bSetDXZero,
00074
bSetDYZero,
00075
bSetRLSave;
00076 int nEnvironment;
00077
00078
00079 int nFirstReadColumn;
00080 int nLastReadColumn;
00081 float fPsdRange;
00082 char szODF[ 7 ],
szOWF[ 7 ],
szTDF[ 7 ],
szTWF[ 7 ];
00083 EUnitType eThetaUnitType;
00084 char DismantleFile[ _MAX_PATH+1 ];
00085
00086
00088 int nOmega,
nTheta;
00089
00092 double dOmegaMin,
dOmegaMax,
dOmegaWidth;
00093
00097 double dThetaMin,
dThetaMax,
dThetaWidth,
dThetaOffset;
00098
00100 double dThetaWindow;
00101
00103 double dMoveRelation;
00104
00106 ExScanType eScanType;
00107
00110 EFileFormat eSaveFormat;
00111
00113 BOOL
bSaveOnReady;
00114
00116 BOOL
bSaveContinuous;
00117
00119
00120
00122 BOOL
bThetaAddsPsd;
00123
00125 BOOL
bAbsorberUsed;
00126
00128 int nAddedChannels;
00129
00130 float fMaxTime;
00131 DWORD
dwMaxCounts;
00132
00135
00136
00139 double d2ThetaStart;
00140
00142 char FirstFile[ _MAX_PATH+1 ],
LastFile[ _MAX_PATH+1 ];
00143 int MaxFiles;
00144
00147 double dOffsetOmega,
dOffsetTheta;
00148
00152 double dPsdOffset;
00153
00156 int nMeasurementChannel;
00157
00160 TReportUse
ReportUse;
00161
00166 BOOL
bAccumulatedDisplay;
00167
00168
protected:
00170 TDetector*
Detector;
00171
00173 TDetector*
Monitor;
00174 };
00175
00176
00177
00178
00179
00180 class TAreaScanWindow :
public TAreaScanParameters,
public TPlotWindow
00181 {
00182
00183
friend class TScanCmd;
00184
friend class TAreaScanCmd;
00185
friend class TSaveDataCmd;
00186
friend class TChooseScanDlg;
00187
00188
public:
00189
TAreaScanWindow( HINSTANCE aInstance );
00190
virtual ~TAreaScanWindow(
void );
00191
00192
00193
private:
00194
virtual void Create( HWND );
00195
virtual LRESULT OnCommand(WPARAM wParam, LPARAM lParam);
00196
virtual BOOL isScanning(BOOL &PsdContinious) {
00197 PsdContinious= bShowPsdContinuous;
return bAreaScanStarted;
00198 }
00199
00200
00201
virtual void OnPopupMenuInit ( WPARAM, LPARAM );
00202
virtual void lButtonUp( WPARAM, LPARAM );
00203
virtual void lButtonDown( WPARAM, LPARAM );
00204
00205
virtual BOOL
New(
void );
00206
virtual BOOL
SetTitle(
void );
00207
virtual void UpdateWnd(
EPaintType=
ptEntire );
00208
virtual void SetRanges(
void );
00209
00210
00211
virtual void CounterSetRequest( LPARAM );
00212
virtual void SteeringReady( LPARAM );
00213
virtual void SteeringReset( LPARAM );
00214
virtual void Interrupt(
void );
00215
00216
virtual BOOL
LoadOldData();
00217
virtual BOOL SaveFile(
EAskType );
00218
virtual BOOL
UpdateFile(
void );
00219
00221
virtual LPCSTR
ClassName()
00222 {
00223
return "AreaScan";
00224 };
00225
00227
virtual LPCSTR
GetCharacteristic()
00228 {
00229
return "AreaScan";
00230 };
00231
00232
00233
00234
00235
00236
private:
00237
virtual BOOL SetMeasurementArea(
TKSystem & );
00238
00239
00240
private:
00241 BOOL LoadReport(
void );
00242 BOOL SaveReport(
void );
00243
00244
void ShowSensorContinuous(
EPsdDataType );
00245
00246
00247 BOOL LoadMeasurementInfo( HFILE );
00248 BOOL SaveMeasurementInfo( BOOL );
00249
00250
int GetAdditionalColumns(
void );
00251
int GetShift(
int ScanNumber );
00252
00253
void CalibratePsd(
void );
00254
void InitializeAreaScanTask();
00255
void DoDataAquisition();
00256
00257
00258 BOOL ComposeDB(
void );
00259 BOOL SaveDismantleCurve(
int );
00260 BOOL DismantleDB(
void );
00261
00262
00265
void SetMeasurementProtocolParameter(
void );
00266
00267
00268 LPCSTR GetRepFileName(
void );
00269
00273
double GetThetaOffset(
int );
00274
00276
00277
00278
00279
private:
00282 BOOL bThetaScanCompleted;
00283
00286
LPCurve ScanReport;
00287
00290
LPCurve ScanReport2;
00291
00293
int nActiveScan;
00294
00295
00296 BOOL bAreaScanStarted;
00297
00299 BOOL bShowPsdContinuous;
00300
00302 BOOL bCalibrationActive;
00303
00307 BOOL bFirstScan;
00308
00311 BOOL bScanSetupOk;
00312
00314 BOOL bComposeDB;
00315
00316
00317
char m_RepFileName[ _MAX_PATH+1 ];
00318
00319
TDetector *oldDetector;
00320 };
00321
00322
#endif // _A_EXTERN_H
00323
00324
00325
00326