Changeset 8315 for trunk/MagicSoft/include-Classes
- Timestamp:
- 02/13/07 11:15:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvtBasic.h
r7880 r8315 91 91 } 92 92 93 static TString GetEnergyStr(Float_t e) 94 { 95 if (e>=1000) 96 return Form("%.1fTeV", e/1000); 97 98 if (e>=10) 99 return Form("%dGeV", (Int_t)(e+.5)); 100 101 if (e>=1) 102 return Form("%.1fGeV", e); 103 104 return Form("%dMeV", (Int_t)(e*1000+.5)); 105 } 106 93 107 TString GetEnergyStr() const 94 108 { 95 if (fEnergy>1000) 96 return Form("%.1fTeV", fEnergy/1000); 97 98 if (fEnergy>10) 99 return Form("%dGeV", (Int_t)(fEnergy+.5)); 100 101 if (fEnergy>1) 102 return Form("%.1fGeV", fEnergy); 103 104 return Form("%dMeV", (Int_t)(fEnergy*1000+.5)); 109 return GetEnergyStr(fEnergy); 105 110 } 106 107 111 108 112 // Setter
Note:
See TracChangeset
for help on using the changeset viewer.