![]() |
MaCh3 2.2.1
Reference Guide
|
EW: provides centralized styling utilities for plots, including name prettification and style application. More...
#include <Plotting/plottingUtils/styleManager.h>
Public Member Functions | |
StyleManager (std::string configName) | |
Constructor. | |
StyleManager (const StyleManager &)=delete | |
StyleManager (StyleManager &&)=default | |
~StyleManager () | |
std::string | prettifyParamName (const std::string &origName) const |
Convert hideous and vulgar internal parameter name into a beautiful presentable name. | |
std::string | prettifySampleName (const std::string &origName) const |
Convert hideous and vulgar internal sample name into a beautiful presentable name. | |
void | setPalette (int rootPlotStyle) const |
Set the root colour palette to one of the default root pallettes as defined in (root docs)[https://root.cern.ch/doc/master/classTColor.html#C05]. | |
void | setPalette (std::string configStyleName) const |
Set the root colour palette to one of the ones defined in the style config. | |
void | setTH1Style (TH1 *hist, std::string styleName) const |
Set the style of a TH1 to one of the styles defined in the style config. | |
Private Member Functions | |
std::string | prettifyName (const std::string &origName, const std::string &nameType) const |
Private Attributes | |
YAML::Node | _styleConfig |
EW: provides centralized styling utilities for plots, including name prettification and style application.
Definition at line 25 of file styleManager.h.
MaCh3Plotting::StyleManager::StyleManager | ( | std::string | configName | ) |
Constructor.
configName | The style config to read from |
Definition at line 4 of file styleManager.cpp.
|
delete |
|
default |
|
inline |
Definition at line 35 of file styleManager.h.
|
private |
Definition at line 8 of file styleManager.cpp.
|
inline |
Convert hideous and vulgar internal parameter name into a beautiful presentable name.
The pretty parameter names should be specified in the style config file
origName | The "internal" name used to uniquely identify the parameter inside the plotting code |
Definition at line 44 of file styleManager.h.
|
inline |
Convert hideous and vulgar internal sample name into a beautiful presentable name.
The pretty sample names should be specified in the style config file
origName | The "internal" name used to uniquely identify the sample inside the plotting code |
Definition at line 53 of file styleManager.h.
void MaCh3Plotting::StyleManager::setPalette | ( | int | rootPlotStyle | ) | const |
Set the root colour palette to one of the default root pallettes as defined in (root docs)[https://root.cern.ch/doc/master/classTColor.html#C05].
rootPlotStyle | The index of the palette as defined by root |
Definition at line 21 of file styleManager.cpp.
void MaCh3Plotting::StyleManager::setPalette | ( | std::string | configStyleName | ) | const |
Set the root colour palette to one of the ones defined in the style config.
rootPlotStyle | The name of the palette you want to use, should be the same as it appears in the style config |
Definition at line 26 of file styleManager.cpp.
void MaCh3Plotting::StyleManager::setTH1Style | ( | TH1 * | hist, |
std::string | styleName | ||
) | const |
Set the style of a TH1 to one of the styles defined in the style config.
hist | The TH1 that you wish to modify |
styleName | The name of the style you want to use, as it appears in the config file |
Definition at line 55 of file styleManager.cpp.
|
private |
Definition at line 74 of file styleManager.h.