00001 /* Display for BDSIM code 00002 Author: Olivier Dadoun, Laboratoire de l'Accelerateur Lineaire (LAL-IN2P3), Orsay (France) 00003 <mailto:> dadoun@lal.in2p3.fr, 2005 00004 Last modified 12.06.2005 00005 */ 00006 #ifndef __BDSCanvas__ 00007 #define __BDSCanvas__ 00008 00009 #ifndef ROOT_TCanvas 00010 #include "TCanvas.h" 00011 #endif 00012 00013 #ifndef ROOT_TH1F 00014 #include "TH1F.h" 00015 #endif 00016 00017 #ifndef ROOT_TH2F 00018 #include "TH2F.h" 00019 #endif 00020 00021 #ifndef ROOT_TPad 00022 #include "TPad.h" 00023 #endif 00024 00025 #ifndef ROOT_TSYSTEM 00026 #include "TSystem.h" 00027 #endif 00028 00029 #ifndef ROOT_TTEXT 00030 #include "TText.h" 00031 #endif 00032 #define MAX_ELEMENTS 1000 00033 class BDSPad; 00034 00035 class BDSCanvas : public TCanvas 00036 { 00037 public: 00038 BDSCanvas(char* opticfile); 00039 ~BDSCanvas(); 00040 00041 void AxisClicked(); 00042 static void AxisClickedCB(); 00043 00044 BDSPad *GetLine(){return line;} 00045 TPad *GetPlot(){return plot;} 00046 00047 TH1F *GetHisto(){return h2;} 00048 TH1F *SetHisto(TH1F* temp) {h2=temp;} 00049 00050 void UserInfo(char* _path); 00051 00052 Double_t EndPositionElement[MAX_ELEMENTS]; 00053 Double_t* GetEndPositionElement() {return EndPositionElement;} 00054 00055 TString TypeElement[MAX_ELEMENTS]; 00056 TString* GetTypeElement() {return TypeElement;} 00057 TString NameElement[MAX_ELEMENTS]; 00058 TString* GetNameElement() {return NameElement;} 00059 Int_t NumberElement; 00060 Int_t GetNumberElement() {return NumberElement;} 00061 Double_t ElementXAper[MAX_ELEMENTS]; 00062 Double_t* GetElementXAper() {return ElementXAper;} 00063 Double_t ElementYAper[MAX_ELEMENTS]; 00064 Double_t* GetElementYAper() {return ElementYAper;} 00065 00066 private: 00067 BDSPad *line; 00068 TPad *plot; 00069 TH1F *h2; 00070 00071 Double_t xmin,xmax; 00072 Double_t xcut; 00073 00074 public: 00075 ClassDef(BDSCanvas,1) 00076 00077 }; 00078 #endif