Changeset 2189
- Timestamp:
- 06/17/03 16:07:50 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mgui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r2178 r2189 47 47 #include <TCanvas.h> 48 48 #include <TArrayF.h> 49 #include <TRandom.h> 49 50 #include <TClonesArray.h> 50 51 … … 85 86 fLegend = NULL; 86 87 fLegText = NULL; 88 fPhotons = NULL; 87 89 fArrowX = NULL; 88 90 fArrowY = NULL; … … 93 95 fMaximum = 1; 94 96 95 fNotify = new TList;97 fNotify = NULL; 96 98 } 97 99 … … 199 201 MCamDisplay::~MCamDisplay() 200 202 { 201 fPixels->Delete(); 202 fLegend->Delete(); 203 fLegText->Delete(); 204 fPhotons->Delete(); 205 206 delete fPixels; 207 delete fLegend; 208 delete fLegText; 209 delete fPhotons; 210 211 delete fArrowX; 212 delete fArrowY; 213 214 delete fLegRadius; 215 delete fLegDegree; 216 217 delete fGeomCam; 218 219 delete fNotify; 203 if (fPixels) 204 { 205 fPixels->Delete(); 206 delete fPixels; 207 } 208 if (fLegend) 209 { 210 fLegend->Delete(); 211 delete fLegend; 212 } 213 if (fLegText) 214 { 215 fLegText->Delete(); 216 delete fLegText; 217 } 218 if (fPhotons) 219 { 220 fPhotons->Delete(); 221 delete fPhotons; 222 } 223 224 if (fArrowX) 225 delete fArrowX; 226 if (fArrowY) 227 delete fArrowY; 228 if (fLegRadius) 229 delete fLegRadius; 230 if (fLegDegree) 231 delete fLegDegree; 232 if (fGeomCam) 233 delete fGeomCam; 234 if (fNotify) 235 delete fNotify; 220 236 } 221 237 … … 227 243 // created. 228 244 // 245 // To draw a camera into its own pad do something like: 246 // 247 // TCanvas *c = new TCanvas; 248 // c->Divide(2,1); 249 // MGeomCamMagic m; 250 // MCamDisplay *d=new MCamDisplay(&m); 251 // d->FillRandom(); 252 // c->cd(1); 253 // gPad->SetBorderMode(0); 254 // gPad->Divide(1,1); 255 // gPad->cd(1); 256 // d->Draw(); 257 // d->SetBit(kCanDelete); 258 // 229 259 void MCamDisplay::Draw(Option_t *option) 230 260 { … … 235 265 pad->SetBorderMode(0); 236 266 pad->SetFillColor(16); 237 //pad->Modified(); 238 /* 239 pad->Divide(1,1); 240 pad->cd(1); 241 gPad->SetBorderMode(0); 242 gPad->SetFillColor(16); 243 */ 267 244 268 AppendPad(""); 245 269 } … … 492 516 } 493 517 518 void MCamDisplay::FillRandom() 519 { 520 Reset(); 521 522 // FIXME: Security check missing! 523 for (UInt_t idx=0; idx<fNumPixels; idx++) 524 { 525 fData[idx] = gRandom->Uniform(); 526 (*this)[idx].SetBit(kIsUsed); 527 } 528 } 529 494 530 // ------------------------------------------------------------------------ 495 531 // -
trunk/MagicSoft/Mars/mgui/MCamDisplay.h
r2178 r2189 45 45 Float_t fRange; // the range in millimeters of the present geometry 46 46 47 TArrayI fColors; 47 TArrayI fColors; // Color conversion table 48 48 49 49 TArrow *fArrowX; // Coordinate System … … 58 58 TClonesArray *fPhotons; // array of reflector photons 59 59 60 TArrayF fData; 60 TArrayF fData; // 61 61 Float_t fMinimum; 62 62 Float_t fMaximum; 63 63 64 TList *fNotify; 64 TList *fNotify; //! 65 65 66 66 //TGStatusBar *fStatusBar; … … 96 96 void Fill(const MCamEvent &event, Int_t type=0); 97 97 void Fill(const TArrayF &event, Bool_t ispos=kTRUE); 98 void FillRandom(); 98 99 99 100 void DrawPixelNumbers(); … … 122 123 //void SetStatusBar(TGStatusBar *bar) { fStatusBar = bar; } 123 124 124 ClassDef(MCamDisplay, 0) // Displays the magic camera125 ClassDef(MCamDisplay, 1) // Displays the magic camera 125 126 }; 126 127 -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r2135 r2189 66 66 Float_t GetD() const { return fD; } 67 67 68 ClassDef(MHexagon, 0) // A hexagon for MAGIC68 ClassDef(MHexagon, 1) // A hexagon for MAGIC 69 69 }; 70 70
Note:
See TracChangeset
for help on using the changeset viewer.