diff --git a/root/meta/naming/CMakeLists.txt b/root/meta/naming/CMakeLists.txt index 88d8058a7a..b1045cd9fc 100644 --- a/root/meta/naming/CMakeLists.txt +++ b/root/meta/naming/CMakeLists.txt @@ -4,3 +4,5 @@ ROOTTEST_ADD_AUTOMACROS(DEPENDS namingMatches.cxx ROOTTEST_ADD_TEST(execCheckNaming MACRO execCheckNaming.C OUTREF execCheckNaming${ref_suffix}) + +ROOTTEST_ADD_TESTDIRS() diff --git a/root/meta/naming/issue-18363/CMakeLists.txt b/root/meta/naming/issue-18363/CMakeLists.txt new file mode 100644 index 0000000000..55f3a804cd --- /dev/null +++ b/root/meta/naming/issue-18363/CMakeLists.txt @@ -0,0 +1,6 @@ +ROOTTEST_GENERATE_REFLEX_DICTIONARY(size_tTemplateDict Objects.h SELECTION selection.xml FIXTURES_SETUP size_tTemplate_lib) + +ROOTTEST_ADD_TEST(size_tTemplateName + MACRO size_tTemplateNameTest.C + OUTREF size_tTemplateNameTest.ref + FIXTURES_REQUIRED size_tTemplate_lib) diff --git a/root/meta/naming/issue-18363/Objects.h b/root/meta/naming/issue-18363/Objects.h new file mode 100644 index 0000000000..3099127c0d --- /dev/null +++ b/root/meta/naming/issue-18363/Objects.h @@ -0,0 +1,12 @@ +#ifndef Objects_18363_hxx +#define Objects_18363_hxx + +namespace reco { +template struct PFRecHitSoALayout { + template struct ViewTemplateFreeParams {}; + using View = ViewTemplateFreeParams; +}; +using PFRecHitSoA = PFRecHitSoALayout<128,false>; // The result is the same with 128UL or 128ul +} + +#endif diff --git a/root/meta/naming/issue-18363/selection.xml b/root/meta/naming/issue-18363/selection.xml new file mode 100644 index 0000000000..341ead3d72 --- /dev/null +++ b/root/meta/naming/issue-18363/selection.xml @@ -0,0 +1,4 @@ + + + + diff --git a/root/meta/naming/issue-18363/size_tTemplateNameTest.C b/root/meta/naming/issue-18363/size_tTemplateNameTest.C new file mode 100644 index 0000000000..b3e51e3ea2 --- /dev/null +++ b/root/meta/naming/issue-18363/size_tTemplateNameTest.C @@ -0,0 +1,26 @@ +{ + TFile pcmfile("size_tTemplateDict_rdict.pcm"); + if (pcmfile.IsZombie()) { + std::cerr << "Error: Failed to open root pcm file: " << pcmfile.GetName() << '\n'; + return 1; + } + TObjArray *protoArray = pcmfile.Get("__ProtoClasses"); + if (!protoArray) { + std::cerr << "Error: Failed to retrieve __ProtoClasses\n"; + return 2; + } + protoArray->Print(); + + const char *classname = "reco::PFRecHitSoALayout<128,false>::ViewTemplateFreeParams<128,false,true,true>"; + auto cl = TClass::GetClass(classname); + if (!cl) { + std::cerr << "Error: Could not get the TClass for " << classname << "\n"; + return 3; + } + if (!cl->IsLoaded()) { + std::cerr << "Error: The TClass is not loaded for " << classname << "\n"; + return 4; + } + + return 0; +} diff --git a/root/meta/naming/issue-18363/size_tTemplateNameTest.ref b/root/meta/naming/issue-18363/size_tTemplateNameTest.ref new file mode 100644 index 0000000000..96dfe47584 --- /dev/null +++ b/root/meta/naming/issue-18363/size_tTemplateNameTest.ref @@ -0,0 +1,5 @@ + +Processing /Users/pcanal/root_working/roottest/root/meta/naming/issue-18363/size_tTemplateNameTest.C... +Collection name='TObjArray', class='TObjArray', size=16 + OBJ: TProtoClass reco::PFRecHitSoALayout<128,false> + OBJ: TProtoClass reco::PFRecHitSoALayout<128,false>::ViewTemplateFreeParams<128,false,true,true>