ROOT logo
/*!\class UsbIO
\author Alexandre A. P. Suaide 

<p>
This class is derived from PelIO and overwrites some of PelIO's methods to
allow connection to a USB system for data acquisition. 
*/
#ifndef UsbIO_HH
#define UsbIO_HH

#include "PelIO.h"
#include "TROOT.h"

class UsbIO : public PelIO
{
  private:    
    bool               mIsUsb;  ///< bool variable to flag if USB is being used
    int                readBlock(); ///< Read event block from USB
      
  public:
                       UsbIO(char* name="UsbIO",char *title="Pellectron IO"); ///< Default constructor
    virtual            ~UsbIO();///< Default destructor
    
    // Input/output methods
    int                openInput(char* file="/dev/c111a0"); ///< Open input stream
    int                closeInput(); ///< Close input stream
    
    // CAMAC related methods
    int                loadEVO(char*); ///< Load Event Handler file into memory
    int                start(); ///< Start USB acquisition
    int                stop(); ///< Stop USB acquisition
    int                getNEventsLost(); ///< Get number of events lost during acquisition
    int                getNUsedBuffers(); ///< Get number of used buffers
    int                getNBuffers(); ///< Get number of buffers
    int                readScalers(int,int*,int=0); ///< Read scalers
    int                clearScalers(int,int=0); ///< Clear scalers
    int                setBufferSize(int); ///<Sets USB buffer size in byets
        
  ClassDef(UsbIO,1)
};
#endif
 UsbIO.h:1
 UsbIO.h:2
 UsbIO.h:3
 UsbIO.h:4
 UsbIO.h:5
 UsbIO.h:6
 UsbIO.h:7
 UsbIO.h:8
 UsbIO.h:9
 UsbIO.h:10
 UsbIO.h:11
 UsbIO.h:12
 UsbIO.h:13
 UsbIO.h:14
 UsbIO.h:15
 UsbIO.h:16
 UsbIO.h:17
 UsbIO.h:18
 UsbIO.h:19
 UsbIO.h:20
 UsbIO.h:21
 UsbIO.h:22
 UsbIO.h:23
 UsbIO.h:24
 UsbIO.h:25
 UsbIO.h:26
 UsbIO.h:27
 UsbIO.h:28
 UsbIO.h:29
 UsbIO.h:30
 UsbIO.h:31
 UsbIO.h:32
 UsbIO.h:33
 UsbIO.h:34
 UsbIO.h:35
 UsbIO.h:36
 UsbIO.h:37
 UsbIO.h:38
 UsbIO.h:39
 UsbIO.h:40
 UsbIO.h:41