00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4POLYCOND_H 00017 #define TGO4POLYCOND_H 00018 00019 #include "TGo4Condition.h" 00020 00021 class TH1; 00022 class TH2; 00023 00024 class TGo4PolyCond : public TGo4Condition { 00025 public: 00026 TGo4PolyCond(); 00027 00028 TGo4PolyCond(const char* name, const char* title = "Go4 polygon condition"); 00029 00030 virtual ~TGo4PolyCond(); 00031 00033 virtual TGo4ConditionPainter* CreatePainter(); 00034 00038 virtual void SetPainter(TGo4ConditionPainter* painter); 00039 00040 // virtual void SetValues() {} 00041 // virtual void SetValues(Double_t low1, Double_t up1) {} 00042 // virtual void SetValues(Double_t low1, Double_t up1, Double_t low2, Double_t up2) {} 00043 00045 virtual void SetValues(Double_t * x, Double_t * y, Int_t len); 00046 00048 virtual void SetValues(TCutG * newcut); 00049 00051 void SetValuesDirect(TCutG * newcut); 00052 00053 // virtual Bool_t Test() { return true; } 00054 // virtual Bool_t Test(Double_t x) { return true; } 00055 // virtual Bool_t Test(Bool_t on) { return true; } 00056 00058 virtual Bool_t Test(Double_t x, Double_t y); 00059 00061 virtual Double_t GetXLow(); 00062 00064 virtual Double_t GetXUp(); 00065 00067 virtual Double_t GetYLow(); 00068 00070 virtual Double_t GetYUp(); 00071 00078 TCutG* GetCut(Bool_t changeowner); 00079 00081 void PrintCondition(Bool_t points); 00082 00085 Bool_t UpdateFrom(TGo4Condition * cond, Bool_t counts); 00086 00088 virtual Double_t GetIntegral(TH1* histo, Option_t* opt=""); 00089 00091 virtual Double_t GetMean(TH1* histo, Int_t axis=1); 00092 00094 virtual Double_t GetRMS(TH1* histo, Int_t axis=1); 00095 00097 virtual Double_t GetXMax(TH1* histo); 00098 00100 virtual Double_t GetYMax(TH1* histo); 00101 00103 virtual Double_t GetCMax(TH1* histo); 00104 00105 virtual Bool_t IsPolygonType(); 00106 00107 virtual Int_t GetMemorySize(); 00108 00111 static void CleanupSpecials(); 00112 00113 static TString NextAvailableName(); 00114 00115 private: 00119 TCutG * CloneCut(TGo4PolyCond * source); 00120 00124 TH2* CreateCutHistogram(TH1* source); 00125 00127 TCutG* fxCut; 00128 00129 ClassDef(TGo4PolyCond,6) 00130 }; 00131 00132 #endif //TGO4POLYCOND_H 00133 00134 //----------------------------END OF GO4 SOURCE FILE ---------------------