31#ifndef G4HnInformation_h
32#define G4HnInformation_h 1
105 : fName(
std::move(name))
106 { fHnDimensionInformations.reserve(nofDimensions); }
114 for (
G4int i = 0; i < (
G4int)fHnDimensionInformations.size(); ++i) {
149 std::vector<G4HnDimensionInformation> fHnDimensionInformations;
150 std::vector<G4bool> fIsLogAxis {
false,
false,
false };
151 G4bool fActivation {
true };
153 G4bool fPlotting {
false };
154 std::pair<G4bool, G4bool> fDeleted {
false,
false };
162void Update(
G4double& value,
const G4HnDimensionInformation& hnInfo);
163void UpdateValues(G4HnDimension& bins,
const G4HnDimensionInformation& hnInfo);
164void Update(G4HnDimension& bins,
const G4HnDimensionInformation& hnInfo);
165void UpdateTitle(G4String& title,
const G4HnDimensionInformation& hnInfo);
170 const G4HnDimension& dimension,
const G4HnDimensionInformation& info);
172template <
unsigned int DIM>
174 const std::array<G4HnDimension, DIM>& bins,
175 const std::array<G4HnDimensionInformation, DIM>& hnInfo,
176 G4bool isProfile =
false);
183{ fHnDimensionInformations.push_back(hnDimensionInformation); }
189 (*info) = hnDimensionInformation;
193{ fIsLogAxis[axis] = isLog; }
196{ fActivation = activation; }
202{ fPlotting = plotting; }
205{ fDeleted = std::make_pair(deleted, keepSetting); }
208{ fFileName = fileName; }
214{
return &(fHnDimensionInformations[dimension]); }
217{
return fHnDimensionInformations[dimension]; }
220{
return fIsLogAxis[axis]; }
223{
return fActivation; }
232{
return fDeleted.first; }
240template <
unsigned int DIM>
242 const std::array<G4HnDimension, DIM>& bins,
243 const std::array<G4HnDimensionInformation, DIM>& hnInfo,
250 auto dimToCheck = (isProfile) ? DIM -1 : DIM ;
251 for (
unsigned int idim = 0; idim < dimToCheck; ++idim) {
257 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