Functions | |
template<typename T > | |
std::string | AsBinary (const T &number, const int maxBits=8 *sizeof(T), const char separator= ' ', const int stride=4) |
converts integer-type numbers into a string of binary representation More... | |
template<typename T > | |
std::pair< double, char > | AsHumanReadable (const T &x, const int thousand=1000) |
template<class T > | |
std::vector< T > | AsVectorOf (const std::string &str) |
template<typename Geo , typename CS > | |
std::string | Make (const Geo &g, const CS &cs, const double unit=1, const std::string &sep=" ") |
string | OfAlreadySortedIds (const vector< int > &ids) |
template<typename Map > | |
std::string | OfMapKeys (const Map &m, const std::string "e="'", const std::string &separator=", ") |
string | OfSortedIds (vector< int > ids) |
string | OfSortedIds (const set< int > &ids) |
std::string | OfSortedIds (std::vector< int > ids) |
std::string | OfSortedIds (const std::set< int > &ids) |
template<typename T , typename = typename std::enable_if<std::is_integral<T>::value, T>::type> | |
const char * | Plural (const T n) |
template<class Container , typename T = typename Container::value_type> | |
const char * | Plural (const Container &c) |
vector< string > | Split (const string &str, const char *const separators) |
std::vector< std::string > | Split (const std::string &str, const char *const separators=" ") |
std::string | Strip (std::string str) |
std::string utl::String::AsBinary | ( | const T & | number, |
const int | maxBits = 8*sizeof(T) , |
||
const char | separator = ' ' , |
||
const int | stride = 4 |
||
) |
converts integer-type numbers into a string of binary representation
Definition at line 135 of file String.h.
Referenced by SdCalibPlotterOG::AddHeader(), FloatingPointException::FloatingPointException::Init(), SdEventPosteriorSelectorOG::SdEventPosteriorSelector::Run(), and SdEventSelectorOG::SdEventSelector::Run().
std::pair<double, char> utl::String::AsHumanReadable | ( | const T & | x, |
const int | thousand = 1000 |
||
) |
|
inline |
|
inline |
Definition at line 190 of file String.h.
References UnivRecNS::unit.
Referenced by LDFFinderKG::LDFFinder::FitGlobal(), LDFFinderKG::LDFFinder::FitLDF(), LDFFinderKG::LDFFinder::FixCore(), LDFFinderKG::LDFFinder::OutputResults(), SdPlaneFitOG::SdPlaneFit::Run(), and LDFFinderKG::LDFFinder::Run().
string utl::String::OfAlreadySortedIds | ( | const vector< int > & | ids | ) |
Function returns string of sorted sequence of integers. Consecutive incresing numbers are displayed in short notation using range ".." symbol. Useful for outputs of ids.
Definition at line 33 of file String.cc.
Referenced by OfSortedIds().
|
inline |
Definition at line 116 of file String.h.
Referenced by det::ManagerRegister::InterpretXML().
string utl::String::OfSortedIds | ( | vector< int > | ids | ) |
Definition at line 65 of file String.cc.
References OfAlreadySortedIds().
Referenced by CentralTriggerEventBuilderNS::CentralTriggerEventBuilder::BuildEvent(), evt::ConvertIoSdToEvent(), SdStationPositionCorrectionOG::SdStationPositionCorrection::Init(), SdStationCheckerOG::MakeInfo(), SdMonteCarloEventSelectorOG::MakeInfo(), SdEventSelectorOG::MakeInfo(), SdPMTSignalShapeQualityChecker::SdPMTSignalShapeQualityChecker::PMTChecks(), SdEventSelectorOG::SdEventSelector::RejectLonelyStations(), RdSimulationRadioTrigger::RdSimulationRadioTrigger::Run(), RdStationRejector::RdStationRejector::Run(), and SdStationCheckerOG::SdStationChecker::Run().
string utl::String::OfSortedIds | ( | const set< int > & | ids | ) |
Definition at line 73 of file String.cc.
References OfAlreadySortedIds().
std::string utl::String::OfSortedIds | ( | std::vector< int > | ids | ) |
Definition at line 65 of file String.cc.
References OfAlreadySortedIds().
Referenced by CentralTriggerEventBuilderNS::CentralTriggerEventBuilder::BuildEvent(), evt::ConvertIoSdToEvent(), SdStationPositionCorrectionOG::SdStationPositionCorrection::Init(), SdStationCheckerOG::MakeInfo(), SdMonteCarloEventSelectorOG::MakeInfo(), SdEventSelectorOG::MakeInfo(), SdPMTSignalShapeQualityChecker::SdPMTSignalShapeQualityChecker::PMTChecks(), SdEventSelectorOG::SdEventSelector::RejectLonelyStations(), RdSimulationRadioTrigger::RdSimulationRadioTrigger::Run(), RdStationRejector::RdStationRejector::Run(), and SdStationCheckerOG::SdStationChecker::Run().
std::string utl::String::OfSortedIds | ( | const std::set< int > & | ids | ) |
|
inline |
Definition at line 104 of file String.h.
Referenced by SdEventSelectorOG::SdEventSelector::BottomUpSelection(), evt::ConvertIoSdToEvent(), EventGeneratorOG::EventGenerator::Finish(), RecDataWriterNG::RecDataWriter::Finish(), ParticleInjectorNEU::ParticleInjector::InjectParticles(), SdStationCheckerOG::MakeInfo(), SdMonteCarloEventSelectorOG::MakeInfo(), SdEventSelectorOG::MakeInfo(), SdPMTSignalShapeQualityChecker::SdPMTSignalShapeQualityChecker::PMTChecks(), RdStationRejector::RdStationRejector::Run(), SdStationCheckerOG::SdStationChecker::Run(), CentralTriggerSimulatorXb::CentralTriggerSimulator::Run(), and SdCalibratorOG::SdCalibrator::Run().
|
inline |
vector<string> utl::String::Split | ( | const string & | str, |
const char *const | separators | ||
) |
Definition at line 13 of file String.cc.
Referenced by io::CorsikaShowerFile::ReadProfile().
std::vector<std::string> utl::String::Split | ( | const std::string & | str, |
const char *const | separators = " " |
||
) |
Definition at line 13 of file String.cc.
Referenced by io::CorsikaShowerFile::ReadProfile().