Changeset 3808 for trunk/MagicSoft/Mars
- Timestamp:
- 04/22/04 21:08:57 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstroCamera.cc
r3710 r3808 89 89 // HOW TO GET RID OF IT? Move MHCamera to mgeom? 90 90 91 #include "MStarLocalPos.h" 92 91 93 ClassImp(MAstroCamera); 92 94 … … 116 118 117 119 delete fMirror0; 120 118 121 } 119 122 … … 335 338 } 336 339 340 // -------------------------------------------------------------------------- 341 // 342 // Options: 343 // 344 // '*' Draw the mean of the reflections on all mirrors 345 // '.' Draw a dot for the reflection on each individual mirror 346 // 'h' To create a TH2D of the star-light which is displayed 347 // 'c' Use the underlaying MHCamera as histogram 348 // '0' Draw the reflection on a virtual perfect mirror 349 // 350 // If the Pad contains an object MHCamera of type MHCamera it is used. 351 // Otherwise a new object is created. 352 // 353 void MAstroCamera::FillStarList() 354 { 355 fStars->SetOwner(); 356 fStars->Delete(); 357 358 if (!fTime || !fObservatory || !fMirrors || !fStars) 359 { 360 cout << "Missing data..." << endl; 361 return; 362 } 363 364 // Get camera 365 MHCamera *camera=(MHCamera*)FindObjectInPad("MHCamera", gPad); 366 if (camera) 367 { 368 if (!camera->GetGeometry() || camera->GetGeometry()->IsA()!=fGeom->IsA()) 369 camera->SetGeometry(*fGeom); 370 } 371 else 372 { 373 camera = new MHCamera(*fGeom); 374 camera->SetName("MHCamera"); 375 camera->SetStats(0); 376 camera->SetInvDeepBlueSeaPalette(); 377 camera->SetBit(kCanDelete); 378 camera->Draw(); 379 } 380 381 const TRotation rot(GetGrid(kTRUE)); 382 383 MVector3 *radec; 384 TIter Next(&fList); 385 386 while ((radec=(MVector3*)Next())) 387 { 388 const Double_t mag = radec->Magnitude(); 389 390 TVector3 mean; 391 Int_t num = 0; 392 393 TVector3 star(*radec); 394 star *= rot; 395 const TVector3 spot = fMirror0->GetReflection(star, fGeom->GetCameraDist())*1000; 396 397 MStarLocalPos *starpos = new MStarLocalPos; 398 starpos->SetExpValues(mag,mean(0),mean(1)); 399 fStars->Add(starpos); 400 } 401 } 402 337 403 // ------------------------------------------------------------------------ 338 404 // -
trunk/MagicSoft/Mars/mastro/MAstroCamera.h
r3704 r3808 7 7 8 8 class TClonesArray; 9 class TList; 9 10 10 11 class MTime; … … 18 19 MGeomCam *fGeom; 19 20 TClonesArray *fMirrors; 21 TList *fStars; 20 22 21 23 MGeomMirror *fMirror0; //! … … 32 34 void SetMirrors(TClonesArray &arr); 33 35 void SetGeom(const MGeomCam &cam); 36 void SetStarList(TList* s) { fStars = s; } 37 38 void FillStarList(); 39 40 TList *GetList() const { return fStars; } 34 41 35 42 ClassDef(MAstroCamera, 1) // Display class to display stars on the camera
Note:
See TracChangeset
for help on using the changeset viewer.