Changeset 4992 for trunk/MagicSoft/Mars/mtemp/mpisa
- Timestamp:
- 09/14/04 12:36:12 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mpisa/macros/readIPR.C
r4972 r4992 45 45 plist.AddToList(&geom); 46 46 47 // First Task: Read ROOT file with REPORT data 48 MReportFileRead read(fname); 49 read.SetHasNoHeader(); 50 // The Trigger container is added to the list 51 read.AddToList("MReportTrigger"); 47 // First Task: Read ROOT file with Trigger-REPORT data 48 MReadTree read("Trigger", fname); 49 read.DisableAutoScheme(); 50 52 51 tlist.AddToList(&read); 53 52 53 // Create the container for the IPRs 54 MTriggerIPR ipr; 55 plist.AddToList(&ipr); 54 56 55 MHCamEvent IPRcam("IPRcam","IPRs");56 plist.AddToList(&IPRcam);57 // create a task to fill a histogram58 // MFillH fill("MHCamEvent", "MTriggerIPR");59 60 MFillH fillIPR(&IPR cam, "MTriggerIPR");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"); 61 63 tlist.AddToList(&fillIPR); 62 64 … … 68 70 69 71 // 70 // Execute youranalysis72 // Execute the analysis 71 73 // 74 if (!evtloop.PreProcess()) 75 return; 76 72 77 if (!evtloop.Eventloop()) 73 78 return; 74 79 75 80 tlist.PrintStatistics(); 76 81 77 // 82 //----------------------------------- 78 83 // Now display the result of the loop 79 84 // 80 85 81 // MHCamEvent &h2 = *(MHCamEvent*)plist->FindObject("MHCamEvent"); 82 // MHCamera &h = *(MHCamera*)h2.GetHistByName("sum"); 83 MHCamera &h = *(MHCamera*)IPRcam.GetHistByName("sum"); 86 // create a MHCamera histo where the sum off all events is filled 87 MHCamera &h = *(MHCamera*)IPRhist.GetHistByName("sum"); 84 88 85 89 TCanvas *c = MH::MakeDefCanvas(); … … 92 96 disp3->SetCamContent(h, 2); 93 97 94 disp1->SetYTitle(" I [nA]");95 disp2->SetYTitle("\\sigma_{ I} [\\mu A]");96 disp3->SetYTitle("\\sigma_{ I} [%]");98 disp1->SetYTitle("Rate [Hz]"); 99 disp2->SetYTitle("\\sigma_{Rate} [Hz]"); 100 disp3->SetYTitle("\\sigma_{Rate} [%]"); 97 101 disp1->SetName("IPRs;avg"); 98 102 disp2->SetName("IPRs;err"); … … 139 143 140 144 c->SaveAs(fname(0, fname.Last('.')+1) + "ps"); 141 c->SaveAs(fname(0, fname.Last('.')+1) + "root");145 //c->SaveAs(fname(0, fname.Last('.')+1) + "root"); 142 146 } 143 147
Note:
See TracChangeset
for help on using the changeset viewer.