Dear experts, I have a python script that is attempting to create Data cards from a hadded root file, but when I attempt to access SetDirectory for the root file, my error occurs. My code portion that is relevant is:
self._outFile = ROOT.TFile.Open(outputDirDatacard + "/" + cutName + "/" + variableName + "/shapes/histos_" + tagNameToAppearInDatacard + ".root", 'recreate')
[...]
histoUp.SetDirectory(self._outFile)
histoDown.SetDirectory(self._outFile)
And, when I open my input hadded root file, I see:
TFile** rootFile/plots_ggH2018_v7_11_11.root
TFile* rootFile/plots_ggH2018_v7_11_11.root
KEY: TDirectoryFile test;1 test
I suspect I’m trying to point it to the wrong thing. Any suggestions would be really appreciated! I am using ROOT 6.14/09 within the LXPlus cluster.