00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TGO4WINDOWEDITSLOTS_H
00017 #define TGO4WINDOWEDITSLOTS_H
00018
00019 # define __MAXMARKERS__ 1000
00020
00021
00022 #include "Go4GUIBase/TGo4SlotsBaseClass.h"
00023
00024 #include <vector>
00025 #include "Go4MouseModes.h"
00026
00027 class TGo4Condition;
00028 class TGo4CondArray;
00029 class TGo4WinCond;
00030 class TGo4WindowEdit;
00031 class TGo4WindowEditStatus;
00032 class TGo4Status;
00033 class TPad;
00034 class TH1;
00035 class TGo4PreviewPanel;
00036 class TGo4GUIRegistry;
00037
00038 using namespace std;
00039
00044 class TGo4WindowEditSlots : public TGo4SlotsBaseClass {
00045
00046 public:
00047 TGo4WindowEditSlots(const char * name, const char * title, TGo4WindowEdit* p=0);
00048 virtual ~TGo4WindowEditSlots();
00049
00050 void StatusChanged(TGo4Status *status);
00051 void AddObject(TNamed *);
00052
00053 TGo4Status* GetStatus();
00054 void SetGUI(TGo4WindowEdit* GUI) {fxTGo4WindowEdit=GUI; }
00055 void SendUpdateCommand(const Text_t* newname=0);
00056 void SendRefreshCommand(const Text_t* newname=0);
00057
00061 void CreateNewCondition(const Text_t* name,
00062 const Text_t* classname,
00063 Int_t num=1, Int_t dim=1);
00064
00066 void SetWorkingPad();
00067
00069 void SetHistogram();
00070
00072 void SetViewPanel(TGo4PreviewPanel* view);
00073
00075 void Click(TGo4PreviewPanel* view, TPad* pad);
00076
00079 void RemoveViewPanel(TGo4PreviewPanel* view);
00080
00083 void AssignWorkViewPanel(TGo4PreviewPanel* view);
00084
00086 void DrawMarkers();
00087
00089 void DrawConditions();
00090
00092 void HighlightCondition(Int_t index);
00093
00096 void ClearConditions(Bool_t keeplabels=kFALSE);
00097
00099 void ClearCounters();
00100
00102 void EnterEvent();
00103
00104 Bool_t NeedsUpdate(){return fbNeedsUpdate;}
00105
00107 void SetLimits(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
00108
00110 void SetResultMode(Int_t mode);
00111
00113 void SetInvertMode(Int_t mode);
00114
00116 Bool_t IsVisible();
00117
00119 void SetVisible(Bool_t on);
00120
00122 Bool_t IsHistogramLink();
00123
00125 void SetHistogramLink(Bool_t on);
00126
00128 const Text_t* GetHistogramName();
00129
00131 const Text_t* GetLinkedHistogramName();
00132
00134 Double_t GetIntegral();
00135
00137 Double_t GetMean(Int_t axis=1);
00138
00140 Double_t GetRMS(Int_t axis=1);
00141
00143 Double_t GetXMax();
00144
00146 Double_t GetYMax();
00147
00149 Double_t GetCMax();
00150 void SetHideMode(Bool_t on){fbHideAll=on;}
00151 void SetLabelDraw(Bool_t on);
00152 void SetLimitsDraw(Bool_t on);
00153 void SetIntDraw(Bool_t on);
00154 void SetXMeanDraw(Bool_t on);
00155 void SetXRMSDraw(Bool_t on);
00156 void SetYMeanDraw(Bool_t on);
00157 void SetYRMSDraw(Bool_t on);
00158 void SetXMaxDraw(Bool_t on);
00159 void SetYMaxDraw(Bool_t on);
00160 void SetCMaxDraw(Bool_t on);
00161 Bool_t IsLabelDraw();
00162 Bool_t IsLimitsDraw();
00163 Bool_t IsIntDraw();
00164 Bool_t IsXMeanDraw();
00165 Bool_t IsXRMSDraw();
00166 Bool_t IsYMeanDraw();
00167 Bool_t IsYRMSDraw();
00168 Bool_t IsXMaxDraw();
00169 Bool_t IsYMaxDraw();
00170 Bool_t IsCMaxDraw();
00171 void SetMouseMode(Go4MouseMode_t mode){fiMouseMode=mode;}
00172 void SetPickArray(Bool_t on){fbPickArray=on;}
00173 void SetPickCounter(UInt_t val){fuPickCounter=val;}
00174 Bool_t IsHideMode(){return fbHideAll;}
00175 Go4MouseMode_t GetMouseMode(){return fiMouseMode;}
00176 Bool_t IsPickArray(){return fbPickArray;}
00177 Int_t GetNumPads(){return fiNumPads;}
00178
00182 void SetNewTCutG(Bool_t editmode, Bool_t cancel=kFALSE);
00183
00187 TGo4Condition* GetWorkPadCondition(Int_t index=-1);
00188
00190 void SetWorkPadCondition(TGo4Condition* con);
00191
00193 void SetCurrentPad(Int_t index=0);
00194
00197 TPad* WorkingPad(Int_t index=-1);
00198
00199 TGo4WindowEdit* GetGUI(){return fxTGo4WindowEdit;}
00200
00201 private:
00203 TGo4GUIRegistry *fxTGo4GUIRegistry;
00204 TGo4WindowEdit *fxTGo4WindowEdit;
00205 TGo4WindowEditStatus *fxTGo4WindowEditStatus;
00206
00208 TGo4PreviewPanel* fxView;
00209
00211 TGo4PreviewPanel* fxWorkView;
00212
00214 vector <TPad*> fxPad;
00215
00217 Int_t fiCurrentPad;
00218
00220 Int_t fiNumPads;
00221
00223 TH1* fxHisto;
00224
00226 Bool_t fbHideAll;
00227
00233 Go4MouseMode_t fiMouseMode;
00234
00236 Bool_t fbPickArray;
00237
00239 UInt_t fuPickCounter;
00240
00242 Bool_t fbInitDone;
00243
00245 Bool_t fbNeedsUpdate;
00246
00249 TPad* FindObjectSubpad(TObject* obj, TPad* parent);
00250
00251 };
00252
00253 #endif //TGO4WINDOWEDITSLOTS_H
00254
00255