Skip to content

Cannot open file due to "Unrecognized Content object nodetype" #274

@ammitra

Description

@ammitra

Software environment

Working on FNAL LPC cluster:

Linux cmslpc244.fnal.gov 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64 x86_64 x86_64 GNU/Linux

Inside CMSSW release CMSSW_12_3_5, with SCRAM_ARCH=el8_amd64_gcc10. Using correctionlib v2.1.0 from CVMFS, under

/cvmfs/cms.cern.ch/el8_amd64_gcc10/external/py3-correctionlib/2.1.0-bc1f1a24613552be911056d8eb959866/lib/python3.9/site-packages/correctionlib/include

Using ROOT v6.24/07

The problem

Dear developers,

I'm not very familiar with correctionlib so please correct me if I'm using the terminology incorrectly. I would like to use correctionlib to evaluate jet energy corrections and their uncertainty for Run 3 data and MC. However, I've noticed that certain files from the official jsonpog-integration repository can't be opened, even though they share the same schema as other files that my version of correctionlib has no problem opening.

For instance the following minimal reproducible example fails:

#include <correction.h>

void minimal() {
    // This file is successfully loaded
    std::cout << "Loading file 1...\n";
    std::unique_ptr<correction::CorrectionSet> cset_ak8 = correction::CorrectionSet::from_file("/cvmfs/cms.cern.ch/rsync/cms-nanoAOD/jsonpog-integration/POG/JME/2016postVFP_UL/fatJet_jerc.json.gz");
    std::cout << "Successfully loaded file 1\n";

    // This file fails to load
    std::cout << "Loading file 2...\n";
    std::unique_ptr<correction::CorrectionSet> cset_jersmear = correction::CorrectionSet::from_file("/cvmfs/cms.cern.ch/rsync/cms-nanoAOD/jsonpog-integration/POG/JME/jer_smear.json.gz");
    std::cout << "Successfully loaded file 2\n";
}

with the error:

[ammitra@cmslpc244 src]$ export ROOT_INCLUDE_PATH=$ROOT_INCLUDE_PATH:$(correction config --incdir)
[ammitra@cmslpc244 src]$ root -l minimal.cc 
root [0] 
Processing minimal.cc...
Loading file 1...
Successfully loaded file 1
Loading file 2...
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unrecognized Content object nodetype

If I comment out the second CorrectionSet, the script runs without issue. I was wondering if this was a jsonpog-integration problem rather than a correctionlib problem, but it seems like the two files both contain nodetype objects with the same contents and both files share the same schema ("schema_version":2), which leads me to believe this error is due to something in correctionlib.

Do you know what might cause this error? Thanks a lot in advance!

Best,
Amitav

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions