Hi, I’m trying to delete a few histograms in my rootfile, to hadd it with another smaller rootfile with the correct histograms, this is what I do:
TFile *f = TFile::Open(“NTUP_PILEUP.pool.root.1”,“update”);
So it’s not complaining but it doesn’t delete the histograms.
I also tried:
TFile *f = TFile::Open("NTUP_PILEUP.pool.root.1", "update");
gDirectory->Delete("pileup_TH1;*"); // all "cycles"
It worked, thanks a lot!
Btw what are these cycles and why do we have to delete “f”?
delete f;” will “close” the opened file (and cleanup RAM).
Also the command line tool
rootrm might be of some help in that case (surely simpler)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.