Revision 5d3037c7f727c290629f70b382cdb650d8e23c3f authored by Rene Brun on 17 August 2002, 21:38:19 UTC, committed by Rene Brun on 17 August 2002, 21:38:19 UTC
New data member fFileNumber containing the current file number (default=0).
New static member Int_t fgMaxTreeSize (default value 1.9 Gbytes).
New functions ;
  Int_t  GetFileNumber()
  Int_t  GetmaxTreeSize()
  void  setMaxTreeSize(Int_t maxsize)

The automatic file overflow is called by TTree::Fill and implemented
in the new function ChangeFile:
TFile *TTree::ChangeFile(TFile *file)
{
  // called by TTree::Fill when file has reached its maximum fgMaxTreeSize.
  // Create a new file. If the original file is named "myfile.root",
  // subsequent files are named "myfile_1.root", "myfile_2.root", etc.
  //
  // Return pointer to new file
  // Currently, the automatic change of file is restricted
  // to the case where the Tree is in the top level directory.
  // The file should not contain sub-directories.
  //
  // Before switching to a new file, the Tree header is written
  // to the current file, then the current file is closed.
  //
  // To process the multiple files created by ChangeFile, one must use
  // a TChain.
  //
  // fgMaxTreeSize can be set via the static function TTree::SetMaxTreeSize.
  // The default value of fgMaxTreeSize is 1.9 Gigabytes.
  //
  // If the current file contains other objects like TH1 and TTree,
  // these objects are automatically moved to the new file.
  //
  // IMPORTANT NOTE:
  // Be careful when writing the final Tree header to the file!
  // Don't do:
  //  TFile *file = new TFile("myfile.root","recreate");
  //  TTree *T = new TTree("T","title");
  //  T->Fill(); //loop
  //  file->Write();
  //  file->Close();
  // but do the following:
  //  TFile *file = new TFile("myfile.root","recreate");
  //  TTree *T = new TTree("T","title");
  //  T->Fill(); //loop
  //  file = T->GetCurrentFile(); //to get the pointer to the current file
  //  file->Write();
  //  file->Close();


git-svn-id: http://root.cern.ch/svn/root/trunk@5143 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent a41dc49
History
File Mode Size
Roo2DKeysPdf.cxx -rw-r--r-- 18.5 KB
RooArgusBG.cxx -rw-r--r-- 2.9 KB
RooBCPEffDecay.cxx -rw-r--r-- 6.2 KB
RooBCPGenDecay.cxx -rw-r--r-- 5.7 KB
RooBMixDecay.cxx -rw-r--r-- 7.5 KB
RooBifurGauss.cxx -rw-r--r-- 2.5 KB
RooBlindTools.cxx -rw-r--r-- 9.3 KB
RooBreitWigner.cxx -rw-r--r-- 1.8 KB
RooCBShape.cxx -rw-r--r-- 1.8 KB
RooChebychev.cxx -rw-r--r-- 3.4 KB
RooDecay.cxx -rw-r--r-- 2.3 KB
RooDstD0BG.cxx -rw-r--r-- 3.4 KB
RooExponential.cxx -rw-r--r-- 2.2 KB
RooGExpModel.cxx -rw-r--r-- 12.4 KB
RooGaussModel.cxx -rw-r--r-- 14.0 KB
RooGaussian.cxx -rw-r--r-- 2.4 KB
RooKeysPdf.cxx -rw-r--r-- 5.9 KB
RooNonCPEigenDecay.cxx -rw-r--r-- 14.1 KB
RooNovosibirsk.cxx -rw-r--r-- 2.0 KB
RooPolynomial.cxx -rw-r--r-- 3.4 KB
RooUnblindCPAsymVar.cxx -rw-r--r-- 2.6 KB
RooUnblindOffset.cxx -rw-r--r-- 2.7 KB
RooUnblindPrecision.cxx -rw-r--r-- 2.9 KB
RooUnblindUniform.cxx -rw-r--r-- 1.6 KB
RooVoigtian.cxx -rw-r--r-- 2.8 KB

back to top