20 TString dir =
"$ROOTSYS/test/Event.root";
23 {oldfile =
new TFile(
"$ROOTSYS/test/Event.root");}
24 else {oldfile =
new TFile(
"./Event.root");}
31 TFile *newfile =
new TFile(
"small.root",
"recreate");
36 if (event->GetNtrack() > 605) newtree->
Fill();
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
virtual Int_t Fill()
Fill all branches.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
R__EXTERN TSystem * gSystem
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.