00001 00002 #ifndef _Q_PULSER_CHANNEL_HH_ 00003 #define _Q_PULSER_CHANNEL_HH_ 00004 00005 #include <vector> 00006 00007 00008 class QPulserConfig; 00009 class QDaqChannel; 00010 00016 class QPulserChannel 00017 { 00018 public: 00020 QPulserChannel(); 00021 00030 QPulserChannel(const QDaqChannel& daqChan); 00031 00036 void Set(const QDaqChannel& daqChan); 00037 00038 00043 void Set(const QPulserChannel& other); 00044 00046 virtual ~QPulserChannel(); 00047 00052 const QPulserConfig* GetNextConfig(); 00053 00055 unsigned int GetDelay() const { return fDelayMs; } 00056 00058 unsigned int GetId() const { return fId; } 00059 00061 void SetId(unsigned int id) { fId = id; } 00063 void SetCh(unsigned int ch) { fCh = ch; } 00065 void SetDelay(unsigned int delay) { fDelayMs = delay; } 00066 00068 void SetPattern(const std::vector<QPulserConfig*>& pattern); 00069 00070 00071 private: 00073 unsigned int fId; 00074 00076 unsigned int fCh; 00077 00079 std::vector<QPulserConfig*> fPattern; 00080 00082 std::vector<QPulserConfig*>::const_iterator fNext; 00083 00085 unsigned int fDelayMs; 00086 00088 void EmptyPattern(); 00089 00095 void Consolidate(QPulserConfig *config); 00096 00098 void FillIds(); 00099 }; 00100 00101 #endif