17 TFile *oldfile =
new TFile(
"$ROOTSYS/test/Event.root");
24 TFile *newfile =
new TFile(
"small.root",
"recreate");
29 if (event->GetNtrack() > 605) newtree->
Fill();
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 void Print(Option_t *option="") const
Print a summary of the tree contents.
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 Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.