5#include <TSystemDirectory.h>
22 static string ListFiles(
const char*,
const char*);
28 static int rcolor(
unsigned int);
31 static void SetRangeCanvas(TCanvas*&,
double,
double,
double = -999,
double = -999);
35 static void SplitCanvas(TCanvas*&, vector<int>, vector<int>);
38 template <
typename HistType>
39 static double*
gety(HistType* his);
42 template <
typename HistType>
43 static double*
gety(HistType*,
int,
int);
44 static double*
gety(
const vector<float>&,
int,
int);
47 template <
typename HistType>
48 static void ShiftTH1(HistType*&,
int);
55 static bool Contains(
const vector<T>& vec,
const T& val) {
56 return find(vec.begin(), vec.end(), val) != vec.end();
static void SplitCanvas(TCanvas *&, vector< int >, vector< int >)
Helper to split canvas according to the number of channels to be plotted.
static double * gety(HistType *his)
Get array of y values for a histogram.
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 int rcolor(unsigned int)
Translate a random number into a useful root color https://root.cern.ch/doc/master/classTColor....
static void filterChannelUserInput(vector< int > &, const vector< int >)
Check if user input exists in data and remove channels that are not there.
static bool Contains(const vector< T > &vec, const T &val)
Returns true if vector vec contains value val.
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 fron...
static void PrintProgressBar(int, int)
Print progress bar for a loop in steps of 10 percent.
static string ListFiles(const char *, const char *)
Helper. Creates a list of .bin data files in data folder to be read in.