36 while ((key = (
TKey*)nextkey())) {
67 void CopyFile(
const char *fname) {
72 printf(
"Cannot copy file: %s\n",fname);
89 TFile *f =
new TFile(
"result.root",
"recreate");
90 CopyFile(
"tot100.root");
91 CopyFile(
"hsimple.root");
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual TList * GetListOfKeys() const
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual const char * GetClassName() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * FindObject(const char *name) const
Find object by name in the list of memory objects.
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
R__EXTERN TSystem * gSystem
The ROOT global object gROOT contains a list of all defined classes.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void SaveSelf(Bool_t=kFALSE)
Describe directory structure in memory.
Mother of all ROOT objects.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void ls(Option_t *option="") const
List Directory contents.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
A TTree object has a header with a name and a title.
const Bool_t kIterBackward
virtual void ls(Option_t *option="") const
List file contents.