Changeset 1665 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 11/22/02 00:04:19 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/threshold.C
r1543 r1665 24 24 25 25 26 void threshold(char* filename="data/camera.root" )26 void threshold(char* filename="data/camera.root", char* outname="") 27 27 { 28 28 // … … 104 104 while ((obj=Next())) 105 105 obj->DrawClone(); 106 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 } 106 118 }
Note:
See TracChangeset
for help on using the changeset viewer.