Skip to content

Fix ROOT dictionary autoload header paths in views - #228

Open
jmcarcell wants to merge 3 commits into
masterfrom
fix-root-dict-autoload-header-paths
Open

jmcarcell wants to merge 3 commits into
masterfrom
fix-root-dict-autoload-header-paths

Conversation

@jmcarcell

@jmcarcell jmcarcell commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

LCIO's ROOT dictionaries currently record source-tree relative header paths such as include/IMPL/LCCollectionVec.h. Installed views expose <view>/include through ROOT_INCLUDE_PATH, so ROOT cannot resolve those
paths and import pyLCIO fails when the Python ownership decorators access LCCollectionVec::addElement.

Normalize dictionary header paths relative to ROOT_DICT_INCLUDE_DIRS before passing them to rootcint. Keep LinkDef defined_in pragmas and CMake dependencies on the original absolute paths, because rootcint uses them
to generate class registrations.

BEGINRELEASENOTES

  • Fix LCIO ROOT dictionary header paths so pyLCIO can autoload installed classes.

ENDRELEASENOTES

Issue uncovered by iLCSoft/LCIO#226. Importing pyLCIO in a view without include/IMPL in ROOT_INCLUDE_PATH fails:

...
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
   Missing FileEntry for include/UTIL/LCTime.h
   requested to autoload type UTIL::LCTime
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
   Missing FileEntry for include/UTIL/PIDHandler.h
   requested to autoload type UTIL::PIDHandler
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
   Missing FileEntry for include/UTIL/PIDHandler.h
   requested to autoload type UTIL::UnknownAlgorithm
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::LCEvent is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::LCEvent is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class lcrtrel::LCRTRelations is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class lcrtrel::LCRTRelations is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class lcrtrel::LCRTRelations is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::LCObject is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::LCObject is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::CalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::CalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::Cluster is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::Cluster is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::RawCalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::RawCalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::ReconstructedParticle is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::ReconstructedParticle is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::SimCalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::SimCalorimeterHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::SimTrackerHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::SimTrackerHit is available even though it has a TClass initialization routine.
Error in <TClass::LoadClassInfo>: no interpreter information for class EVENT::SimTrackerHit is available even though it has a TClass initialization routine.
input_line_44:2:10: error: incomplete type 'EVENT::SimTrackerHit' named in nested name specifier
 &EVENT::SimTrackerHit::BITOverlay;

@tmadlener tmadlener left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering whether we could solve at least some of these issues by not re-implementing half of the root dictionary generation here, but rather using the one that comes with ROOT now.

CI seems to have been happy before as well. Did we not catch this due to not testing the env / stack where this happens, or because we have no test for this at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants