LScope


class description - source file - inheritance tree

class LScope : public TObject

    private:
void CheckError(const char* message) Bool_t Configure(const char* conffile) public:
LScope LScope(const int bufsize = 1024000*2) LScope LScope(LScope&) virtual void ~LScope() void Arm() void ChanOn(const char* channel, Bool_t on = kTRUE) static TClass* Class() void DownloadState() TH1F* GetHWF(const int numbins, const char* title = Trace, float lp = 0, float hp = 1) Int_t GetNP() const float GetOffset(const char* channel = C1) const char* GetStrOut() const LTrace* GetTrace() const float GetTriggerDelay() const float GetVDIV(const char* channel = C1) float* GetWF(const char* channel, const int length, const char* source = DAT1) Bool_t Init(const int address, const char* conffile) virtual TClass* IsA() const Bool_t Receive(void* output, const int length) LScope* Send(const char* command, Bool_t out = false) LScope* Sendf(const char* fmt, Bool_t out) void SetNP(const int np) void SetOffset(const char* offset, const char* channel = C1) void SetTDIV(const int nusec) void SetTriggerDelay(const float percent) void SetVDIV(const char* vdiv, const char* channel = C1) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) LTrace* TakeTrace(const char* channel, const int length, const char* source = DAT1)

Data Members

    private:
int fStrLen output buffer length static const int fNChan number of scope channels short fInst[2] short fRes[2] int fNP char* fStrOut float* fWF short* fSWF char fLastChan[80] LTrace* fTrace LScopeState* fScopeState

Class Description

                     The LScope  Class
                    ===================
  This class was created to be used with the oscilloscope LeCroy LT-344
  but with minimal changes of commands, it could be used to any gpib
   device.

  Basic procedure to use this class is:
       1. create class and initialize device with LScope::Init
       2. download the state of the device with LScope::DownloadState
       3. set numper of aquisition points with LScope::SetNP
       4. set device to meassure with LScope::Arm
       5. take trace to computer with LScope::TakeTrace
       6. get trace with LScope::GetTrace


-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

LScope(const int bufsize)
   -*-*-*-*-*-*-*-*-*LScope default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
                     ============================

~LScope()
   -*-*-*-*-*-*-*-*-*LScope default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
                     ============================

void ChanOn(const char* channel, Bool_t on)
   -*-*-*-*-*-*-*-*-*Set Channel on/off*-*-*-*-*-*-*-*-*-*-*-*-*-*
                     ============================
       possible values for channel are C1,C2,C3,C4 and TA,TB,TC,TD

void CheckError(const char* message)
   -*-*-*-*-*-*-*-*-*Internally used check for errors*-*-*-*-*-*-*-*-*
                     ============================

Bool_t Init(const int address,const char* conffile)
   -*-*-*-*-*-*-*-*-*Init gpib device*-*-*-*-*-*-*-*-*-*-*-*-*-*
                 ============================
       address of device must be set!
       configuration file conffile is optional

Bool_t Configure(const char* conffile)
   -*-*-*-*-*-*-*-*Internally used for Init from file*--*-*-*-*-*-*-*
                     ============================

LScope* Send(const char* str, Bool_t out)
   -*-*-*-*-*-*-*-*-*Internally used for sending to device*-*-*-*-*-*-*-*-*
                     ============================

LScope* Sendf(const char *fmt, const Bool_t out, ...)
   -*-*-*-*-*-*Internally used for sending to device like printf**-*-*-*-*-*
                     ============================

Bool_t Receive(void* output, const int length)
   -*-*-*-*-*-*-*-*-*Internally used for receiving from device*-*-*-*-*-*-*-*-*
                     ============================

const char* GetStrOut() const

void SetNP(const int np)
   -*-*-*-*-*-*-*-*-*Set Number of aqusition points*-*-*-*-*-*-*-*-*
                     ============================
      If this number differs from total points set with MSIZ,
      only part of the whole signal from the scope will by transfered to
      computer.

void SetTDIV(const int nusec)
   -*-*-*-*-*-*-*-*-*Set Time division *-*-*-*-*-*-*-*-*
                     ============================

void Arm()
   -*-*-*-*-*-*-*-*-*Set device to capture*-*-*-*-*-*-*-*-*
                     ============================

float* GetWF(const char* channel, const int length, const char* source)
   -*-*-*-*-*-*-*-*-*return array of aqusited data*-*-*-*-*-*-*-*-*
                     ============================
    This function is for getting raw data. We recommend to use
     TakeTrace and GetTrace (but not both!!)

LTrace* TakeTrace(const char* channel, const int length, const char* source)
   -*-*-*-*-*-*-*-*-*transfer aqusited data*-*-*-*-*-*-*-*-*
                     ============================
      This is the main function to transfer data from device
      source is mostly "DAT"

LTrace* GetTrace() const
   -*-*-*-*-*-*-*-*-*return aqusited data*-*-*-*-*-*-*-*-*
                   ============================

TH1F* GetHWF(const int numbins,const char* title,float lp,float hp)
   -*-*-*-*-*-*-*-*-*return histogram from transfered data*-*-*-*-*-*-*-*-*
                  ============================
     Take care, that histograms can't contain 250K points!!
if(fHWF) delete fHWF;
if(fHWF) delete fHWF;

void SetVDIV(const char* vdiv,const char* channel)

void SetOffset(const char* vdiv,const char* channel)

float GetVDIV(const char* channel)
printf("%s:VDIV %f %dn",channel,fScopeState->fVDIV[fScopeState->GetChanId(channel)],fScopeState->GetChanId("C2"));
fScopeState->PrintIt();

float GetOffset(const char* channel)

void SetTriggerDelay(const float percent)



Inline Functions


              Int_t GetNP() const
              float GetTriggerDelay() const
               void DownloadState()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
             LScope LScope(LScope&)


Author: Andrej Filipcic , Egon Pavlica (documentation)
Last update: Tue Mar 26 14:41:25 2002


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.