Changeset 8384 for trunk/MagicSoft/Mars/macros/readIPR.C
- Timestamp:
- 03/28/07 14:32:37 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/readIPR.C
r4993 r8384 51 51 tlist.AddToList(&read); 52 52 53 // Create the container for the IPRs 54 MTriggerIPR ipr; 55 plist.AddToList(&ipr); 53 MHCamEvent evt0(0, "IPR", "Individual Pixel Rate;;IPR [Hz]"); 54 // evt0b.SetThreshold(0); 56 55 57 // Create the histo to display the IPRs 58 MHCamEvent IPRhist("IPRhist","IPRs"); 59 plist.AddToList(&IPRhist); 60 61 // create a task to fill a histogram from the container 62 MFillH fillIPR(&IPRhist, "MTriggerIPR"); 63 tlist.AddToList(&fillIPR); 56 MFillH fill0(&evt0, "MTriggerIPR", "FillIPR"); 57 58 tlist.AddToList(&fill0); 59 60 MStatusDisplay *d = new MStatusDisplay; 64 61 65 62 // … … 68 65 MEvtLoop evtloop; 69 66 evtloop.SetParList(&plist); 67 evtloop.SetDisplay(d); 70 68 71 //72 // Execute the analysis73 //74 if (!evtloop.PreProcess())75 return;76 77 69 if (!evtloop.Eventloop()) 78 70 return; 79 71 80 72 tlist.PrintStatistics(); 81 82 //-----------------------------------83 // Now display the result of the loop84 //85 86 // create a MHCamera histo where the sum off all events is filled87 MHCamera &h = *(MHCamera*)IPRhist.GetHistByName("sum");88 89 TCanvas *c = MH::MakeDefCanvas();90 c->Divide(2, 2);91 92 MHCamera *disp1=h.Clone();93 MHCamera *disp2=h.Clone();94 //MHCamera *disp3=h.Clone();95 disp2->SetCamContent(h, 1);96 //disp3->SetCamContent(h, 2);97 98 disp1->SetYTitle("Rate [Hz]");99 disp2->SetYTitle("\\sigma_{Rate} [Hz]");100 //disp3->SetYTitle("\\sigma_{Rate} [%]");101 disp1->SetName("IPRs;avg");102 disp2->SetName("IPRs;err");103 //disp3->SetName("IPRs;rel");104 disp1->SetTitle("IPRs Average");105 disp2->SetTitle("IPRs error");106 //disp3->SetTitle("IPRs relative error");107 108 c->cd(1);109 TText text(0.1, 0.95, &fname[fname.Last('/')+1]);110 text.SetTextSize(0.03);111 text.DrawClone();112 gPad->SetBorderMode(0);113 gPad->Divide(1,1);114 gPad->cd(1);115 gPad->SetLogy();116 disp1->Draw();117 disp1->SetBit(kCanDelete);118 c->cd(2);119 gPad->SetBorderMode(0);120 gPad->Divide(1,1);121 gPad->cd(1);122 gPad->SetLogy();123 disp2->Draw();124 disp2->SetBit(kCanDelete);125 //c->cd(3);126 //gPad->SetBorderMode(0);127 //gPad->Divide(1,1);128 //gPad->cd(1);129 //gPad->SetLogy();130 //disp3->Draw();131 //disp3->SetBit(kCanDelete);132 c->cd(3);133 gPad->SetBorderMode(0);134 disp1->Draw("EPhist");135 c->cd(4);136 gPad->SetBorderMode(0);137 gPad->SetLogy();138 disp2->Draw("Phist");139 //c->cd(6);140 //gPad->SetBorderMode(0);141 //gPad->SetLogy();142 //disp3->Draw("Phist");143 144 c->SaveAs(fname(0, fname.Last('.')+1) + "ps");145 //c->SaveAs(fname(0, fname.Last('.')+1) + "root");146 73 } 147 74
Note:
See TracChangeset
for help on using the changeset viewer.