cms-nanoAOD/nanoAOD-tools

Postprocessor does not work in Root 6.22 (within CMSSW)

andreypz opened this issue · 0 comments

I'm trying to run the nano-tools code within CMSSW_11_3_0_pre6 (which has ROOT 6.22) and it's failing with a ROOT error.
More specifically, I run the example command from the readme:

python scripts/nano_postproc.py outDir ~/work/NanoV7.root -I PhysicsTools.NanoAODTools.postprocessing.examples.exampleModule exampleModuleConstr

and I get this error:

Traceback (most recent call last):
  File "scripts/nano_postproc.py", line 94, in <module>
    p.run()
  File "/nfs/dust/cms/user/andreypz/vhcc-nano/May2021_test/CMSSW_11_3_0_pre6/python/PhysicsTools/NanoAODTools/postprocessing/framework/postprocessor.py", line 196, in run
    inTree = InputTree(inTree, elist)
  File "/nfs/dust/cms/user/andreypz/vhcc-nano/May2021_test/CMSSW_11_3_0_pre6/python/PhysicsTools/NanoAODTools/postprocessing/framework/treeReaderArrayTools.py", line 12, in InputTree
    tree._ttreereader = ROOT.TTreeReader(tree, tree._entrylist)
TypeError: none of the 5 overloaded methods succeeded. Full details:
  TTreeReader::TTreeReader(TTree* tree, TEntryList* entryList = nullptr) =>
    TypeError: could not convert argument 2
  TTreeReader::TTreeReader(const char* keyname, TDirectory* dir, TEntryList* entryList = nullptr) =>
    TypeError: could not convert argument 1 (expected string or Unicode object, TTree found)
  TTreeReader::TTreeReader(const TTreeReader&) =>
    TypeError: takes at most 1 arguments (2 given)
  TTreeReader::TTreeReader() =>
    TypeError: takes at most 0 arguments (2 given)
  TTreeReader::TTreeReader(const char* keyname, TEntryList* entryList = nullptr) =>
    TypeError: could not convert argument 1 (expected string or Unicode object, TTree found)

The same command works in earlier versions of CMSSW which uses ROOT 6.18