MINT2
HyperBinningMemRes.h
Go to the documentation of this file.
1 
55 #ifndef HYPERBINNINGMEMRES_HH
56 #define HYPERBINNINGMEMRES_HH
57 
58 // HyperPlot includes
59 #include "Mint/MessageService.h"
60 #include "Mint/HyperPoint.h"
61 #include "Mint/HyperPointSet.h"
62 #include "Mint/HyperCuboid.h"
63 #include "Mint/HyperVolume.h"
64 #include "Mint/RootPlotter1D.h"
65 #include "Mint/RootPlotter2D.h"
66 #include "Mint/HyperName.h"
67 #include "Mint/HyperBinning.h"
68 
69 
70 // Root includes
71 #include "TRandom3.h"
72 #include "TH1D.h"
73 #include "TH2D.h"
74 #include "TMath.h"
75 
76 // std includes
77 #include <algorithm>
78 #include <sstream>
79 
81 
82  protected:
83 
84  std::vector< HyperVolume > _hyperVolumes;
90  std::vector< int > _primaryVolumeNumbers;
116  std::vector< std::vector<int> > _linkedHyperVolumes;
143  void setBranchAddresses (TTree* tree, int* binNumber, double* lowCorner, double* highCorner, std::vector<int>** linkedBins) const;
144 
145  void loadPrimaryVolumeNumbers(TFile* file);
146 
147  public:
148 
150 
151  virtual ~HyperBinningMemRes();
152 
153  //Functions we are required (or choose to) to implement (override) from HyperBinning
154 
155  virtual void reserveCapacity(int nElements);
156 
157 
158  virtual std::vector<int> getPrimaryVolumeNumbers() const;
159 
160  virtual void setDimension(int dim);
161 
162  virtual void addPrimaryVolumeNumber(int volumeNumber);
163  virtual bool addHyperVolume(const HyperVolume& hyperVolume, std::vector<int> linkedVolumes = std::vector<int>(0, 0));
164 
165  virtual int getNumHyperVolumes() const;
166  virtual HyperVolume getHyperVolume(int volumeNumber) const;
167  virtual std::vector<int> getLinkedHyperVolumes( int volumeNumber ) const;
168 
169  virtual int getNumPrimaryVolumes ( ) const;
170  virtual int getPrimaryVolumeNumber(int i) const;
171 
172 
173  //Functions we are required to implement from BinningBase that were not implemented in HyperBinning
174 
175  virtual void load(TString filename, TString option = "READ");
176 
177  virtual BinningBase* clone() const;
178 
179 
180 };
181 
182 
183 
184 #endif
185 
virtual TString filename() const
Definition: BinningBase.cpp:57
virtual void load(TString filename, TString option="READ")
virtual std::vector< int > getPrimaryVolumeNumbers() const
virtual int getNumPrimaryVolumes() const
virtual void reserveCapacity(int nElements)
std::vector< HyperVolume > _hyperVolumes
virtual BinningBase * clone() const
void loadPrimaryVolumeNumbers(TFile *file)
std::vector< std::vector< int > > _linkedHyperVolumes
virtual std::vector< int > getLinkedHyperVolumes(int volumeNumber) const
virtual int getPrimaryVolumeNumber(int i) const
virtual int getNumHyperVolumes() const
void setBranchAddresses(TTree *tree, int *binNumber, double *lowCorner, double *highCorner, std::vector< int > **linkedBins) const
std::vector< int > _primaryVolumeNumbers
virtual void setDimension(int dim)
virtual void addPrimaryVolumeNumber(int volumeNumber)
virtual HyperVolume getHyperVolume(int volumeNumber) const
virtual bool addHyperVolume(const HyperVolume &hyperVolume, std::vector< int > linkedVolumes=std::vector< int >(0, 0))
HyperBinningMemRes()
The only constructor.