31#ifndef G4HnInformation_h
32#define G4HnInformation_h 1
110 : fName(
std::move(name))
111 { fHnDimensionInformations.reserve(nofDimensions); }
119 for (
G4int i = 0; i < (
G4int)fHnDimensionInformations.size(); ++i) {
154 std::vector<G4HnDimensionInformation> fHnDimensionInformations;
155 std::vector<G4bool> fIsLogAxis {
false,
false,
false };
156 G4bool fActivation {
true };
158 G4bool fPlotting {
false };
159 std::pair<G4bool, G4bool> fDeleted {
false,
false };
177template <
unsigned int DIM>
179 const std::array<G4HnDimension, DIM>& bins,
180 const std::array<G4HnDimensionInformation, DIM>& hnInfo,
181 G4bool isProfile =
false);
188{ fHnDimensionInformations.push_back(hnDimensionInformation); }
194 (*info) = hnDimensionInformation;
198{ fIsLogAxis[axis] = isLog; }
201{ fActivation = activation; }
207{ fPlotting = plotting; }
210{ fDeleted = std::make_pair(deleted, keepSetting); }
213{ fFileName = fileName; }
219{
return &(fHnDimensionInformations[dimension]); }
222{
return fHnDimensionInformations[dimension]; }
225{
return fIsLogAxis[axis]; }
228{
return fActivation; }
237{
return fDeleted.first; }
245template <
unsigned int DIM>
247 const std::array<G4HnDimension, DIM>& bins,
248 const std::array<G4HnDimensionInformation, DIM>& hnInfo,
255 auto dimToCheck = (isProfile) ? DIM -1 : DIM ;
256 for (
unsigned int idim = 0; idim < dimToCheck; ++idim) {
262 result &=
CheckMinMax(bins[DIM-1].fMinValue, bins[DIM-1].fMaxValue);
G4double(*)(G4double) G4Fcn
G4bool CheckDimension(unsigned int idim, const G4HnDimension &dimension, const G4HnDimensionInformation &info)
void UpdateTitle(G4String &title, const G4HnDimensionInformation &hnInfo)
void Update(G4double &value, const G4HnDimensionInformation &hnInfo)
void UpdateValues(G4HnDimension &bins, const G4HnDimensionInformation &hnInfo)
G4bool CheckDimensions(const std::array< G4HnDimension, DIM > &bins, const std::array< G4HnDimensionInformation, DIM > &hnInfo, G4bool isProfile=false)
G4bool CheckMinMax(G4double min, G4double max)
G4HnDimension & operator=(const G4HnDimension &rhs)=default
G4HnDimension(G4int nbins, G4double minValue, G4double maxValue)
std::vector< G4double > fEdges
G4HnDimension(const std::vector< G4double > &edges)
G4HnDimension(const G4HnDimension &rhs)=default