I am trying to write a TDirectory that I get from a TFile to a new TFile (basically want to split the file by directories while keeping the same structure, which seems not possible with rootcp.)
I’ve looked through the available methods in TDirectory and TFile and cannot seem to find a way to do this. Please see a sample snippet where you can see what I am trying to do:
inFileName = directoryPath + filename inputFile = ROOT.TFile(inFileName) outdir = inputFile.get(region) outfileName = directoryPath + region + "_" + filename outputFile = ROOT.TFile(outfileName)
where region is the directory name. Following this, I would like to know if there is some sort of append-type function such that I can do:
Is this possible some how?
_ROOT Version: 6.22
Platform: Not Provided
Compiler: Not Provided