-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Check duplicate issues.
- Checked for duplicates
Description
Somewhat connected to #18402 (comment) I found that the type edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,std::vector<reco::CaloCluster>,std::vector<ticl::Trackster> > >
that CMS specifies in the classes_def.xml
is not found with TClass::GetClass()
.
Debugging with @pcanal we found the cause to be that the .rootmap
file contains "not quite normalized name". The classes_def.xml
has an entry
<class name="edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction, std::vector<reco::CaloCluster>, std::vector<ticl::Trackster> > >"/>
The corresponding .rootmap
file has
class edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,std::vector<reco::CaloCluster>,std::vector<ticl::Trackster> > >
Stepping through the TClass::GetClass()
in a debugger revealed that a normalized name (cls2
in the reproducer below) is created in
Line 3079 in 495a50c
TClassEdit::GetNormalizedName(normalizedName, name); |
and then passed to the library loading through
Line 3127 in 495a50c
if (gInterpreter->AutoLoad(normalizedName.c_str(),kTRUE)) { |
root/core/metacling/src/TCling.cxx
Line 6385 in 495a50c
return DeepAutoLoadImpl(cls, visited, false /*normalized*/); |
root/core/metacling/src/TCling.cxx
Line 6273 in 495a50c
if (ShallowAutoLoadImpl(cls) == 0) { |
root/core/metacling/src/TCling.cxx
Line 6220 in 495a50c
TString deplibs = gCling->GetClassSharedLibs(cls); |
root/core/metacling/src/TCling.cxx
Line 7197 in 495a50c
libs_record = fMapfile->Lookup(cls); |
that returned
nullptr
(as shown in the reproducer below) leading to the TClass::GetClass()
returning nullptr
.
Reproducer
E.g. in a recent CMSSW IB or 15_1_X prerelease via root
prompt
root [0] auto const cls = "edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,std::vector<reco::CaloCluster>,std::vector<ticl::Trackster> > >"
(const char *) "edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,std::vector<reco::CaloCluster>,std::vector<ticl::Trackster> > >"
root [1] auto const cls2 = "edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,vector<reco::CaloCluster>,vector<ticl::Trackster> > >"
(const char *) "edm::Wrapper<ticl::AssociationMap<ticl::mapWithFraction,vector<reco::CaloCluster>,vector<ticl::Trackster> > >"
root [2] TClass::GetClass(cls)
(TClass *) nullptr
root [3] TClass::GetClass(cls2)
(TClass *) nullptr
root [4] gInterpreter->GetMapfile()->Lookup(cls)
(TEnvRec *) 0x39a1e00
root [5] gInterpreter->GetMapfile()->Lookup(cls2)
(TEnvRec *) nullptr
In above the cls
has the std::
in the type names (as in classes_def.xml
), and cls2
has not.
ROOT version
First observed in ROOT commit a9a81f1 with #18402 merged on top. Occurs also in 6.32.13 (and possibly elsewhere).
Installation method
Built from source by CMS
Operating system
Linux Alma8
Additional context
No response