#include <Helpers.h>
|
static double * | gety (TH1F *) |
| Get array of y values for a histogram.
|
|
static double * | gety (TH1F *, int, int) |
| Get truncated array of y values for a certain waveform.
|
|
static string | ListFiles (const char *, const char *) |
| Helper. Creates a list of .bin data files in data folder to be read in.
|
|
static void | PrintProgressBar (int, int) |
| Print progress bar for a loop in steps of 10 percent.
|
|
static int | rcolor (unsigned int) |
| Translate a random number into a useful root color https://root.cern.ch/doc/master/classTColor.html.
|
|
static void | SetRangeCanvas (TCanvas *&, double, double, double=-999, double=-999) |
| Set consistent x-axis and y-axis range for all TH1 histograms on a canvas.
|
|
static void | ShiftTH1F (TH1F *&, int=0) |
| Shift a histogram in x.
|
|
static void | SplitCanvas (TCanvas *&, vector< int >, vector< int >) |
| Helper to split canvas according to the number of channels to be plotted.
|
|
Definition at line 18 of file Helpers.h.
◆ gety() [1/2]
double * Helpers::gety |
( |
TH1F * |
his | ) |
|
|
static |
Get array of y values for a histogram.
- Parameters
-
- Returns
- Y values of waveform
Definition at line 125 of file Helpers.cc.
◆ gety() [2/2]
double * Helpers::gety |
( |
TH1F * |
his, |
|
|
int |
start_at, |
|
|
int |
end_at |
|
) |
| |
|
static |
Get truncated array of y values for a certain waveform.
- Parameters
-
his | Waveform histogram |
start_at | Truncate from index |
end_at | Truncate to index |
- Returns
- Truncated Y values of waveform
Definition at line 138 of file Helpers.cc.
◆ ListFiles()
string Helpers::ListFiles |
( |
const char * |
dirname, |
|
|
const char * |
ext |
|
) |
| |
|
static |
Helper. Creates a list of .bin data files in data folder to be read in.
- Parameters
-
dirname | Directory |
ext | File extension |
- Returns
- String of line separated file names
Definition at line 7 of file Helpers.cc.
◆ PrintProgressBar()
void Helpers::PrintProgressBar |
( |
int |
index, |
|
|
int |
length |
|
) |
| |
|
static |
Print progress bar for a loop in steps of 10 percent.
- Parameters
-
index | Current loop index |
length | Length of loop |
Definition at line 28 of file Helpers.cc.
◆ rcolor()
int Helpers::rcolor |
( |
unsigned int |
i | ) |
|
|
static |
◆ SetRangeCanvas()
void Helpers::SetRangeCanvas |
( |
TCanvas *& |
c, |
|
|
double |
x_range_min, |
|
|
double |
x_range_max, |
|
|
double |
y_range_min = -999 , |
|
|
double |
y_range_max = -999 |
|
) |
| |
|
static |
Set consistent x-axis and y-axis range for all TH1 histograms on a canvas.
Will only change the axes where min != max
.
- Parameters
-
c | Canvas Canvas |
x_range_min | X-axis minimum |
x_range_max | X-axis maximum |
y_range_min | Y-axis minimum |
y_range_max | Y-axis maximum |
Definition at line 59 of file Helpers.cc.
◆ ShiftTH1F()
void Helpers::ShiftTH1F |
( |
TH1F *& |
his, |
|
|
int |
shift_bins = 0 |
|
) |
| |
|
static |
Shift a histogram in x.
The histogram will be cycled, so bins at the end will be attached at the front and vice versa
- Parameters
-
his | Histogram to be shifted |
shift_bins | Number of bins in x to shift by |
Definition at line 157 of file Helpers.cc.
◆ SplitCanvas()
void Helpers::SplitCanvas |
( |
TCanvas *& |
c, |
|
|
vector< int > |
active_channels, |
|
|
vector< int > |
plot_active_channels |
|
) |
| |
|
static |
Helper to split canvas according to the number of channels to be plotted.
- Parameters
-
c | Canvas to be split |
active_channels | All channels available in the data |
plot_active_channels | The channels from the data that should be plotted |
Definition at line 97 of file Helpers.cc.
The documentation for this class was generated from the following files: