Skip to content

Make ROOT's automatic class header parsing setting more fine grained. #13035

@makortel

Description

@makortel

Explain what you would like to see improved

In CMSSW we want to have dictionaries defined explicitly for all classes that are part of I/O. Occasionally some things slip through causing (sometimes?) ROOT to try to auto parse the header of the corresponding class. Many times the auto parsing works (but is not desirable), in some cases it fails with an unhelpful error message (in most cases so far this has been in conjunction with CUDA, by rootcling being unable to write to the cuda.pcm that is in cvmfs). With auto parsing disabled, we'd be able to emit an error message pointing to the class whose dictionary is missing.

I gave a try on TInterpreter::SetClassAutoparsing(false) in cms-sw/cmssw#41344, and while in specific cases I got the desired behavior (of CMSSW framework emitting a descriptive error message for a missing dictionary instead of ROOT trying to auto-parse the corresponding header), the fact that the SetClassAutoparsing() is a global setting makes it difficult to disable the auto parsing in a useful way in the concurrent setup of CMSSW. There are a few cases (like open ROOT file, set up a string cut parser that uses ROOT reflection underneath) where the auto-parsing needs to be enabled, and these activities may be running concurrently to activities where I'd like to have the auto-parsing disabled.

Share how it could be improved

Make the auto parsing setting more fine grained, e.g. explicitly in the relevant API calls or as a thread_local. Being able to query the value of the setting could be useful as well.

How to reproduce?

A recipe to reproduce can be cooked up if necessary based on cms-sw/cmssw#41344.

ROOT version

6.26

How did you install ROOT?

Part of CMSSW stack

Which operating system are you using?

Linux

Additional context

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions