- Timestamp:
- 07/30/06 16:54:56 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7818 r7820 18 18 19 19 -*-*- END OF LINE -*-*- 20 2006/07/30 Thomas Bretz 21 22 * macros/starfield.c: 23 - updated to use resources/mirrors.def by default 24 25 26 20 27 2006/07/29 Thomas Bretz 21 28 -
trunk/MagicSoft/Mars/macros/starfield.C
r4358 r7820 41 41 /////////////////////////////////////////////////////////////////////////// 42 42 43 void ReadSetup( TString fname,MAstroCamera &cam)43 void ReadSetup(MAstroCamera &cam) 44 44 { 45 MMcConfigRunHeader *config=0; 46 MGeomCam *geom=0; 45 /* 46 // Name of a MC file having MGeomCam and MMcConfigRunHeader 47 TString fname = "../Mars/Gamma_zbin7_90_7_53395to53399_w0.root"; 47 48 48 TFile file(fname); 49 TTree *tree = (TTree*)file.Get("RunHeaders"); 50 tree->SetBranchAddress("MMcConfigRunHeader", &config); 51 if (tree->GetBranch("MGeomCam")) 52 tree->SetBranchAddress("MGeomCam", &geom); 53 tree->GetEntry(0); 49 MMcConfigRunHeader *config=0; 50 MGeomCam *geom=0; 54 51 55 cam.SetMirrors(*config->GetMirrors()); 56 cam.SetGeom(*geom); 52 TFile file(fname); 53 TTree *tree = (TTree*)file.Get("RunHeaders"); 54 tree->SetBranchAddress("MMcConfigRunHeader", &config); 55 if (tree->GetBranch("MGeomCam")) 56 tree->SetBranchAddress("MGeomCam", &geom); 57 tree->GetEntry(0); 57 58 58 /* Alternative: 59 cam.SetMirrors(*config->GetMirrors()); 60 cam.SetGeom(*geom); 61 */ 59 62 60 MGeomCamMagic geom; 61 cam.SetGeom(geom); 62 cam.SetMirrors("magic.def"); 63 */ 63 MGeomCamMagic geom; 64 cam.SetGeom(geom); 65 cam.SetMirrors("resources/mirrors.def"); 64 66 } 65 67 66 68 void starfield() 67 69 { 68 // Name of a MC file having MGeomCam and MMcConfigRunHeader69 TString fname = "../Mars/Gamma_zbin7_90_7_53395to53399_w0.root";70 71 70 // Time for which to get the picture 72 71 MTime time; … … 87 86 //MAstroCatalog stars; // Use this top display a catalog 88 87 MAstroCamera stars; // Use this top display a catalog on top of a camera 89 ReadSetup( fname,stars); // Use this top display a catalog on top of a camera88 ReadSetup(stars); // Use this top display a catalog on top of a camera 90 89 stars.SetLimMag(6); 91 90 stars.SetRadiusFOV(3);
Note:
See TracChangeset
for help on using the changeset viewer.