BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
show_root_stats.C File Reference

Go to the source code of this file.

Macros

#define MIN_FILE_SIZE_MB   1
#define MAX_FILE_SIZE_GB   4
#define MIN_EVENT_SIZE_KB   1
#define MAX_EVENT_SIZE_KB   200

Functions

const string red ("\033[0;91m")
const string orange ("\033[0;33m")
const string cyan ("\033[0;96m")
const string reset ("\033[0m")
int calculate_size (TString dir_path, const char *root_tree_name, TH1F *hist_file_size, TH1F *hist_event_size, double &sum_file_size_mb, double &sum_event_size_kb, int &correct_file_count, map< TString, double > &wrong_files, map< TString, double > &wrong_events)
int show_root_stats (TString dir_path, const char *root_tree_name="bmndata")
 Function for creating histograms on sizes of ROOT (digit) files stored in a specified directory amd events in the files.

Macro Definition Documentation

◆ MAX_EVENT_SIZE_KB

#define MAX_EVENT_SIZE_KB   200

Definition at line 5 of file show_root_stats.C.

◆ MAX_FILE_SIZE_GB

#define MAX_FILE_SIZE_GB   4

Definition at line 3 of file show_root_stats.C.

◆ MIN_EVENT_SIZE_KB

#define MIN_EVENT_SIZE_KB   1

Definition at line 4 of file show_root_stats.C.

◆ MIN_FILE_SIZE_MB

#define MIN_FILE_SIZE_MB   1

Definition at line 2 of file show_root_stats.C.

Function Documentation

◆ calculate_size()

int calculate_size ( TString dir_path,
const char * root_tree_name,
TH1F * hist_file_size,
TH1F * hist_event_size,
double & sum_file_size_mb,
double & sum_event_size_kb,
int & correct_file_count,
map< TString, double > & wrong_files,
map< TString, double > & wrong_events )

Definition at line 93 of file show_root_stats.C.

References calculate_size(), TFile::Close(), TString::Data(), TH1::Fill(), TDirectoryFile::Get(), TTree::GetEntries(), TSystemDirectory::GetListOfFiles(), TNamed::GetName(), TNamed::GetTitle(), TSystemFile::IsDirectory(), MAX_EVENT_SIZE_KB, MAX_FILE_SIZE_GB, MIN_EVENT_SIZE_KB, MIN_FILE_SIZE_MB, TIter::Next(), orange(), red(), and reset().

Referenced by calculate_size(), and show_root_stats().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cyan()

const string cyan ( )

Referenced by compare_avg_field(), show_avg_field(), show_raw_stats(), show_root_stats(), and show_run_stats().

Here is the caller graph for this function:

◆ orange()

const string orange ( )

Referenced by calculate_size(), compare_avg_field(), show_avg_field(), show_raw_stats(), and show_run_stats().

Here is the caller graph for this function:

◆ red()

const string red ( )

Referenced by calculate_size(), compare_avg_field(), show_avg_field(), show_raw_stats(), show_root_stats(), and show_run_stats().

Here is the caller graph for this function:

◆ reset()

const string reset ( )

Referenced by calculate_size(), compare_avg_field(), show_avg_field(), show_raw_stats(), show_root_stats(), and show_run_stats().

Here is the caller graph for this function:

◆ show_root_stats()

int show_root_stats ( TString dir_path,
const char * root_tree_name = "bmndata" )

Definition at line 25 of file show_root_stats.C.

References calculate_size(), TCanvas::cd(), cyan(), TPad::Divide(), TH1::Draw(), TH1::GetXaxis(), MAX_EVENT_SIZE_KB, MAX_FILE_SIZE_GB, MIN_EVENT_SIZE_KB, MIN_FILE_SIZE_MB, red(), reset(), and TNamed::SetTitle().

Here is the call graph for this function: