Changeset 1645 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/19/02 10:01:14 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/collarea.C
r1543 r1645 23 23 \* ======================================================================== */ 24 24 25 void collarea(char *filename = "data/camera.root") 25 26 void collarea(char *filename = "data/camera.root", char *outname = "") 26 27 { 27 28 // … … 62 63 // 63 64 // Now the histogram we wanted to get out of the data is 64 // filled and can be display d65 // filled and can be displayed 65 66 // 66 67 parlist.FindObject("MHMcCollectionArea")->DrawClone(); 68 69 70 // Write histogram to a file in case an output filename has been supplied: 71 72 TFile* f = new TFile(outname,"recreate"); 73 if (f) 74 { 75 TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist(); 76 hc->Write(); 77 f.Close(); 78 } 67 79 }
Note:
See TracChangeset
for help on using the changeset viewer.