Changeset 1665
- Timestamp:
- 11/22/02 00:04:19 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1664 r1665 1 1 -*-*- END -*-*- 2 2 3 2002/11/22: Abelardo Moralejo 4 5 * macros/threshold.C: 6 - Added 2nd argument to write an output file containing the 7 energy spectrum histogram. 3 8 4 9 2002/11/21: Thomas Bretz -
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.