11 _linkedBins(new std::vector<int>()),
17 WELCOME_LOG <<
"Hello from the HyperBinningDiskRes() Constructor";
27 _linkedBins(new std::vector<int>()),
57 ERROR_LOG <<
"HyperBinningDiskRes::getEntry - tree doesn't exist" << std::endl;
62 _tree->GetEntry(volumeNumber);
93 ret->
load(filenm,
"READ");
107 ERROR_LOG <<
"HyperBinningDiskRes::addPrimaryVolumeNumber - Cannot write, you must have opened in READ mode" << std::endl;
111 ERROR_LOG <<
"HyperBinningDiskRes::addPrimaryVolumeNumber - Cannot find tree" << std::endl;
127 return _tree->GetEntries();
136 ERROR_LOG <<
"HyperBinningDiskRes::addHyperVolume - Cannot write, you must have opened in READ mode" << std::endl;
149 ERROR_LOG <<
"HyperBinningDiskRes::addHyperVolume - Cannot find tree" << std::endl;
154 for (
int i = 0; i < hyperVolume.
size(); i++){
178 ERROR_LOG <<
"HyperBinningDiskRes::getPrimaryVolumeNumber - No tree found" << std::endl;
187 _tree = dynamic_cast<TTree*>(
_file->Get(
"HyperBinning"));
190 ERROR_LOG <<
"Could not open TTree in HyperBinningDiskRes::load()";
201 TString lowCornerName =
"lowCorner_" ; lowCornerName += i;
202 TString highCornerName =
"highCorner_"; highCornerName += i;
220 ERROR_LOG <<
"HyperBinningDiskRes::loadPrimaryVolumeNumbers - could not open TTree";
231 _tree =
new TTree(
"HyperBinning",
"HyperBinning");
234 ERROR_LOG <<
"HyperBinningDiskRes::createHyperBinningTree - could not open TTree";
241 ERROR_LOG <<
"The dimesion has not yet been set, so I cannot createHyperBinningTree!!" << std::endl;
248 for (
int i = 0; i < dim; i++){
249 TString lowCornerName =
"lowCorner_" ; lowCornerName += i;
250 TString highCornerName =
"highCorner_"; highCornerName += i;
266 _treePrimVol =
new TTree(
"PrimaryVolumeNumbers",
"PrimaryVolumeNumbers");
269 ERROR_LOG <<
"HyperBinningDiskRes::createPrimaryVolumeTree - could not open TTree";
282 if (option ==
"UPDATE" || option ==
"RECREATE") {
291 ERROR_LOG <<
"Could not open TFile in HyperBinningDiskRes::load(" <<
filename <<
")";
295 if (option ==
"UPDATE" || option ==
"READ"){
299 else if (option ==
"RECREATE"){
306 ERROR_LOG <<
"There are only three load options (READ, RECREATE, UPDATE) - You have selected " << option << std::endl;
310 INFO_LOG <<
"Sucessfully attached Disk Resident HyperBinning to file " <<
filename << std::endl;
319 ERROR_LOG <<
"HyperBinningDiskRes::filename - there is no file associated to this object yet" << std::endl;
322 return _file->GetName();
335 GOODBYE_LOG <<
"Goodbye from the HyperBinningDiskRes() Constructor";
void loadPrimaryVolumeTree()
virtual int getNumPrimaryVolumes() const
int getHyperBinningDimFromTree(TTree *tree)
virtual void setDimension(int dim)
void createHyperBinningTree()
const HyperCuboid & at(int i) const
virtual void reserveCapacity(int nElements)
void getEntry(int volumeNumber) const
void createPrimaryVolumeTree()
virtual void addPrimaryVolumeNumber(int volumeNumber)
virtual void load(TString filename, TString option="READ")=0
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))
void loadHyperBinningTree()
const int & getDimension() const
const HyperPoint & getHighCorner() const
virtual void load(TString filename, TString option="READ")
const int & getDimension() const
const double & at(int i) const
virtual TString filename() const
virtual void reserveCapacity(int nElements)
const HyperPoint & getLowCorner() const
virtual bool isDiskResident() const
virtual int getNumHyperVolumes() const
virtual void setDimension(int dim)
virtual HyperVolume getHyperVolume(int volumeNumber) const
Get a HyperVolume from its volume number.
virtual ~HyperBinningDiskRes()
std::vector< int > * _linkedBins
virtual BinningBase * clone() const
Create a clone of the object and return a pointer to it.