ROOT Version: 6.20/06
Platform: Linux Server (ROOT through views LCG_97a:x86_64-centos7-gcc8-opt)
Compiler: Not Provided
Hi,
I’ve been running into an issue with writing objects to a new root file. For context, I have a Delphes .root file that I’m applying a macro to, and at the end of the macro I’ve included this block,
TFile*out = new TFile("WHSigBkg.root", "RECREATE");
hmjj -> Write();
hMET -> Write();
hMT -> Write();
out -> Write();
out -> Close();
where all pointers that aren’t “out” are referring to TH1F histograms. Upon loading this macro and executing its function, the new .root file is not immediately loaded, although it is created. If I try and load it manually, I get a long list of errors and warnings including
/users/alecp1/ROOTspace/WH/WHSigBkg.root:1:5: warning: null character ignored [-Wnull-character]
/users/alecp1/ROOTspace/WH/WHSigBkg.root:1:7: error: source file is not valid UTF-8
and
/users/alecp1/ROOTspace/WH/WHSigBkg.root:1:8: error: expected unqualified-id
triggering a fatal error (too many errors emitted). Interestingly enough, even a simple macro
void test()
{
TFile out("test.root", "RECREATE");
out.Write();
out.Close();
}
yields the same result.
I’m very new to using the ROOT framework and about as new to C++, so I entirely expect the issue to be on my end, but I’m not sure what the issue could be. Any thoughts?