Belle II Software light-2406-ragdoll
|
General utility functions. More...
Classes | |
class | Timer |
Small helper class that prints its lifetime when destroyed. More... | |
struct | VisitOverload |
Helper struct for the C++17 std::visit overload pattern to allow simple use of variants. More... | |
Functions | |
template<class... Ts> | |
VisitOverload (Ts...) -> VisitOverload< Ts... > | |
Function for the C++17 std::visit overload pattern to allow simple use of variants. | |
template<class T > | |
T | reduceTBranch (TBranch *branch, const std::function< T(T, T)> &f, T reduced=T()) |
Reduce a branch of a TTree. | |
double | getClock () |
Return current value of the real-time clock. | |
double | getCPUClock () |
Return current value of the per-thread CPU clock. | |
unsigned long | getVirtualMemoryKB () |
Returns currently used virtual memory in KB, includes swapped and not occupied memory pages and memory-mapped files. | |
unsigned long | getRssMemoryKB () |
Returns the amount of memory the process actually occupies in the physical RAM of the machine. | |
std::string | getCommandOutput (const std::string &command, const std::vector< std::string > &arguments={}, bool searchPath=true) |
Execute a shell command and return its output. | |
General utility functions.
double getClock | ( | ) |
Return current value of the real-time clock.
The returned value is meant to measure relative times and does not show absolute time values.
Definition at line 66 of file Utils.cc.
std::string getCommandOutput | ( | const std::string & | command, |
const std::vector< std::string > & | arguments = {} , |
||
bool | searchPath = true |
||
) |
Execute a shell command and return its output.
Definition at line 100 of file Utils.cc.
double getCPUClock | ( | ) |
unsigned long getRssMemoryKB | ( | ) |
unsigned long getVirtualMemoryKB | ( | ) |
T reduceTBranch | ( | TBranch * | branch, |
const std::function< T(T, T)> & | f, | ||
T | reduced = T() |
||
) |
Reduce a branch of a TTree.
Definition at line 35 of file Utils.h.