23 #ifndef REST_TRestDataSetPlot
24 #define REST_TRestDataSetPlot
29 #include "TRestDataSet.h"
30 #include "TRestMetadata.h"
38 std::string name =
"";
39 std::string drawOption =
"";
40 std::vector<std::string> variable;
41 std::vector<TVector2> range;
42 std::vector<Int_t> nBins;
48 Bool_t statistics =
false;
55 std::string name =
"";
56 std::string title =
"";
58 std::string save =
"";
60 std::string stackDrawOption =
"nostack";
63 std::string scale =
"";
69 Bool_t legendOn =
false;
77 Double_t marginBottom;
84 std::vector<HistoInfo> histos;
86 THStack* hs =
nullptr;
87 TLegend* legend =
nullptr;
95 std::vector<std::pair<std::array<std::string, 3>, TVector2>> variablePos;
96 std::vector<std::pair<std::array<std::string, 3>, TVector2>> metadataPos;
97 std::vector<std::pair<std::array<std::string, 3>, TVector2>> obsPos;
98 std::vector<std::pair<std::array<std::string, 3>, TVector2>> expPos;
102 std::vector<TLatex*> text;
108 const std::map<std::string, int>
ColorIdMap{{
"white", kWhite}, {
"black", kBlack}, {
"gray", kGray},
109 {
"red", kRed}, {
"green", kGreen}, {
"blue", kBlue},
110 {
"yellow", kYellow}, {
"magenta", kMagenta}, {
"cyan", kCyan},
111 {
"orange", kOrange}, {
"spring", kSpring}, {
"teal", kTeal},
112 {
"azure", kAzure}, {
"violet", kViolet}, {
"pink", kPink}};
116 {
"solid", kSolid}, {
"dashed", kDashed}, {
"dotted", kDotted}, {
"dashDotted", kDashDotted}};
120 {
"dotted", kFDotted1}, {
"dashed", kFDashed1}, {
"dotted1", kFDotted1},
121 {
"dotted2", kFDotted2}, {
"dotted3", kFDotted3}, {
"hatched1", kFHatched1},
122 {
"hatched2", kHatched2}, {
"hatched3", kFHatched3}, {
"hatched4", kFHatched4},
123 {
"wicker", kFWicker}, {
"scales", kFScales}, {
"bricks", kFBricks},
124 {
"snowflakes", kFSnowflakes}, {
"circles", kFCircles}, {
"tiles", kFTiles},
125 {
"mondrian", kFMondrian}, {
"diamonds", kFDiamonds}, {
"waves1", kFWaves1},
126 {
"dashed1", kFDashed1}, {
"dashed2", kFDashed2}, {
"alhambra", kFAlhambra},
127 {
"waves2", kFWaves2}, {
"stars1", kFStars1}, {
"stars2", kFStars2},
128 {
"pyramids", kFPyramids}, {
"frieze", kFFrieze}, {
"metopes", kFMetopes},
129 {
"empty", kFEmpty}, {
"solid", kFSolid}};
149 Double_t fLegendY1 = 0.75;
150 Double_t fLegendX2 = 0.88;
151 Double_t fLegendY2 = 0.88;
155 TVector2 fCanvasDivisions = TVector2(2, 2);
156 TVector2 fCanvasDivisionMargins = TVector2(0.01, 0.01);
180 Int_t
GetIDFromMapString(
const std::map<std::string, int>& mapStr,
const std::string& in);
A class to help on cuts definitions. To be used with TRestAnalysisTree.
Perform the plot over datasets.
Int_t GetIDFromMapString(const std::map< std::string, int > &mapStr, const std::string &in)
This functions gets the ID from a map string that is passed by reference. It is used to translate col...
std::vector< PanelInfo > fPanels
Vector with panels/label options.
TRestCut * ReadCut(TRestCut *cut, TiXmlElement *ele=nullptr)
this function is used to add the different cuts provided in different metadata sections,...
void Initialize() override
Function to initialize input/output event members and define the section name.
void PlotCombinedCanvas()
This functions performs the plot of the combined canvas with the different panels and plots.
const std::map< std::string, int > LineStyleMap
LineStyleMap as enum "ELineStyle" defined in TAttLine.h.
std::string fDataSetName
Name of the dataset to be imported.
void ReadPlotInfo()
This function reads the config file plot info and stores it in a vector of PlotInfo.
void ReadPanelInfo()
This function reads the config file panel info and stores it in a vector of PanelInfo.
void GenerateDataSetFromFilePattern(TRestDataSet &dataSet)
This functions generates a dataSet based on the information of the rml file. A TRestDataSet is pased ...
Int_t fPaletteStyle
Palette style.
const std::map< std::string, int > FillStyleMap
FillStyleMap as enum "EFillStyle" defined in TAttFill.h.
TRestDataSetPlot()
Default constructor.
TRestCut * fCut
Global cut for the entire dataSet.
Bool_t fPreviewPlot
Preview plot.
const std::map< std::string, int > ColorIdMap
Maps for internal use only.
void PrintMetadata() override
Prints on screen the information about the metadata members of TRestDataSetPlot.
TVector2 fCanvasSize
Canvas options, size, divisions and margins.
std::string fOutputFileName
OutputFileName.
~TRestDataSetPlot()
Default destructor.
Double_t fLegendX1
Legend position and size.
std::vector< PlotInfo > fPlots
Vector with plots/pads options.
void InitFromConfigFile() override
Initialization of specific TRestDataSetPlot members through an RML file.
void CleanUp()
Clean up histos and text but note that the metadata is unchanged.
It allows to group a number of runs that satisfy given metadata conditions.
Nested classes for internal use only.
Auxiliary class for panels/labels.
Auxiliary struct for plots/pads.