V172X_Event.hh

Go to the documentation of this file.
00001 
00007 #ifndef V172X_EVENT_h
00008 #define V172X_EVENT_h
00009 
00010 #include <vector>
00011 #include <stdint.h>
00012 #include <boost/shared_ptr.hpp>
00013 
00014 //forward declaration
00015 class V172X_Params;
00016 
00021 class V172X_BoardData{
00022 public:
00024   V172X_BoardData(const unsigned char* raw_data);
00026   ~V172X_BoardData();
00027   uint32_t event_size;      
00028   uint8_t channel_mask;     
00029   uint16_t pattern;         
00030   bool zle_enabled;         
00031   uint8_t board_id;         
00032   uint32_t event_counter;   
00033   uint32_t timestamp;       
00034   static const int nchans = 8; 
00035   char* channel_start[nchans]; 
00036   char* channel_end[nchans];   
00037 };
00038 
00039 
00044 class V172X_Event{
00045 public:
00047   V172X_Event(const unsigned char* raw_data, const unsigned int size,
00048               V172X_Params* params = 0);
00050   ~V172X_Event();
00052   int GetNBoards(){ return _boards.size(); }
00054   const V172X_BoardData& GetBoard(int n){ return _boards.at(n); }
00055   //uint32_t GetID(){ return _base->GetID(); }
00056   //uint32_t GetTimestamp(){ return _base->GetTimestamp(); }  
00057   
00059   const V172X_Params* GetParameters() const { return _params; }
00061   void SetParameters(V172X_Params* params){ _params=params; }
00062 private:
00063   const unsigned char* _buffer;           
00064   const unsigned int _size;               
00065   V172X_Params* _params;                  
00066   std::vector<V172X_BoardData> _boards;   
00067 };
00068 
00073 typedef boost::shared_ptr<V172X_Event> V172XEventPtr;
00074 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1