Changeset 1660 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/21/02 10:28:46 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/collarea.C
r1653 r1660 24 24 25 25 26 void collarea( char *filename = "data/camera.root", char *outname ="")26 void collarea(TString filename="camera.root", TString outname="") 27 27 { 28 28 // … … 68 68 69 69 70 // Write histogram to a file in case an output filename has been supplied: 70 // 71 // Write histogram to a file in case an output 72 // filename has been supplied 73 // 74 if (outname.IsNull()) 75 return; 71 76 72 if (strlen(outname) > 0) 73 { 74 TFile* f = new TFile(outname,"recreate"); 75 if (f) 76 { 77 TH1D* hc = ((MHMcCollectionArea*)parlist.FindObject("MHMcCollectionArea"))->GetHist(); 78 hc->Write(); 79 f.Close(); 80 } 81 } 77 TFile f(outname, "recreate"); 78 if (!f) 79 return; 80 81 parlist.FindObject("MHMcCollectionArea")->Write(); 82 82 }
Note:
See TracChangeset
for help on using the changeset viewer.