00001 00051 #ifndef _M_WP_SLOW_CONTROLLER_HH_ 00052 #define _M_WP_SLOW_CONTROLLER_HH_ 00053 00054 00055 #include "QDriver.hh" 00056 #include "QError.hh" 00057 #include "QWPCommon.hh" 00058 #include "QLCConfigWriter.hh" 00059 #include "QLCConfigReader.hh" 00060 00061 00062 #include <list> 00063 #include <set> 00064 #include <vector> 00065 00066 class QLCSlowConfig; 00067 00068 class MWPSlowController : public QDriver { 00069 00070 public: 00072 MWPSlowController(QSequence* s); 00073 00075 virtual ~MWPSlowController(); 00076 00084 Action Init(); 00085 00092 Action Do(QEvent* ev); 00093 00095 Action Done(); 00096 00097 private: 00102 std::vector< std::list<unsigned short> > fGroups; 00103 00104 std::map<unsigned short,QLCSlowConfig> fGroupStartConfigs; 00105 std::map<unsigned short,QLCSlowConfig> fDumpStartConfigs; 00106 std::set<unsigned short> fNextChannels; 00107 std::string fTmpConfigOutputFile; 00108 std::string fConfigOutputFile; 00109 QLCConfigWriter fFullCfgWriter; 00110 QLCConfigReader fCfgReader; 00111 bool fGndMeasurement; 00112 int fRL; 00113 int fBias; 00114 double fExternalBias; 00115 bool fInvertPolarity; 00116 bool fAdjustOffset; 00117 00118 00119 QWPCommon::Step fStep; 00120 short fGain; 00121 unsigned int fDaqRun; 00122 00130 void GroupChannels(const std::list<unsigned short>& channels); 00131 00137 void InitConfig(QLCSlowConfig& conf); 00138 00145 QWPCommon::Step PopulateNextConfig(const QWPCommon::Step step); 00146 bool fReadConfigFromFile; 00147 00148 }; 00149 00150 #endif // _M_LC_SLOW_CONTROLLER_HH_