|
wavecatcher-analysis
|
#include <Helpers.h>
Static Public Member Functions | |
| template<typename T > | |
| static bool | Contains (const vector< T > &vec, const T &val) |
| Returns true if vector vec contains value val. | |
| static void | filterChannelUserInput (vector< int > &, const vector< int >) |
| Check if user input exists in data and remove channels that are not there. | |
| static double * | gety (const vector< float > &, int, int) |
| Get truncated array of y values for a certain waveform. | |
| template<typename HistType > | |
| static double * | gety (HistType *, int, int) |
| Get truncated array of y values for a certain waveform. | |
| template<typename HistType > | |
| static double * | gety (HistType *his) |
| Get array of y values for a histogram. | |
| 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. | |
| template<typename HistType > | |
| static void | ShiftTH1 (HistType *&, int) |
| Shift a histogram in x The histogram will be cycled, so bins at the end will be attached at the front and vice versa. | |
| static void | SplitCanvas (TCanvas *&, vector< int >, vector< int >) |
| Helper to split canvas according to the number of channels to be plotted. | |
|
inlinestatic |
|
static |
Check if user input exists in data and remove channels that are not there.
| user_channels | User input |
| active_channels | From data |
Definition at line 97 of file Helpers.cc.
|
static |
Get truncated array of y values for a certain waveform.
| waveform | Waveform |
| start_at | Truncate from index |
| end_at | Truncate to index |
Definition at line 180 of file Helpers.cc.
|
static |
Get truncated array of y values for a certain waveform.
| HistType | Histogram derived from ROOT TH1 |
| his | Waveform histogram |
| start_at | Truncate from index |
| end_at | Truncate to index |
Definition at line 157 of file Helpers.cc.
|
static |
Get array of y values for a histogram.
| HistType | Histogram derived from ROOT TH1 |
| his | Pointer to histogram |
Definition at line 138 of file Helpers.cc.
|
static |
Helper. Creates a list of .bin data files in data folder to be read in.
| dirname | Directory |
| ext | File extension |
Definition at line 7 of file Helpers.cc.
|
static |
Print progress bar for a loop in steps of 10 percent.
| index | Current loop index |
| length | Length of loop |
Definition at line 28 of file Helpers.cc.
|
static |
Translate a random number into a useful root color https://root.cern.ch/doc/master/classTColor.html.
| i | Index of your plotting loop that is to be translated into a useful ROOT color index |
Definition at line 44 of file Helpers.cc.
|
static |
Set consistent x-axis and y-axis range for all TH1 histograms on a canvas.
Will only change the axes where min != max.
| 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.
|
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.
| HistType | Histogram derived from ROOT TH1 |
| his | Histogram to be shifted |
| shift_bins | Number of bins in x to shift by |
Definition at line 199 of file Helpers.cc.
|
static |
Helper to split canvas according to the number of channels to be plotted.
| 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 121 of file Helpers.cc.