Changeset 2554 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/21/03 20:40:37 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/readCT1.C
r2553 r2554 82 82 83 83 Int_t icount = 0; 84 MHCamera display1(*geomcam);85 MHCamera display2(*geomcam);86 84 87 TCanvas c("Events", "Real Events", 300, 600); 85 MHCamera display[4]; 86 TCanvas c("Events", "Real Events", 600, 600); 88 87 c.SetBorderMode(0); 89 c.Divide(1,2); 90 c.cd(1); 91 display1.Draw(); 92 gPad->cd(1); 93 hillas.Draw(); 94 c.cd(2); 95 display2.Draw(); 96 gPad->cd(1); 97 hillas.Draw(); 88 c.Divide(2,2); 89 for (int i=0; i<4; i++) 90 { 91 display[i].SetGeometry(*geomcam); 92 c.cd(i+1); 93 display[i].Draw(); 94 gPad->cd(1); 95 hillas.Draw(); 96 } 97 98 // Use this if you don't want the event to be autoscaled 99 //display.SetMinimum(0); 100 //display.SetMaximum(100); 98 101 99 102 while ((rc=tlist.Process())) … … 105 108 continue; 106 109 107 display1.SetCamContent(*(MCerPhotEvt*)clone.GetClone()); 108 display2.SetCamContent(*(MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 110 display[0].SetCamContent(*(MCerPhotEvt*)clone.GetClone()); 111 display[1].SetCamContent(*(MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 112 display[2].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 113 display[3].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 114 TArrayF lvl(2); 115 lvl[0] = clean.GetCleanLvl2(); 116 lvl[1] = clean.GetCleanLvl1(); 117 display[3].SetLevels(lvl); 109 118 110 c->GetPad(1)->GetPad(1)->Modified(); 111 c->GetPad(1)->GetPad(1)->Update(); 112 c->GetPad(2)->GetPad(1)->Modified(); 113 c->GetPad(2)->GetPad(1)->Update(); 119 for (int i=1; i<=4; i++) 120 { 121 c.GetPad(i)->GetPad(1)->Modified(); 122 c.GetPad(i)->GetPad(1)->Update(); 123 } 114 124 115 125 hillas.Print(); -
trunk/MagicSoft/Mars/macros/readMagic.C
r2512 r2554 98 98 MGeomCam *geomcam = (MGeomCam*)plist->FindObject("MGeomCam"); 99 99 100 MHCamera display1(*geomcam); 101 MHCamera display2(*geomcam); 102 103 TCanvas c("Events", "Real Events", 300, 600); 100 MHCamera display[4]; 101 TCanvas c("Events", "Real Events", 600, 600); 104 102 c.SetBorderMode(0); 105 c.Divide( 1,2);106 c.cd(1);107 display1.Draw();108 gPad->cd(1);109 hillas.Draw();110 c.cd(2);111 display2.Draw();112 gPad->cd(1);113 hillas.Draw();103 c.Divide(2,2); 104 for (int i=0; i<4; i++) 105 { 106 display[i].SetGeometry(*geomcam); 107 c.cd(i+1); 108 display[i].Draw(); 109 gPad->cd(1); 110 hillas.Draw(); 111 } 114 112 115 113 // Use this if you don't want the event to be autoscaled … … 121 119 cout << "Event #" << read.GetNumEntry() ":" << endl; 122 120 123 display1.SetCamContent(*(MCerPhotEvt*)clone.GetClone()); 124 display2.SetCamContent(*(MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 121 display[0].SetCamContent(*(MCerPhotEvt*)clone.GetClone()); 122 display[1].SetCamContent(*(MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 123 display[2].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 124 display[3].SetCamContent(*(MCamEvent*)plist.FindObject("MCameraData")); 125 TArrayF lvl(2); 126 lvl[0] = clean.GetCleanLvl2(); 127 lvl[1] = clean.GetCleanLvl1(); 128 display[3].SetLevels(lvl); 125 129 126 c->GetPad(1)->GetPad(1)->Modified(); 127 c->GetPad(1)->GetPad(1)->Update(); 128 c->GetPad(2)->GetPad(1)->Modified(); 129 c->GetPad(2)->GetPad(1)->Update(); 130 for (int i=1; i<=4; i++) 131 { 132 c.GetPad(i)->GetPad(1)->Modified(); 133 c.GetPad(i)->GetPad(1)->Update(); 134 } 130 135 131 136 hillas.Print();
Note:
See TracChangeset
for help on using the changeset viewer.