Check duplicate issues.
Description
As seen in cms-sw/cmssw#47470 in some circumstances calling TClass::GetClass may lead to an unnecessary/unwanted loading of the header files.
Reproducer
In the example, there is a lookup for vector<edm::Ref<vector<l1t::TkElectron>,l1t::TkElectron,edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > >
which, because it is a normalized class name lead to a code path where we do
- auloading the library needed for this class and it dependencies
- attempt to normalize the name and resolve potential typedefs
- check for the dictionary.
However in this case edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > is intentionally not known to core/meta/TClass and thus the name normalization must check if it is a typedef and this step triggers the (auto) parsing of the headers (for l1t::TkElectron).
This can be solved by executing between 1 and 2:
1a. check for dictionary with the name as is.
ROOT version
at least 6.32 up to master (probably more)
Installation method
any
Operating system
any
Additional context
No response
Check duplicate issues.
Description
As seen in cms-sw/cmssw#47470 in some circumstances calling
TClass::GetClassmay lead to an unnecessary/unwanted loading of the header files.Reproducer
In the example, there is a lookup for
vector<edm::Ref<vector<l1t::TkElectron>,l1t::TkElectron,edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > >which, because it is a normalized class name lead to a code path where we do
However in this case
edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> >is intentionally not known to core/meta/TClass and thus the name normalization must check if it is a typedef and this step triggers the (auto) parsing of the headers (forl1t::TkElectron).This can be solved by executing between 1 and 2:
1a. check for dictionary with the name as is.
ROOT version
at least 6.32 up to master (probably more)
Installation method
any
Operating system
any
Additional context
No response