Changeset 961 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 10/05/01 14:39:20 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r959 r961 89 89 // 90 90 if (!gPad) 91 new TCanvas("CamDisplay", "Magic Camera Display", 0, 0, 650, 500);91 fDrawingPad = new TCanvas("CamDisplay", "Magic Camera Display", 0, 0, 650, 500); 92 92 else 93 { 93 94 gPad->Clear(); 95 fDrawingPad = gPad; 96 } 94 97 95 98 // … … 123 126 void MCamDisplay::DrawPhotNum(const MCerPhotEvt *event) 124 127 { 128 fDrawingPad->cd(); 125 129 126 130 // … … 172 176 void MCamDisplay::DrawPhotErr(const MCerPhotEvt *event) 173 177 { 178 fDrawingPad->cd(); 179 174 180 // 175 181 // reset the all pixel colors to a default value -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r959 r961 20 20 class TBox; 21 21 class TText; 22 class TVirtualPad; 22 23 class TClonesArray; 23 24 … … 38 39 TClonesArray *fLegend; 39 40 TClonesArray *fLegText; 41 42 TVirtualPad *fDrawingPad; 40 43 41 44 TBox *GetBox(Int_t i) { return (TBox*) fLegend->At(i); } … … 71 74 } 72 75 73 ClassDef(MCamDisplay, 0) // Display the magic camera76 ClassDef(MCamDisplay, 0) // Displays the magic camera 74 77 }; 75 78 -
trunk/MagicSoft/Mars/mgui/MGeomCam.h
r859 r961 36 36 virtual void Print(Option_t *opt=NULL); 37 37 38 ClassDef(MGeomCam, 1) 38 ClassDef(MGeomCam, 1) // Geometry base class for the camera 39 39 }; 40 40 -
trunk/MagicSoft/Mars/mgui/MGeomPix.h
r715 r961 9 9 { 10 10 private: 11 Float_t fX; // the x coordinate12 Float_t fY; // the y coordinate13 Float_t fR; // the r coordinate11 Float_t fX; // the x coordinate 12 Float_t fY; // the y coordinate 13 Float_t fR; // the r coordinate 14 14 15 Byte_t fNumNeighbors; // number of valid neighbors16 Short_t fNeighbors[6]; // the IDs of the pixel next to it17 // we are assuming an hexagonal geometry15 Byte_t fNumNeighbors; // number of valid neighbors 16 Short_t fNeighbors[6]; // the IDs of the pixel next to it 17 // we are assuming an hexagonal geometry 18 18 19 19 public: 20 MGeomPix(Float_t x=0. , Float_t y=0., Float_t r=0.) ; 21 22 void Print(Option_t *opt=NULL) ; 20 MGeomPix(Float_t x=0, Float_t y=0, Float_t r=0); 23 21 24 void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }22 void Print(Option_t *opt=NULL); 25 23 26 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1, 27 Short_t i3=-1, Short_t i4=-1, Short_t i5=-1); 28 29 void SetX (Float_t x) { fX = x; } 30 void SetY (Float_t y) { fY = y; } 31 void SetR (Float_t r) { fR = r; } 24 void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; } 32 25 33 Float_t GetX() const { return fX; } 34 Float_t GetY() const { return fY; } 35 Float_t GetR() const { return fR; } 26 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1, 27 Short_t i3=-1, Short_t i4=-1, Short_t i5=-1); 36 28 37 Byte_t GetNumNeighbors() const { return fNumNeighbors; } 38 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; } 29 void SetX (Float_t x) { fX = x; } 30 void SetY (Float_t y) { fY = y; } 31 void SetR (Float_t r) { fR = r; } 39 32 40 ClassDef(MGeomPix, 1) // Geometric class for one pixel 41 } ; 33 Float_t GetX() const { return fX; } 34 Float_t GetY() const { return fY; } 35 Float_t GetR() const { return fR; } 36 37 Byte_t GetNumNeighbors() const { return fNumNeighbors; } 38 Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; } 39 40 ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel 41 }; 42 42 43 43 #endif -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r698 r961 24 24 class MGeomPix; 25 25 26 class MHexagon : public TObject, public TAttLine, public TAttFill 27 { 28 protected: 29 30 Float_t fX ; // X coordinate of center 31 Float_t fY ; // Y coordinate of center 32 Float_t fD ; // diameter D or better distance between opposite sides 33 34 public: 35 36 MHexagon() ; 37 MHexagon(Float_t x, Float_t y, Float_t d ) ; 38 MHexagon(MGeomPix &pix); 39 MHexagon( const MHexagon &hexagon) ; 40 virtual ~MHexagon() ; 26 class MHexagon : public TObject, public TAttLine, public TAttFill 27 { 28 protected: 41 29 42 void Copy ( TObject &hexagon ) ; 30 Float_t fX; // X coordinate of center 31 Float_t fY; // Y coordinate of center 32 Float_t fD; // diameter D or better distance between opposite sides 43 33 44 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py ) ; 45 virtual void DrawHexagon( Float_t x, Float_t y, Float_t d ) ; 46 47 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py ) ; 48 49 virtual void ls (Option_t *Option="") ; 50 virtual void Paint(Option_t *Option="") ; 51 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d) ; 52 virtual void Print(Option_t *Option="") ; 34 public: 53 35 54 ClassDef ( MHexagon, 0 ) // a hexagon for MAGIC 36 MHexagon(); 37 MHexagon(Float_t x, Float_t y, Float_t d); 38 MHexagon(MGeomPix &pix); 39 MHexagon(const MHexagon &hexagon); 40 virtual ~MHexagon(); 55 41 56 } ; 42 void Copy (TObject &hexagon); 57 43 58 #endif 44 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); 45 virtual void DrawHexagon( Float_t x, Float_t y, Float_t d); 59 46 47 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); 48 49 virtual void ls (Option_t *Option=""); 50 virtual void Paint(Option_t *Option=""); 51 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d); 52 virtual void Print(Option_t *Option=""); 53 54 ClassDef(MHexagon, 0) // A hexagon for MAGIC 55 }; 56 57 #endif 58
Note:
See TracChangeset
for help on using the changeset viewer.