For each input file, a new directory is created in the current directory with the name of the source file. After the execution of:
the file result.root will contain 4 subdirectories: "tot100.root", "hsimple.root", "hs1.root","hs2.root"
while ((key = (
TKey*)nextkey())) {
if (!cl) continue;
CopyDir(subdir);
TTree *newT = T->CloneTree(-1,
"fast");
}
} else {
delete obj;
}
}
}
void CopyFile(const char *fname) {
if (!
f ||
f->IsZombie()) {
printf("Cannot copy file: %s\n",fname);
return;
}
}
void copyFiles() {
}
CopyFile("tot100.root");
CopyFile("hsimple.root");
CopyFile("hs1.root");
CopyFile("hs2.root");
}
const Bool_t kIterBackward
R__EXTERN TSystem * gSystem
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Describe directory structure in memory.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void ls(Option_t *option="") const override
List Directory contents.
TObject * FindObject(const char *name) const override
Find object by name in the list of memory objects.
virtual void SaveSelf(Bool_t=kFALSE)
virtual TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE)
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual TList * GetListOfKeys() const
virtual Bool_t cd(const char *path=nullptr)
Change current directory to "this" directory.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual const char * GetClassName() const
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TTree represents a columnar dataset.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.