V172X_Daq.hh

Go to the documentation of this file.
00001 
00006 #ifndef V172X_Daq_h
00007 #define V172X_Daq_h
00008 
00009 #include "BaseDaq.hh"
00010 #include "V172X_Params.hh"
00011 #include "stdint.h"
00012 #include "CAENVMElib.h"
00013 
00014 //forward declaration
00015 namespace std{
00016   class runtime_error;
00017 }
00018 
00024 class V172X_Daq : public BaseDaq
00025 {
00026   //Inherited members from BaseDaq
00027 public:
00029   V172X_Daq();
00031   ~V172X_Daq();
00032   
00034   V172X_Params* GetParameters(){ return &_params; }
00035   
00037   int Initialize();
00039   int Update();
00040   private:
00042   void DataAcquisitionLoop();
00043     
00045   int InitializeBoard(int boardnum);
00046   
00047   //---------defined in V172X_Daq_Helpers.cc-------
00048   /*The following helper functions all throw a uint32_t exception to denote 
00049     the address which generated it, and set the eStatus enum of the class 
00050     to the appropriate value.
00051   */
00058   void WriteVMERegister(uint32_t address, 
00059                         uint32_t write_me, int32_t handle) throw(std::runtime_error);
00060 
00062   uint32_t ReadVMERegister(uint32_t address, int32_t handle) throw(std::runtime_error);
00063 
00068   void WriteVMERegisters(uint32_t address, 
00069                          uint32_t write_me) throw(std::runtime_error);
00070 
00076   void WriteVMERegisters(uint32_t address, 
00077                          uint32_t* write_me) throw(std::runtime_error);
00078 
00084   void ReadVMERegisters(uint32_t address, 
00085                         uint32_t * data) throw(std::runtime_error);
00086   
00087   int32_t _handle_vme_bridge;
00088   int32_t _handle_board[V172X_Params::nboards];  
00089   bool _initialized;         
00090   V172X_Params _params;      
00091   long _triggers;            
00092   boost::mutex _vme_mutex;   
00093   //std::vector<uint8_t*> raw_buffer;
00094   //std::vector<boost::mutex*> buffer_mutex;
00095   
00096 };
00097 
00098 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1