Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
LineStyle.h
1/*
2 * LineStyle.h
3 *
4 * Created on: 30 lip 2024
5 * Author: daniel
6 */
7
8#ifndef HAL_FEATURES_HIST_STYLES_LINESTYLE_H_
9#define HAL_FEATURES_HIST_STYLES_LINESTYLE_H_
10
11#include "Style.h"
12
13namespace Hal {
17 class LineStyle : public Style {
18
19
20 public:
21 static const unsigned short int kColor;
22 static const unsigned short int kWidth;
23 static const unsigned short int kStyle;
24 LineStyle() {};
25
26 void SetColor(Int_t val);
27
28 void SetWidth(Int_t val);
29
30 void SetStyle(Int_t val);
31
32 Int_t GetColor() const;
33
34 Int_t GetWidth() const;
35
36 Int_t GetStyle() const;
37
38 void ExportToXML(XMLNode* node) const;
39
40 void ImportFromXML(XMLNode* node);
41
42 template<class T>
43 void Apply(T& obj) const;
44
45 virtual ~LineStyle() {};
46 ClassDef(LineStyle, 1);
47 };
48
49} /* namespace Hal */
50
51template<class T>
52inline void Hal::LineStyle::Apply(T& obj) const {
53 if (Find(kWidth)) obj.SetLineWidth(GetI(kWidth));
54 if (Find(kColor)) obj.SetLineColor(GetI(kColor));
55 if (Find(kStyle)) obj.SetLineStyle(GetI(kStyle));
56}
57
58#endif /* HAL_FEATURES_HIST_STYLES_LINESTYLE_H_ */
Bool_t Find(Int_t bit) const
Definition Style.h:55