RootUtils
|
Functions | |
TString | stripExtension (const char *path) |
Remove extension from a file path. More... | |
void | writeProgress (const char *message, Int_t nTimes) |
Simple implementation of an ASCII progress bar. More... | |
EnergyValueUnit | formatEnergy (Double_t value) |
Format energy to appropriate unit. Function outputs EnergyValueUnit structure containing energy value converted to the best unit for presenting - TeV, GeV, .. eV. More... | |
TString | getSafeName (const char *name) |
Get save ROOT object name. More... | |
Useful string operations.
EnergyValueUnit StringUtils::formatEnergy | ( | Double_t | value | ) |
Format energy to appropriate unit. Function outputs EnergyValueUnit structure containing energy value converted to the best unit for presenting - TeV, GeV, .. eV.
value | Energy value in default Geant4 unit - MeV. |
TString StringUtils::getSafeName | ( | const char * | name | ) |
Get save ROOT object name.
Function checks if ROOT object with given name exists and appends corresponding index to it avoiding objects with duplicate names.
naem | Base name of a new object. |
TString StringUtils::stripExtension | ( | const char * | path | ) |
Remove extension from a file path.
path | File name or path. |
void StringUtils::writeProgress | ( | const char * | message, |
Int_t | nTimes | ||
) |
Simple implementation of an ASCII progress bar.
message | String explaining what is happening. |