|
ndmspc
v1.2.0-0.1.rc3
|
Represents a single point in multi-dimensional binning. More...
#include <NBinningPoint.h>
Public Member Functions | |
| NBinningPoint (NBinning *b=nullptr) | |
| Constructor. More... | |
| virtual | ~NBinningPoint () |
| Destructor. | |
| virtual void | Print (Option_t *option="") const |
| Print binning point information. More... | |
| virtual void | Reset () |
| Reset the binning point to initial state. More... | |
| Int_t | GetNDimensionsContent () const |
| Get number of dimensions in content histogram. More... | |
| Int_t * | GetCoords () const |
| Get pointer to content coordinates array. More... | |
| Int_t | GetNDimensions () const |
| Get number of dimensions. More... | |
| Int_t * | GetStorageCoords () const |
| Get pointer to storage coordinates array. More... | |
| bool | RecalculateStorageCoords (Long64_t entry=-1, bool useBinningDefCheck=false) |
| Recalculate storage coordinates for the point. More... | |
| bool | SetPointContentFromLinearIndex (Long64_t linBin, bool checkBinningDef=false) |
| Set point content from linear index. More... | |
| NStorageTree * | GetStorageTree () const |
| Returns a pointer to the associated storage tree. More... | |
| Long64_t | Fill (bool ignoreFilledCheck=false) |
| Fill the binning point content. More... | |
| json & | GetCfg () |
| Get reference to configuration JSON object. More... | |
| void | SetCfg (json cfg) |
| Set configuration JSON object. More... | |
| std::map< int, std::vector< int > > | GetBaseAxisRanges () const |
| Get base axis ranges for the point. More... | |
| std::string | GetString (const std::string &prefix="", bool all=false) const |
| Returns a string representation of the binning point. More... | |
| std::vector< std::string > | GetLabels () const |
| Get labels for each axis. More... | |
| Double_t * | GetMins () const |
| Get the array of minimum values for all axes. More... | |
| Double_t * | GetMaxs () const |
| Get the array of maximum values for all axes. More... | |
| Double_t | GetBinMin (std::string axis) const |
| Get the minimum value for a specific axis. More... | |
| Double_t | GetBinMax (std::string axis) const |
| Get the maximum value for a specific axis. More... | |
| Double_t | GetBinCenter (std::string axis) const |
| Returns the center value of the bin along the specified axis. More... | |
| std::string | GetBinLabel (std::string axis) const |
| Get the label for a specific axis. More... | |
| Int_t | GetBin (std::string axis) const |
| Returns the bin index for the specified axis. More... | |
| NBinning * | GetBinning () const |
| Get pointer to NBinning object. More... | |
| void | SetBinning (NBinning *b) |
| Set NBinning object pointer. More... | |
| NStorageTree * | GetTreeStorage () const |
| Get pointer to storage tree object. More... | |
| void | SetTreeStorage (NStorageTree *s) |
| Set storage tree object pointer. More... | |
| NGnTree * | GetInput () const |
| Get pointer to input NGnTree object. More... | |
| void | SetInput (NGnTree *input) |
| Set input NGnTree object pointer. More... | |
| void | SetEntryNumber (Long64_t entry) |
| Set entry number for the point. More... | |
| Long64_t | GetEntryNumber () const |
| Get entry number for the point. More... | |
| void | SetParameters (NParameters *params) |
| Set the parameters for this binning point. More... | |
| NParameters * | GetParameters () const |
| Get the parameters associated with this binning point. More... | |
| TObject * | GetTempObject (const std::string &name) const |
| Retrieve a temporary object by name. More... | |
| void | SetTempObject (const std::string &name, TObject *obj) |
| Set a temporary object with the given name. More... | |
| json & | GetTempCfg () |
| Get reference to temporary configuration JSON object. More... | |
Private Attributes | |
| json | fCfg {} |
| Configuration object. | |
| NGnTree * | fInput {nullptr} |
| Input NGnTree object. | |
| NBinning * | fBinning {nullptr} |
| Binning object. | |
| NStorageTree * | fTreeStorage {nullptr} |
| Storage tree object. | |
| Int_t | fContentNDimensions {1} |
| Number of dimensions in content histogram. | |
| Int_t * | fContentCoords {nullptr} |
| Coordinates of the point. | |
| Int_t | fNDimensions {1} |
| Number of dimensions. | |
| Int_t * | fStorageCoords {nullptr} |
| Storage coordinates of the point. | |
| Double_t * | fMins {nullptr} |
| Minimum values for each axis. | |
| Double_t * | fMaxs {nullptr} |
| Maximum values for each axis. | |
| Int_t * | fBaseBinMin {nullptr} |
| Base bin minimum (for variable binning) | |
| Int_t * | fBaseBinMax {nullptr} |
| Base bin maximum (for variable binning) | |
| std::vector< std::string > | fLabels {} |
| Labels for each axis. | |
| Long64_t | fEntryNumber {-1} |
| Entry in the storage tree. | |
| NParameters * | fParameters {nullptr} |
| Parameter axis (if any) | |
| std::map< std::string, TObject * > | fTempObjects |
| ! Outputs map | |
| json | fTempCfg {} |
| Temporary configuration object. | |
Represents a single point in multi-dimensional binning.
Stores coordinates, axis ranges, labels, and configuration for a binning point. Provides methods for coordinate management, storage mapping, content filling, and integration with NBinning.
Definition at line 21 of file NBinningPoint.h.
| Ndmspc::NBinningPoint::NBinningPoint | ( | NBinning * | b = nullptr | ) |
Constructor.
| b | Pointer to NBinning object. |
Definition at line 16 of file NBinningPoint.cxx.
References fBaseBinMax, fBaseBinMin, fBinning, fContentCoords, fContentNDimensions, fLabels, fMaxs, fMins, fNDimensions, fStorageCoords, Ndmspc::NBinning::GetAxes(), Ndmspc::NBinning::GetContent(), and Reset().
| Long64_t Ndmspc::NBinningPoint::Fill | ( | bool | ignoreFilledCheck = false | ) |
Fill the binning point content.
| ignoreFilledCheck | Ignore filled check. |
Fill the content histogram at the current point
Definition at line 226 of file NBinningPoint.cxx.
References fBinning, fContentCoords, fStorageCoords, Ndmspc::NBinning::GetContent(), Ndmspc::NBinningDef::GetContent(), Ndmspc::NBinning::GetDefinition(), and Ndmspc::NBinningDef::GetIds().
Referenced by Ndmspc::NStorageTree::Fill().
| std::map< int, std::vector< int > > Ndmspc::NBinningPoint::GetBaseAxisRanges | ( | ) | const |
Get base axis ranges for the point.
Get base axis ranges as map of axis id to vector of {min, max}
Definition at line 184 of file NBinningPoint.cxx.
References fBaseBinMax, fBaseBinMin, and fNDimensions.
| int Ndmspc::NBinningPoint::GetBin | ( | std::string | axis | ) | const |
Returns the bin index for the specified axis.
| axis | The name of the axis for which to retrieve the bin index. |
Get bin for specific axis
Definition at line 358 of file NBinningPoint.cxx.
References fBinning, fNDimensions, fStorageCoords, and Ndmspc::NBinning::GetAxes().
Referenced by Ndmspc::NGnTree::BuildObjectPath().
| Double_t Ndmspc::NBinningPoint::GetBinCenter | ( | std::string | axis | ) | const |
Returns the center value of the bin along the specified axis.
| axis | The name of the axis for which to get the bin center. |
Get center value for specific axis
Definition at line 314 of file NBinningPoint.cxx.
References fBinning, fMaxs, fMins, fNDimensions, and Ndmspc::NBinning::GetAxes().
Referenced by Ndmspc::NGnTree::BuildObjectPath().
| std::string Ndmspc::NBinningPoint::GetBinLabel | ( | std::string | axis | ) | const |
Get the label for a specific axis.
| axis | The name of the axis. |
Get label for specific axis
Definition at line 336 of file NBinningPoint.cxx.
References fBinning, fLabels, fNDimensions, and Ndmspc::NBinning::GetAxes().
Referenced by Ndmspc::NGnTree::BuildObjectPath(), and Ndmspc::NGnTree::Import().
| Double_t Ndmspc::NBinningPoint::GetBinMax | ( | std::string | axis | ) | const |
Get the maximum value for a specific axis.
| axis | The name of the axis. |
Get maximum value for specific axis
Definition at line 292 of file NBinningPoint.cxx.
References fBinning, fMaxs, fNDimensions, and Ndmspc::NBinning::GetAxes().
Referenced by Ndmspc::NGnTree::BuildObjectPath().
| Double_t Ndmspc::NBinningPoint::GetBinMin | ( | std::string | axis | ) | const |
Get the minimum value for a specific axis.
| axis | The name of the axis. |
Get minimum value for specific axis
Definition at line 270 of file NBinningPoint.cxx.
References fBinning, fMins, fNDimensions, and Ndmspc::NBinning::GetAxes().
Referenced by Ndmspc::NGnTree::BuildObjectPath().
|
inline |
Get pointer to NBinning object.
Definition at line 185 of file NBinningPoint.h.
References fBinning.
|
inline |
Get reference to configuration JSON object.
Definition at line 103 of file NBinningPoint.h.
References fCfg.
Referenced by Ndmspc::NGnTree::Import(), Ndmspc::NGnTree::NGnTree(), Ndmspc::NGnThreadData::Process(), and Ndmspc::NGnTree::Projection().
|
inline |
Get pointer to content coordinates array.
Definition at line 55 of file NBinningPoint.h.
References fContentCoords.
Referenced by Ndmspc::NBinning::GetPoint(), Ndmspc::NGnTree::Import(), Ndmspc::NGnThreadData::Merge(), Ndmspc::NGnThreadData::Process(), and Ndmspc::NGnTree::Process().
|
inline |
Get entry number for the point.
Definition at line 227 of file NBinningPoint.h.
References fEntryNumber.
Referenced by Ndmspc::NStorageTree::Fill(), Ndmspc::NStorageTree::Merge(), Ndmspc::NGnTree::NGnTree(), and Ndmspc::NGnTree::Projection().
|
inline |
Get pointer to input NGnTree object.
Definition at line 209 of file NBinningPoint.h.
References fInput.
Referenced by Ndmspc::NGnTree::NGnTree(), and Ndmspc::NGnTree::Projection().
|
inline |
Get labels for each axis.
Definition at line 130 of file NBinningPoint.h.
References fLabels.
|
inline |
Get the array of maximum values for all axes.
Definition at line 142 of file NBinningPoint.h.
References fMaxs.
|
inline |
Get the array of minimum values for all axes.
Definition at line 136 of file NBinningPoint.h.
References fMins.
|
inline |
Get number of dimensions.
Definition at line 61 of file NBinningPoint.h.
References fNDimensions.
|
inline |
Get number of dimensions in content histogram.
Definition at line 49 of file NBinningPoint.h.
References fContentNDimensions.
Referenced by Ndmspc::NGnTree::Import(), Ndmspc::NGnThreadData::Process(), and Ndmspc::NGnTree::Process().
|
inline |
Get the parameters associated with this binning point.
Returns the pointer to the NParameters object currently associated with this binning point.
Definition at line 245 of file NBinningPoint.h.
References fParameters.
Referenced by Ndmspc::NGnTree::NGnTree().
|
inline |
Get pointer to storage coordinates array.
Definition at line 67 of file NBinningPoint.h.
References fStorageCoords.
Referenced by Ndmspc::NStorageTree::Fill(), Ndmspc::NGnThreadData::Merge(), Ndmspc::NGnTree::NGnTree(), Ndmspc::NGnTree::Play(), Ndmspc::NGnThreadData::Process(), Ndmspc::NGnTree::Process(), and Ndmspc::NBinningDef::RefreshContentFromIds().
|
inline |
Returns a pointer to the associated storage tree.
Definition at line 90 of file NBinningPoint.h.
References fTreeStorage.
Referenced by Ndmspc::NGnTree::Import().
| std::string Ndmspc::NBinningPoint::GetString | ( | const std::string & | prefix = "", |
| bool | all = false |
||
| ) | const |
Returns a string representation of the binning point.
| prefix | Optional prefix to prepend to the string. |
| all | If true, includes all details in the string; otherwise, provides a summary. |
Returns point as string
Definition at line 196 of file NBinningPoint.cxx.
References fBinning, fNDimensions, Ndmspc::NBinning::GetAxes(), and Ndmspc::NBinning::GetAxisType().
Referenced by Ndmspc::NGnTree::NGnTree(), and Print().
|
inline |
Get reference to temporary configuration JSON object.
Definition at line 267 of file NBinningPoint.h.
References fTempCfg.
| TObject * Ndmspc::NBinningPoint::GetTempObject | ( | const std::string & | name | ) | const |
Retrieve a temporary object by name.
| name | The name of the temporary object. |
Definition at line 380 of file NBinningPoint.cxx.
References fTempObjects.
Referenced by Ndmspc::NGnTree::Import(), and Ndmspc::NGnTree::NGnTree().
|
inline |
Get pointer to storage tree object.
Definition at line 197 of file NBinningPoint.h.
References fTreeStorage.
Referenced by Ndmspc::NGnTree::Import().
|
virtual |
Print binning point information.
| option | Print options. |
Print the binning point
Definition at line 81 of file NBinningPoint.cxx.
References Ndmspc::NUtils::ArrayToVector(), fCfg, fContentCoords, fContentNDimensions, fEntryNumber, fLabels, fMaxs, fMins, fNDimensions, fStorageCoords, Ndmspc::NUtils::GetCoordsString(), and GetString().
Referenced by Ndmspc::NGnTree::Play(), and Ndmspc::NGnTree::Projection().
| bool Ndmspc::NBinningPoint::RecalculateStorageCoords | ( | Long64_t | entry = -1, |
| bool | useBinningDefCheck = false |
||
| ) |
Recalculate storage coordinates for the point.
| entry | Entry number (optional). |
| useBinningDefCheck | Use binning definition check. |
Recalculate storage coordinates based on content coordinates
Definition at line 109 of file NBinningPoint.cxx.
References Ndmspc::NUtils::ArrayToVector(), fBaseBinMax, fBaseBinMin, fBinning, fContentCoords, fContentNDimensions, fEntryNumber, fLabels, fMaxs, fMins, fNDimensions, fParameters, fStorageCoords, fTreeStorage, Ndmspc::NBinning::GetAxes(), Ndmspc::NBinningDef::GetAxes(), Ndmspc::NBinning::GetAxisRanges(), Ndmspc::NBinning::GetContent(), Ndmspc::NBinning::GetCurrentDefinitionName(), Ndmspc::NBinning::GetDefinition(), Ndmspc::NBinning::GetDefinitions(), Ndmspc::NParameters::GetHisto(), Ndmspc::NBinningDef::GetIds(), and Reset().
Referenced by Ndmspc::NBinning::GetPoint(), Ndmspc::NGnThreadData::Process(), Ndmspc::NGnTree::Process(), and SetPointContentFromLinearIndex().
|
virtual |
Reset the binning point to initial state.
Reset the point coordinates
Definition at line 55 of file NBinningPoint.cxx.
References fBaseBinMax, fBaseBinMin, fContentCoords, fContentNDimensions, fEntryNumber, fLabels, fMaxs, fMins, fNDimensions, and fStorageCoords.
Referenced by Ndmspc::NStorageTree::GetEntry(), Ndmspc::NGnThreadData::Merge(), NBinningPoint(), RecalculateStorageCoords(), Ndmspc::NBinning::Reset(), and Ndmspc::NBinning::SetCurrentDefinitionName().
| void Ndmspc::NBinningPoint::SetBinning | ( | NBinning * | b | ) |
|
inline |
Set configuration JSON object.
| cfg | JSON configuration. |
Definition at line 109 of file NBinningPoint.h.
References fCfg.
Referenced by Ndmspc::NGnThreadData::Process(), and Ndmspc::NBinning::SetCfg().
|
inline |
Set entry number for the point.
| entry | Entry number. |
Definition at line 221 of file NBinningPoint.h.
References fEntryNumber.
Referenced by Ndmspc::NStorageTree::Fill().
|
inline |
Set input NGnTree object pointer.
| input | Pointer to NGnTree. |
Definition at line 215 of file NBinningPoint.h.
References fInput.
Referenced by Ndmspc::NGnThreadData::Process().
|
inline |
Set the parameters for this binning point.
Assigns the provided NParameters object to this binning point.
| params | Pointer to the NParameters object to associate. |
Definition at line 236 of file NBinningPoint.h.
References fParameters.
Referenced by Ndmspc::NGnThreadData::Init().
| bool Ndmspc::NBinningPoint::SetPointContentFromLinearIndex | ( | Long64_t | linBin, |
| bool | checkBinningDef = false |
||
| ) |
Set point content from linear index.
| linBin | Linear bin index. |
| checkBinningDef | Check binning definition. |
Set point content coordinates from linear index
Definition at line 251 of file NBinningPoint.cxx.
References fBinning, fContentCoords, Ndmspc::NBinning::GetContent(), and RecalculateStorageCoords().
Referenced by Ndmspc::NStorageTree::GetEntry(), and Ndmspc::NBinningDef::RefreshContentFromIds().
|
inline |
Set a temporary object with the given name.
| name | The name to associate with the object. |
| obj | Pointer to the object to store. |
Definition at line 261 of file NBinningPoint.h.
References fTempObjects.
Referenced by Ndmspc::NGnTree::Import(), and Ndmspc::NGnTree::NGnTree().
|
inline |
Set storage tree object pointer.
| s | Pointer to NStorageTree. |
Definition at line 203 of file NBinningPoint.h.
References fTreeStorage.
Referenced by Ndmspc::NGnThreadData::Init(), Ndmspc::NGnTree::NGnTree(), and Ndmspc::NGnThreadData::Process().