Changeset 1666 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/22/02 09:23:54 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/threshold.C
r1665 r1666 24 24 25 25 26 void threshold( char* filename="data/camera.root", char*outname="")26 void threshold(TString filename="data/camera.root", TString outname="") 27 27 { 28 28 // … … 106 106 107 107 // Write histogram to a file in case an output filename has been supplied: 108 if (strlen(outname) > 0) 109 { 110 TFile* f = new TFile(outname,"recreate"); 111 if (f) 112 { 113 TH1F* hc = ((MHMcEnergy*)parlist.FindObject("MHMcEnergy"))->GetHistByName("MHMcEnergy"); 114 hc->Write(); 115 f.Close(); 116 } 117 } 108 if (outname.IsNull()) 109 return; 110 111 TFile f(outname, "recreate"); 112 if (!f) 113 return; 114 115 parlist.FindObject("MHMcEnergy")->Write(); 118 116 }
Note:
See TracChangeset
for help on using the changeset viewer.