44 void CreateFile(
const char *);
46 void mergeSelective(
Int_t nfiles=5)
53 if (
gROOT->LoadMacro(tutdir +
"/hsimple.C"))
return;
55 for (i=0; i<nfiles; i++) CreateFile(
Form(
"tomerge%03d.root",i));
64 for (i=0; i<nfiles; i++) fm->
AddFile(
Form(
"tomerge%03d.root",i));
76 for (i=0; i<nfiles; i++) fm->
AddFile(
Form(
"tomerge%03d.root",i));
93 void CreateFile(
const char *fname)
101 file->mkdir(
"folder")->cd();
106 if (sname.Contains(
"000")) {
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.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
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.
1-D histogram with a float per channel (see TH1 documentation)}
Only the objects specified in fObjectNames list.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual Bool_t Cp(const char *dst, Bool_t progressbar=kTRUE, UInt_t buffersize=1000000)
Allows to copy this file to the dst URL.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
Merge all type of objects (default)
void Stop()
Stop the stopwatch.
Skip objects specified in fObjectNames list.
Merge the input file with the content of the output file (if already exising).
void AddObjectNames(const char *name)
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
virtual Bool_t AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
Using a TBrowser one can browse all ROOT objects.
R__EXTERN TSystem * gSystem
This class provides file copy and merging services.
char * Form(const char *fmt,...)
virtual void SetName(const char *name)
Change the name of this histogram.
virtual Bool_t PartialMerge(Int_t type=kAll|kIncremental)
Merge the files.
virtual void Reset()
Reset merger file list.
virtual void Close(Option_t *option="")
Close a file.