MINT2
HyperBinningDiskRes.h
Go to the documentation of this file.
1 
55 #ifndef HYPERBINNINGDISKRES_HH
56 #define HYPERBINNINGDISKRES_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/BinningBase.h"
68 #include "Mint/HyperBinning.h"
69 
70 
71 // Root includes
72 #include "TRandom3.h"
73 #include "TH1D.h"
74 #include "TH2D.h"
75 #include "TMath.h"
76 
77 // std includes
78 #include <algorithm>
79 #include <sstream>
80 
82 
83  private:
84 
85  mutable TFile* _file;
86  bool _writeable;
87 
88  mutable TTree* _tree;
90  mutable std::vector<int>* _linkedBins;
91  mutable int _volumeNumber;
92  mutable int _currentEntry;
93 
94  mutable TTree* _treePrimVol;
95  mutable int _primVolNum;
96 
97 
98  protected:
99 
100  void getEntry(int volumeNumber) const;
101 
102  void loadHyperBinningTree ();
103  void loadPrimaryVolumeTree ();
104 
105  void createHyperBinningTree ();
106  void createPrimaryVolumeTree ();
107 
108  protected:
109 
110 
111  public:
112 
114 
116 
117 
118  virtual ~HyperBinningDiskRes();
119 
120  //Functions we are required to implement from HyperBinning
121 
122  virtual void reserveCapacity(int nElements);
123 
124  virtual void setDimension(int dim);
125 
126  virtual void addPrimaryVolumeNumber(int volumeNumber);
127  virtual bool addHyperVolume(const HyperVolume& hyperVolume, std::vector<int> linkedVolumes = std::vector<int>(0, 0));
128 
129  virtual int getNumHyperVolumes() const;
130  virtual HyperVolume getHyperVolume(int volumeNumber) const;
131  virtual std::vector<int> getLinkedHyperVolumes( int volumeNumber ) const;
132 
133  virtual int getNumPrimaryVolumes () const;
134  virtual int getPrimaryVolumeNumber(int i) const;
135 
136  //Functions we are required to implement from BinningBase that were not implemented in HyperBinning
137 
138  virtual bool isDiskResident() const;
139  virtual TString filename() const;
140 
141  virtual void load(TString filename, TString option = "READ");
142 
143  virtual BinningBase* clone() const;
144 
145 
146 };
147 
148 
149 
150 #endif
151 
virtual int getNumPrimaryVolumes() const
virtual void setDimension(int dim)
void getEntry(int volumeNumber) const
virtual void addPrimaryVolumeNumber(int volumeNumber)
virtual int getPrimaryVolumeNumber(int i) const
virtual std::vector< int > getLinkedHyperVolumes(int volumeNumber) const
virtual bool addHyperVolume(const HyperVolume &hyperVolume, std::vector< int > linkedVolumes=std::vector< int >(0, 0))
virtual void load(TString filename, TString option="READ")
virtual TString filename() const
virtual void reserveCapacity(int nElements)
virtual bool isDiskResident() const
virtual int getNumHyperVolumes() const
virtual HyperVolume getHyperVolume(int volumeNumber) const
Get a HyperVolume from its volume number.
std::vector< int > * _linkedBins
virtual BinningBase * clone() const
Create a clone of the object and return a pointer to it.