00001 #ifndef _Q_PULSER_CHANNEL_HH_ 00002 #define _Q_PULSER_CHANNEL_HH_ 00003 00004 #include <vector> 00005 #include "QPulserDefs.hh" 00006 00007 class QDaqChannel; 00008 00009 class QPulserChannel 00010 { 00011 public: 00013 QPulserChannel(); 00014 00023 QPulserChannel(const QDaqChannel& daqChan); 00024 00029 void Set(const QDaqChannel& daqChan); 00030 00032 virtual ~QPulserChannel(); 00033 00038 const QPulserConfig_t* GetNextConfig(); 00039 00041 unsigned short GetDelay() const { return fDelay; } 00042 00044 unsigned short GetId() const { return fId; } 00045 00046 private: 00048 unsigned short fId; 00049 00051 unsigned short fCh; 00052 00054 std::vector<QPulserConfig_t*> fPattern; 00055 00057 std::vector<QPulserConfig_t*>::const_iterator fNext; 00058 00060 unsigned short fDelay; 00061 00063 void EmptyPattern(); 00064 00070 void Consolidate(QPulserConfig_t *config); 00071 00073 void FillIds(); 00074 00075 bool IsEqual(const QPulserConfig_t* a, const QPulserConfig_t* b) const; 00076 00077 friend class QPulserGroup; 00078 }; 00079 00080 #endif