HistogramSeriesProperties.hh
4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/*
* HistogramSeriesProperties.hh
*
* Created on: Jan 27, 2023
* Author: AKKODIS
*/
#ifndef HISTOGRAMSERIESPROPERTIES_HH_
#define HISTOGRAMSERIESPROPERTIES_HH_
#include <iostream>
#include <cmath>
#include <string>
#include "DrawingProperties.hh"
#include "ParameterIndexesTool.hh"
#include "BinsProperties.hh"
#include "HistotypeProperties.hh"
#include "ParameterData.hh"
#include "XSeriesProperties.hh"
namespace plot {
/**
* Drawing properties for a parameter histogram1Dseries.
*/
class HistogramSeriesProperties: public DrawingProperties {
public:
HistogramSeriesProperties(std::string histogramType) :
DrawingProperties(),
_histogramType(histogramType),
_index(-1,-1),
_paramId(""),
_hasXAxis(true),
_hasYAxis(true),
_hasZAxis(false),
_xId(-1),
_id(-1)
{
}
HistogramSeriesProperties(const DrawingProperties& ref_, std::string histogramType) :
DrawingProperties(ref_),
_histogramType(histogramType),
_index(-1,-1),
_paramId(""),
_hasXAxis(true),
_hasYAxis(true),
_hasZAxis(false),
_xId(-1),
_id(-1)
{
}
HistogramSeriesProperties(const HistogramSeriesProperties& pParamDrawingProperties_) :
DrawingProperties(pParamDrawingProperties_),
_histogramType(pParamDrawingProperties_._histogramType),
_index(pParamDrawingProperties_._index),
_paramId(pParamDrawingProperties_._paramId),
_hasXAxis(pParamDrawingProperties_._hasXAxis),
_hasYAxis(pParamDrawingProperties_._hasYAxis),
_hasZAxis(pParamDrawingProperties_._hasZAxis),
_xId(pParamDrawingProperties_._xId),
_id(pParamDrawingProperties_._id)
{
}
HistogramSeriesProperties& operator=(const HistogramSeriesProperties& ref_) {
DrawingProperties::operator=(ref_);
_histogramType = ref_._histogramType;
_index = ref_._index;
_paramId = ref_._paramId;
_hasYAxis = ref_._hasYAxis;
_hasXAxis = ref_._hasXAxis;
_hasZAxis = ref_._hasZAxis;
_xId = ref_._xId;
_id = ref_._id;
return *this;
}
void setIndex(AMDA::Common::ParameterIndexComponent i_) {
_index = i_;
}
AMDA::Common::ParameterIndexComponent getIndex() const {
return _index;
}
std::vector<AMDA::Common::ParameterIndexComponent> getIndexList(std::map<std::string, ParameterData> *pParameterValues) {
std::vector<AMDA::Common::ParameterIndexComponent> indexes;
if (_index == AMDA::Common::ParameterIndexComponent(-1,-1))
{
indexes.insert(indexes.end(),
(*pParameterValues)[getParamId()]._indexes.begin(),
(*pParameterValues)[getParamId()]._indexes.end());
if (indexes.empty()) {
indexes.push_back(AMDA::Common::ParameterIndexComponent(-1,-1));
}
} else {
indexes.push_back(_index);
}
return indexes;
}
std::string getParamId(){
return _paramId;
}
void setParamId(std::string paramId_) {_paramId = paramId_;}
bool hasXAxis() const {return _hasXAxis;}
void setXAxis(bool hasXAxis) {
_hasXAxis = hasXAxis;
}
bool hasYAxis() const {
return _hasYAxis;
}
void setYAxis(bool hasYAxis) {
_hasYAxis = hasYAxis;
}
bool hasZAxis() const {
return _hasZAxis;
}
void setZAxis(bool hasZAxis) {
_hasZAxis = hasZAxis;
}
int getXId() const {
return _xId;
}
void setXId(int xId) {
_xId = xId;
}
int getId() const {
return _id;
}
void setId(int id) {
_id = id;
}
virtual ~HistogramSeriesProperties() {
}
ManualProperties& getManualProperties(){return _manualProperties;}
void setManualProperties(const ManualProperties& pManualProperties_){_manualProperties = pManualProperties_;}
HistotypeProperties& getHistotypeProperties(){return _histotypeProperties;}
void setHistotypeProperties(const HistotypeProperties& pHistotypeProperties){_histotypeProperties = pHistotypeProperties;}
std::string getHistogramType(){return _histogramType;}
void setHistogramType(std::string histogramType){_histogramType = histogramType;}
private:
std::string _histogramType;
AMDA::Common::ParameterIndexComponent _index;
std::string _paramId;
bool _hasXAxis;
bool _hasYAxis;
bool _hasZAxis;
int _xId;
int _id;
ManualProperties _manualProperties;
HistotypeProperties _histotypeProperties;
};
} /* namespace plot */
#endif /* HISTOGRAMSERIESPROPERTIES_HH_ */