Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
HistoStyle.h
1/*
2 * HistoStyle.h
3 *
4 * Created on: 30 lip 2024
5 * Author: daniel
6 */
7
8#ifndef HAL_FEATURES_HIST_STYLES_HISTOSTYLE_H_
9#define HAL_FEATURES_HIST_STYLES_HISTOSTYLE_H_
10
11#include <RtypesCore.h>
12#include <TGraph.h>
13#include <TString.h>
14
15#include "AxisStyle.h"
16#include "DividedHisto.h"
17#include "FillStyle.h"
18#include "LineStyle.h"
19#include "MarkerStyle.h"
20
21namespace Hal {
25 class HistoStyle : public Style {
26 TString fTitle;
27 AxisStyle fXAxis;
28 AxisStyle fYAxis;
29 AxisStyle fZAxis;
30 MarkerStyle fMarker;
31 LineStyle fLine;
32 FillStyle fFill;
33
34 template<class T>
35 void ApplyInternal(T& object) const;
36
37 public:
38 static const unsigned short int kTitle;
39 static const unsigned short int kMin;
40 static const unsigned short int kMax;
41 HistoStyle() {};
51 static HistoStyle GetStyle(TString style);
57 void SetAxisValues(Double_t val, Char_t x = 'x') { SetAxis(val, val, val, val, x); };
62 void SetMin(Double_t val);
66 void SetMax(Double_t val);
72 void SetMinMax(Double_t minVal, Double_t maxVal);
79 void SetMarkerProperties(Color_t c, Int_t marker, Size_t size);
86 void SetLineProperties(Color_t c, Style_t style, Double_t widgth);
91 void SetColor(Color_t c);
98 void SetRangeUser(Double_t min, Double_t max, Char_t ax);
106 void SetTitles(TString histo, TString xAxis = "", TString yAxis = "", TString zAxis = "");
115 void SetAxis(Double_t titleSize, Double_t titleOffset, Double_t labelSize, Double_t labelOffset, Char_t x = 'x');
121 void CenterTitle(Bool_t center = kTRUE, Char_t = 'x');
122 /*
123 * apply setting to histogram
124 * @param h
125 * @param no - for multigraph of hall
126 */
127 void Apply(TObject& h, Int_t no = 0) const;
132 void SetAntiColor(Bool_t safe = kFALSE);
133 void SetTitle(TString title);
134 AxisStyle& GetAxisStyle(Char_t x);
135 FillStyle& GetFillStyle() { return fFill; };
136 LineStyle& GetLineStyle() { return fLine; }
137 MarkerStyle& GetMarkerStyle() { return fMarker; }
138 TString GetTitle() const { return fTitle; };
139 void ExportToXML(XMLNode* node) const;
140 void ImportFromXML(XMLNode* node);
141 virtual ~HistoStyle() {};
142 ClassDef(HistoStyle, 1);
143 };
144
145} /* namespace Hal */
146
147
148#endif /* HAL_FEATURES_HIST_STYLES_HISTOSTYLE_H_ */
void SetAxisValues(Double_t val, Char_t x='x')
Definition HistoStyle.h:57
void SetAxis(Double_t titleSize, Double_t titleOffset, Double_t labelSize, Double_t labelOffset, Char_t x='x')
void SetColor(Color_t c)
static HistoStyle GetStyle(TString style)
void SetLineProperties(Color_t c, Style_t style, Double_t widgth)
void SetMarkerProperties(Color_t c, Int_t marker, Size_t size)
void CenterTitle(Bool_t center=kTRUE, Char_t='x')
void SetMax(Double_t val)
void SetMinMax(Double_t minVal, Double_t maxVal)
void SetRangeUser(Double_t min, Double_t max, Char_t ax)
void SetAntiColor(Bool_t safe=kFALSE)
void SetMin(Double_t val)
void SetTitles(TString histo, TString xAxis="", TString yAxis="", TString zAxis="")