![]() |
MaCh3
2.5.0
Reference Guide
|
Utility helpers used across MaCh3. More...
Functions | |
| void | MaCh3Welcome () |
| KS: Prints welcome message with MaCh3 logo. More... | |
| std::string | GetMaCh3Version () |
| KS: Get version of MaCh3. More... | |
| void | GetOSInfo () |
| KS: Find out more about operational system. More... | |
| void | GetCPUInfo () |
| KS: Check what CPU you are using. More... | |
| void | NThreadsSanity () |
| KS: Check if user is not using huge number of threads and throw error. More... | |
| void | GetGPUInfo () |
| KS: Check what GPU you are using. More... | |
| void | GetDiskUsage () |
| KS: Find out about Disk usage. More... | |
| std::string | TerminalToString (std::string cmd) |
| KS: Convoluted code to grab output from terminal to string. More... | |
| void | EstimateDataTransferRate (TChain *chain, const Long64_t entry) |
| KS: Check what CPU you are using. More... | |
| void | PrintProgressBar (const Long64_t Done, const Long64_t All) |
| KS: Simply print progress bar. More... | |
| int | getValue (const std::string &Type) |
| CW: Get info like RAM. More... | |
| int | parseLine (const std::string &line) |
| CW: Get memory, which is probably silly. More... | |
| void | PrintConfig (const YAML::Node &node) |
| KS: Print Yaml config using logger. More... | |
| void | Print (const TTree *tree) |
| void | MaCh3Usage (int argc, char **argv) |
| KS: Almost all MaCh3 executables have the same usage, prepare simple printer. More... | |
| double | GetMassFromPDG (const int PDG) |
| Return mass for given PDG. More... | |
| int | PDGToNuOscillatorFlavour (const int NuPdg) |
| Convert from PDG flavour to NuOscillator type beware that in the case of anti-neutrinos the NuOscillator type simply gets multiplied by -1. More... | |
| std::string | FormatDouble (const double value, const int precision) |
| Convert double into string for precision, useful for playing with yaml if you don't want to have in config floating point precision... More... | |
Utility helpers used across MaCh3.
| void M3::Utils::EstimateDataTransferRate | ( | TChain * | chain, |
| const Long64_t | entry | ||
| ) |
|
inline |
Convert double into string for precision, useful for playing with yaml if you don't want to have in config floating point precision...
Definition at line 833 of file SampleStructs.h.
| void M3::Utils::GetCPUInfo | ( | ) |
KS: Check what CPU you are using.
Definition at line 100 of file Monitor.cpp.
| void M3::Utils::GetDiskUsage | ( | ) |
| void M3::Utils::GetGPUInfo | ( | ) |
KS: Check what GPU you are using.
Definition at line 144 of file Monitor.cpp.
| std::string M3::Utils::GetMaCh3Version | ( | ) |
KS: Get version of MaCh3.
This function fetches and returns the version of the MaCh3 software being used.
Definition at line 47 of file Monitor.cpp.
|
inline |
Return mass for given PDG.
Definition at line 749 of file SampleStructs.h.
| void M3::Utils::GetOSInfo | ( | ) |
| int M3::Utils::getValue | ( | const std::string & | Type | ) |
CW: Get info like RAM.
| Type | The type of system information to retrieve (e.g., RAM, CPU usage). |
This function fetches system information like RAM usage or other hardware details based on the specified type.
Definition at line 252 of file Monitor.cpp.
| void M3::Utils::MaCh3Usage | ( | int | argc, |
| char ** | argv | ||
| ) |
KS: Almost all MaCh3 executables have the same usage, prepare simple printer.
| argc | The number of command-line arguments. |
| argv | The array of command-line arguments. |
This function prints a simple usage guide for MaCh3 executables, typically called when incorrect arguments are passed.
Definition at line 360 of file Monitor.cpp.
| void M3::Utils::MaCh3Welcome | ( | ) |
KS: Prints welcome message with MaCh3 logo.
Definition at line 13 of file Monitor.cpp.
| void M3::Utils::NThreadsSanity | ( | ) |
KS: Check if user is not using huge number of threads and throw error.
Definition at line 123 of file Monitor.cpp.
| int M3::Utils::parseLine | ( | const std::string & | line | ) |
CW: Get memory, which is probably silly.
| line | The line of text to parse. |
This function is used to parse a line of text and extract memory-related information.
Definition at line 301 of file Monitor.cpp.
|
inline |
Convert from PDG flavour to NuOscillator type beware that in the case of anti-neutrinos the NuOscillator type simply gets multiplied by -1.
Definition at line 805 of file SampleStructs.h.
| void M3::Utils::Print | ( | const TTree * | tree | ) |
| void M3::Utils::PrintConfig | ( | const YAML::Node & | node | ) |
KS: Print Yaml config using logger.
| node | yaml config node |
Definition at line 311 of file Monitor.cpp.
| void M3::Utils::PrintProgressBar | ( | const Long64_t | Done, |
| const Long64_t | All | ||
| ) |
KS: Simply print progress bar.
| Done | The number of tasks completed. |
| All | The total number of tasks. |
This function prints a progress bar to the terminal, indicating the percentage of tasks completed.
Definition at line 229 of file Monitor.cpp.
| std::string M3::Utils::TerminalToString | ( | std::string | cmd | ) |
KS: Convoluted code to grab output from terminal to string.
| cmd | The terminal command to execute. |
Definition at line 187 of file Monitor.cpp.