00001 00002 #ifndef QGUI_DATA_COLLECTOR_HH 00003 #define QGUI_DATA_COLLECTOR_HH 00004 00005 #include <string> 00006 #include <vector> 00007 #include <set> 00008 00009 #include "QCuore.hh" 00010 #include "QDbDetector.hh" 00011 00020 class QGUIDataCollector 00021 { 00022 public: 00023 00025 QGUIDataCollector(); 00026 00028 QGUIDataCollector(Int_t shifterSet); 00029 00031 virtual ~QGUIDataCollector(); 00032 00034 Int_t GetRunNumber() const {return fRunNumber;} 00035 00037 Int_t GetSettingBasketId() const {return fBasket;} 00038 00040 Int_t GetShifterSet() const {return fShifterSet;} 00041 00043 QDbDetector::RunType GetRunType() const { return fRunType; } 00044 00046 const std::string& GetComments() const { return fComments; } 00047 00049 Int_t GetCalibSet() const { return fCalibSet; } 00050 00052 Int_t GetStopStatusId() const { return fStopStatusId; } 00053 00055 const std::string& GetMasterShifter() const { return fMasterShifter; } 00056 00058 const std::string& GetNormalShifter1() const { return fNormalShifter1; } 00059 00061 const std::string& GetNormalShifter2() const { return fNormalShifter2; } 00062 00064 const std::set<std::string>& GetListOfUsers() const { return fUsers; } 00065 00070 Bool_t GetIsValid() const { return fIsValid; } 00071 00073 const std::string& GetSettingBasketName() const { return fBasketName; } 00074 00075 00077 Int_t GetLastPerformedRun() 00078 { return fLastRun; } 00079 00081 Int_t GetMinRunNumber() const {return fMinRun;} 00082 00084 Int_t GetMinRunAllowed() const { return fLowerAllowedRun; } 00085 00092 Int_t GetMaxRunNumber() const {return fMaxRun;} 00093 00095 Int_t GetMaxRunAllowed() const { return fUpperAllowedRun; } 00096 00102 Int_t GetNextRunNumber() const { return fNextRun; } 00103 00104 00109 bool IsValidRun(Int_t newRun) const; 00110 00112 bool IsValidSettingBasket(Int_t newBasket) const; 00113 00119 bool IsValidShifterSet(Int_t newSet) const; 00120 00126 bool SetRunNumber (Int_t newRunNumber); 00127 00132 bool SetSettingBasketId(Int_t newBasket); 00133 00138 bool SetShifterSet(Int_t newSet); 00139 00141 void SetRunType(QDbDetector::RunType runType) { fRunType = runType; } 00142 00144 void SetComments(const std::string& comments) { fComments = comments; } 00145 00147 void SetCalibSet(Int_t calibSet) { fCalibSet = calibSet; } 00148 00150 void SetStopStatusId(Int_t id) { fStopStatusId = id; } 00151 00157 Bool_t SetMasterShifter(const std::string& name); 00158 00164 Bool_t SetNormalShifter1(const std::string& name); 00165 00171 Bool_t SetNormalShifter2(const std::string& name); 00172 00177 void SetIsValid(Bool_t isValid) { fIsValid = isValid; } 00178 00184 void Reset(); 00185 00186 private: 00187 00188 Int_t fBasket; 00189 Int_t fRunNumber; 00190 Int_t fShifterSet; 00191 std::string fBasketName; 00192 std::string fComments; 00193 Int_t fCalibSet; 00194 Int_t fStopStatusId; 00195 QDbDetector::RunType fRunType; 00196 std::string fMasterShifter; 00197 std::string fNormalShifter1; 00198 std::string fNormalShifter2; 00199 std::set<std::string> fUsers; 00205 Bool_t fIsValid; 00206 00207 const Int_t fLowerAllowedRun; 00208 const Int_t fUpperAllowedRun; 00209 Int_t fLastRun; 00210 Int_t fMinRun; 00216 Int_t fMaxRun; 00217 00219 Int_t fNextRun; 00220 00222 std::vector<Int_t> fRunsVector; 00223 00225 std::vector<Int_t> fSettingsVector; 00226 }; 00227 #endif