-
Notifications
You must be signed in to change notification settings - Fork 11
Style
The Style class is to help facilitate gross formatting issues. This means any style change you want to all of the graphs, it is done through the Style class. The default style config file has all of the options available, and the option names have kept the names from the ROOT TStyle class, so follow the link to read more on any option
Since the Style class uses the TStyle object, the class is mainly an interface with the config file as well as more specific formatting for rebinning and making stack plots.
Style();
Style(string);
Style(const Style&);
Style& operator=(const Style&);
~Style();
TStyle* getStyle();
//Return TStyle styler for setting style
double getPadRatio();
//Returns variable padratio
double getHeightRatio();
//Returns variable heightratio
double getRebinLimit();
//Returns variable rebinlimit
bool getDivideBins();
//Returns variable dividebins
bool getBinLimit();
//Returns variable binlimit
void read_info(string);
Read info is called at construction to read in config file that has the style options. The values are put into a map so the they can be set later. All values now have to be double values. This means booleans have to be written as a 1 or 0 for true and false respectively. Currently, no options that include words are available.
void setStyle();
setStyle is what takes the values read from the config file and sets it to the TStyle. This uses a long else if chain looking at the options in the TStyle object. Special values (as noted in the private values section) are also set here.
TStyle* styler;
map<string, double> values;
int binlimit = 9;
double padratio = 3;
double heightratio = 15;
double rebinlimit = 0.3;
bool dividebins = false;
Default values are left to see what would be set without user intervention
-
styler
is the main TStyle object used to set the style of the graphs -
values
is the map that holds the user set values in the style config file -
binlimit
is the minimum number of bins needed to do the rebinning process (if error rebinning is being used) -
padratio
is the ratio of the top to bottom pad heights for split plots. -
heightratio
is used for given whitespace to plots. The ratio is the height of the graph (ie max value) to the amount of space above the graph. -
rebinlimit
is the value important to error rebinning. If the relative error of the combined bins is less than the rebinlimit, the binning is set, otherwise it continues till the relative error is low enough. Read up on Rebinning for more information -
dividebins
is the boolean value that sets if the bin value is divided by the bin width or not