|
Crombie Tools
|
Functions | |
| template<typename O , typename C , typename F > | |
| std::vector< O > | comprehension (const C &container, const F &func) |
| void | draw_progress (unsigned progress, unsigned max) |
| std::string | env (const std::string &variable, const std::string &fallback="") |
| Get an environment variable by name, with an optional fallback value. More... | |
| std::string | shell (const std::string &cmd) |
| Get the output of a shell command. More... | |
| Types::strings | split (const std::string &str, const std::string &delim="\) |
| Splits a string. More... | |
| Types::strings | tokenize (const std::string &str) |
| Split the contents of a string into multiple strings. More... | |
| std::vector<O> crombie::Misc::comprehension | ( | const C & | container, |
| const F & | func | ||
| ) |
| void crombie::Misc::draw_progress | ( | unsigned | progress, |
| unsigned | max | ||
| ) |
Definition at line 22 of file Misc.h.
References Debug::Debug().
Referenced by crombie::FileConfig::FileConfig::runfiles().
| std::string crombie::Misc::env | ( | const std::string & | variable, |
| const std::string & | fallback = "" |
||
| ) |
Get an environment variable by name, with an optional fallback value.
Definition at line 92 of file Misc.h.
Referenced by crombie::Hist::Hist::add(), PlotPreparer::AddHist(), crombie::Hist::Hist::doall(), crombie::Plotter::Plot::draw(), crombie::Hist::Hist::get_unc(), crombie::Plotter::Merge(), PlotPreparer::PreparePlots(), PlotPreparer::RunFile(), crombie::FileConfig::FileConfig::runfiles(), PlotPreparer::ScalePlots(), crombie::Hist::Hist::set_env_min_max(), crombie::LoadTree::Tree::Tree(), and crombie::Hist::Hist::unchists().
| std::string crombie::Misc::shell | ( | const std::string & | cmd | ) |
Get the output of a shell command.
Definition at line 77 of file Misc.h.
Referenced by crombie::FileSystem::dirname().
| Types::strings crombie::Misc::split | ( | const std::string & | str, |
| const std::string & | delim = "\n" |
||
| ) |
Splits a string.
Definition at line 59 of file Misc.h.
Referenced by CrombieTools.ConfigTools.Line::__init__(), crombie::FileSystem::basename(), and crombie::FileSystem::dirname().
| Types::strings crombie::Misc::tokenize | ( | const std::string & | str | ) |
Split the contents of a string into multiple strings.
This is different than crombie::Misc::split because it can split over multiple spaces, while spilt_string only splits over one character at a time.
Definition at line 49 of file Misc.h.
Referenced by crombie::FileSystem::dirname(), crombie::Selection::operator>>(), crombie::Uncertainty::operator>>(), and crombie::FileConfig::operator>>().