Changeset 1023 for trunk/MagicSoft/Mars/mgui
- Timestamp:
- 11/01/01 10:19:46 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r1018 r1023 2 2 3 3 #include <math.h> 4 #include <fstream.h> 4 5 5 6 #include <TClonesArray.h> … … 308 309 } 309 310 } 311 312 // ------------------------------------------------------------------------ 313 // 314 // Save primitive as a C++ statement(s) on output stream out 315 // 316 void MCamDisplay::SavePrimitive(ofstream &out, Option_t *opt) 317 { 318 if (!gROOT->ClassSaved(TCanvas::Class())) 319 fDrawingPad->SavePrimitive(out, opt); 320 321 out << " " << fDrawingPad->GetName() << "->SetWindowSize("; 322 out << fDrawingPad->GetWw() << "," << fDrawingPad->GetWh() << ");" << endl; 323 } -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r1015 r1023 57 57 void Reset(); 58 58 void Draw(Option_t *option=""); 59 void SavePrimitive(ofstream &out, Option_t *); 59 60 60 61 ClassDef(MCamDisplay, 0) // Displays the magic camera -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r1018 r1023 30 30 #include "MHexagon.h" 31 31 32 #include <fstream.h> 32 33 #include <iostream.h> 33 34 … … 51 52 // 52 53 MHexagon::MHexagon(Float_t x, Float_t y, Float_t d) 53 : TAtt Fill(0, 1001), fX(x), fY(y), fD(d)54 : TAttLine(1, 1, 1), TAttFill(0, 1001), fX(x), fY(y), fD(d) 54 55 { 55 56 } … … 60 61 // 61 62 MHexagon::MHexagon(MGeomPix &pix) 62 : TAtt Fill(0, 1001)63 : TAttLine(1, 1, 1), TAttFill(0, 1001) 63 64 { 64 65 fX = pix.GetX(); … … 246 247 void MHexagon::Print(Option_t *) const 247 248 { 248 cout << GetName() << ": x=" << fX << "mm y=" << fY << "mm r=" << fD << "mm" << endl; 249 250 cout << " Color=" << GetLineColor() << ","; 251 cout << " Style=" << GetLineStyle() << ","; 252 cout << " Width=" << GetLineWidth() << ","; 253 cout << " FillColor=" << GetFillColor() << endl; 254 } 249 cout << "MHexagon - " << GetName() << ": "; 250 cout << "x=" << fX << "mm y=" << fY << "mm r=" << fD << "mm" << endl; 251 252 cout << " Line:"; 253 cout << " Color=" << GetLineColor() << ","; 254 cout << " Style=" << GetLineStyle() << ","; 255 cout << " Width=" << GetLineWidth() << endl; 256 cout << " Fill:"; 257 cout << " Color=" << GetFillColor() << ","; 258 cout << " Style=" << GetFillStyle() << endl; 259 } 260 261 // ------------------------------------------------------------------------ 262 // 263 // Save primitive as a C++ statement(s) on output stream out 264 // 265 void MHexagon::SavePrimitive(ofstream &out, Option_t *) 266 { 267 268 if (gROOT->ClassSaved(MHexagon::Class())) 269 out << " "; 270 else 271 out << " MHexagon *"; 272 273 out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << ");" << endl; 274 275 SaveFillAttributes(out, "hexagon"); 276 SaveLineAttributes(out, "hexagon"); 277 278 out << " hexagon->Draw();" << endl; 279 } -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r1018 r1023 44 44 virtual ~MHexagon(); 45 45 46 v oid Copy(TObject &hexagon);46 virtual void Copy(TObject &hexagon); 47 47 48 48 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); 49 virtual void DrawHexagon( 49 virtual void DrawHexagon(Float_t x, Float_t y, Float_t d); 50 50 51 51 //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); … … 55 55 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d); 56 56 virtual void Print(Option_t *Option="") const; // *MENU* 57 virtual void SavePrimitive(ofstream &out, Option_t *); 57 58 58 59 ClassDef(MHexagon, 0) // A hexagon for MAGIC
Note:
See TracChangeset
for help on using the changeset viewer.