Main Page | Class List | File List | Class Members

LasGuiMeasurement.h

00001 
00002 // LasGuiMeasurement.h  Sergio Gonzalez Sevilla (April 2006)
00004 
00005 #ifndef __LasGuiMeasurement_h__
00006 #define __LasGuiMeasurement_h__
00007 
00008 #include <TObject.h>
00009 
00010 #define MAXAXIS 3
00011 #define MAXCHANNELS 4
00012 #define MAXWAVEPOINTS 4096
00013 
00049 class LasGuiMeasurement : public TObject {
00050  public:
00052   LasGuiMeasurement();
00053 
00054   ~LasGuiMeasurement() {}
00055 
00056   void SetMeasNumber(int i)             { meas_number = i;        }
00057   void SetScanNumber(int i)             { scan_number = i;        }
00058   void SetMeasIndexInScan(int i)        { meas_index_in_scan = i; }
00059   void SetAxisEnabled(int ax, bool b)   { axis_enabled[ax] = b;   }
00060   void SetAxisIndex(int ax, int i)      { axis_index[ax] = i;     }
00061   void SetAxisPosition(int ax, float f) { axis_position[ax] = f;  }
00062   void SetVoltage(float f)              { voltage = f;            }
00063   void SetCurrent(float f)              { current = f;            }
00064   void SetChannelActive(int ch, bool b) { channel_active[ch] = b; }
00065   void SetChannelNumber(int ch, int i)  { channel_number[ch] = i; }
00066   void SetTimeScale(int ch, float f)    { timescale[ch] = f;      }
00067   void SetChannelScale(int ch, float f) { channel_scale[ch] = f;  }
00068   void SetRiseTime(int ch, float f)     { rise_time[ch] = f;      }
00069   void SetVamplitude(int ch, float f)   { vamplitude[ch] = f;     }
00070   void SetVbase(int ch, float f)        { vbase[ch] = f;          }
00071   void SetVmax(int ch, float f)         { vmax[ch] = f;           }
00072   void SetVmin(int ch, float f)         { vmin[ch] = f;           }
00073   void SetVpp(int ch, float f)          { vpp[ch] = f;            }
00074   void SetNPoints(int ch, int i)        { npoints[ch] = i;        }
00075   void SetWaveTimes(int, double*, double);
00076   void SetWaveVolts(int, double*);
00077 
00078 
00081   int GetMeasNumber()           const { return meas_number;        }
00082 
00084   int GetScanNumber()           const { return scan_number;        }
00085 
00089   int GetMeasIndexInScan()      const { return meas_index_in_scan; }
00090 
00092   bool isAxisEnabled(int ax)    const { return axis_enabled[ax];   }
00093 
00095   int GetAxisIndex(int ax)      const { return axis_index[ax];     }
00096 
00098   float GetAxisPosition(int ax) const { return axis_position[ax];  }
00099 
00101   float GetVoltage()            const { return voltage;            }
00102 
00104   float GetCurrent()            const { return current;            }
00105 
00107   bool isChannelActive(int ch)  const { return channel_active[ch]; }
00108 
00110   int GetChannelNumber(int ch)  const { return channel_number[ch]; }
00111 
00113   float GetTimeScale(int ch)    const { return timescale[ch];      }
00114 
00116   float GetChannelScale(int ch) const { return channel_scale[ch];  }
00117 
00123   float GetRiseTime(int ch)     const { return rise_time[ch];      }
00124   
00126   float GetVamplitude(int ch)   const { return vamplitude[ch];     }
00127 
00129   float GetVbase(int ch)        const { return vbase[ch];          }
00130 
00132   float GetVmax(int ch)         const { return vmax[ch];           }
00133 
00135   float GetVmin(int ch)         const { return vmin[ch];           }
00136 
00139   float GetVpp(int ch)          const { return vpp[ch];            }
00140 
00142   int GetNPoints(int ch)        const { return npoints[ch];        }
00143 
00149   double *GetWaveTimes(int ch)        { return wavetimes[ch];      }
00150 
00153   double *GetWaveVolts(int ch)        { return wavevolts[ch];      }
00154 
00155  private:
00156   int meas_number;
00157   int scan_number;
00158   int meas_index_in_scan;
00159 
00160   bool axis_enabled[MAXAXIS];
00161   int axis_index[MAXAXIS];
00162   float axis_position[MAXAXIS];
00163 
00164   float voltage, current;
00165   
00166   bool channel_active[MAXCHANNELS];
00167   int channel_number[MAXCHANNELS];
00168   float timescale[MAXCHANNELS], channel_scale[MAXCHANNELS];
00169   float rise_time[MAXCHANNELS], vamplitude[MAXCHANNELS];
00170   float vbase[MAXCHANNELS], vmax[MAXCHANNELS];
00171   float vmin[MAXCHANNELS], vpp[MAXCHANNELS];  
00172   int npoints[MAXCHANNELS];  
00173   double wavetimes[MAXCHANNELS][MAXWAVEPOINTS];
00174   double wavevolts[MAXCHANNELS][MAXWAVEPOINTS];
00175 
00176   ClassDef(LasGuiMeasurement,1);
00177 };
00178 
00179 #endif

Generated on Fri Apr 28 16:10:25 2006 for LasGuiMeasurement by doxygen 1.3.5