12 #include "oneapi/tbb/concurrent_unordered_map.h" 25 namespace friendlyname {
29 static std::regex
const reColons(
"::");
30 static std::regex
const reComma(
",");
33 static std::regex
const reArray(
"\\[\\]");
34 static std::regex
const reUniquePtrDeleter(
"^std::unique_ptr< *(.*), *std::default_delete<\\1> *>");
35 static std::regex
const reUniquePtr(
"^std::unique_ptr");
45 static std::regex
const reWrapper(
"edm::Wrapper<(.*)>");
46 static std::regex
const reString(
"std::basic_string<char>");
47 static std::regex
const reString2(
"std::string");
48 static std::regex
const reString3(
"std::basic_string<char,std::char_traits<char> >");
50 static std::regex
const reCXX11(
"std::__cxx11::");
51 static std::regex
const reSorted(
"edm::SortedCollection<(.*), *edm::StrictWeakOrdering<\\1 *> >");
52 static std::regex
const reclangabi(
"std::__1::");
54 static std::regex
const reLongLong(
"Long64_t");
55 static std::regex
const reUnsigned(
"unsigned ");
56 static std::regex
const reLong(
"long ");
57 static std::regex
const reVector(
"std::vector");
59 "std::unordered_set< *(.*), *std::hash<\\1> *, *std::equal_to<\\1> *>");
61 "std::unordered_set< *(.*), *(.*) *, *std::equal_to<\\1> *>");
62 static std::regex
const reUnorderedSetHash(
"std::unordered_set< *(.*), *std::hash<\\1> *>");
65 "std::unordered_map< *(.*), *(.*), *std::hash<\\1> *, *std::equal_to<\\1> *>");
67 "std::unordered_map< *(.*), *(.*), *(.*) *, *std::equal_to<\\1> *>");
68 static std::regex
const reUnorderedMapHash(
"std::unordered_map< *(.*), *(.*), *std::hash<\\1> *>");
70 static std::regex
const reSharedPtr(
"std::shared_ptr");
71 static std::regex
const reAIKR(
72 ", *edm::helper::AssociationIdenticalKeyReference");
75 static std::regex
const reOwnVector(
"edm::OwnVector<(.*), *edm::ClonePolicy<\\1 *> >");
79 static std::regex
const reOneToOne(
"edm::AssociationMap< *edm::OneToOne<(.*?),(.*?), *u[a-z]*> >");
80 static std::regex
const reOneToMany(
"edm::AssociationMap< *edm::OneToMany<(.*?),(.*?), *u[a-z]*> >");
81 static std::regex
const reOneToValue(
"edm::AssociationMap< *edm::OneToValue<(.*?),(.*?), *u[a-z]*> >");
83 "edm::AssociationMap<edm::OneToManyWithQuality<(.*?), *(.*?), *(.*?), *u[a-z]*> >");
84 static std::regex
const reToVector(
"edm::AssociationVector<(.*), *(.*), *edm::Ref.*,.*>");
86 static std::regex
const reToRangeMap(
"edm::RangeMap< *(.*), *(.*), *edm::ClonePolicy<([^>]*)> >");
89 "edm::RefVector< *(.*)< *(.*) *>, *\\2 *, *edm::refhelper::FindUsingAdvance< *\\1< *\\2 *> *, *\\2 *> *>");
91 "edm::RefVector< *(.*) *, *(.*) *, *edm::refhelper::FindUsingAdvance< *\\1, *\\2 *> *>");
93 "edm::RefVector< *Association(.*) *, *edm::helper(.*), *Association(.*)::Find>");
97 static std::regex
const reAlpakaDevCudaRt(
"alpaka::DevUniformCudaHipRt<alpaka::ApiCudaRt>");
98 static std::regex
const reAlpakaDevHipRt(
"alpaka::DevUniformCudaHipRt<alpaka::ApiHipRt>");
100 "alpaka::QueueGenericThreadsBlocking<alpaka::DevCpu>");
102 "alpaka::QueueGenericThreadsNonBlocking<alpaka::DevCpu>");
104 "alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiCudaRt,true>");
106 "alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiCudaRt,false>");
108 "alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt,true>");
110 "alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt,false>");
114 using std::regex_replace;
167 if (std::string_view{
result}.substr(0, 5) ==
"const") {
168 leadingConst =
"const";
173 std::cout <<
prefix <<
"subFriendlyName iFullName " << iFullName <<
" result " <<
result << std::endl;
180 result2 = regex_replace(
result,
reUniquePtr,
"UniquePtr", std::regex_constants::format_first_only);
191 result2 = regex_replace(
198 result2 = regex_replace(
result,
reUnorderedSet,
"stduset", std::regex_constants::format_first_only);
204 auto result2 = regex_replace(
207 result2 = regex_replace(
215 result2 = regex_replace(
result,
reUnorderedMap,
"stdumap", std::regex_constants::format_first_only);
231 std::cout <<
prefix <<
" aMatch " << aMatch <<
" theSub " << theSub << std::endl;
233 regex
const eMatch(
std::string(
"(^[^<]*)<") + aMatch +
">");
243 std::cout <<
prefix <<
"handleTemplateArguments " << iIn <<
" removeExtraSpaces " <<
result << std::endl;
251 result2.reserve(iIn.size());
252 unsigned int openTemplate = 0;
253 bool hadTemplate =
false;
255 for (
size_t i = 0, size =
result.size();
i < size; ++
i) {
270 if (
const bool hasComma =
result[
i] ==
',', hasColon = hadTemplate and
result[
i] ==
':';
271 openTemplate == 0 and (hasComma
or hasColon)) {
274 std::cout <<
prefix <<
" templateClass " << templateClass << std::endl;
284 std::cout <<
prefix <<
" friendlierName " << friendlierName << std::endl;
286 result2 += friendlierName;
288 result2 += templateClass;
312 std::cout <<
"\nfriendlyName for " << iFullName << std::endl;
315 typedef oneapi::tbb::concurrent_unordered_map<std::string, std::string> Map;
316 static Map s_fillToFriendlyName;
317 auto itFound = s_fillToFriendlyName.find(iFullName);
318 if (s_fillToFriendlyName.end() == itFound) {
319 itFound = s_fillToFriendlyName
324 std::cout <<
"result " << itFound->second << std::endl;
326 return itFound->second;
static std::regex const reAlpakaQueueCudaRtNonBlocking("alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiCudaRt,false>")
static std::regex const reEndSpace(" +$")
static std::regex const reToRangeMap("edm::RangeMap< *(.*), *(.*), *edm::ClonePolicy<([^>]*)> >")
static std::regex const reUnorderedMap("std::unordered_map")
static std::regex const reCXX11("std::__cxx11::")
static std::regex const reAlpakaQueueCpuNonBlocking("alpaka::QueueGenericThreadsNonBlocking<alpaka::DevCpu>")
static std::regex const reAIKR(", *edm::helper::AssociationIdenticalKeyReference")
static std::regex const rePointer("\")
static std::regex const reString3("std::basic_string<char,std::char_traits<char> >")
static std::regex const reUnsigned("unsigned ")
std::string removeAllSpaces(std::string const &iIn)
std::string subFriendlyName(std::string const &iFullName)
static std::regex const reSharedPtr("std::shared_ptr")
static std::regex const reUniquePtrDeleter("^std::unique_ptr< *(.*), *std::default_delete<> *>")
static std::regex const reOneToManyWithQuality("edm::AssociationMap<edm::OneToManyWithQuality<(.*?), *(.*?), *(.*?), *u[a-z]*> >")
static std::regex const reToVector("edm::AssociationVector<(.*), *(.*), *edm::Ref.*,.*>")
static std::regex const reLong("long ")
static std::regex const reAlpakaDevHipRt("alpaka::DevUniformCudaHipRt<alpaka::ApiHipRt>")
static std::regex const reOneToMany("edm::AssociationMap< *edm::OneToMany<(.*?),(.*?), *u[a-z]*> >")
static std::regex const reToRefs2("edm::RefVector< *(.*) *, *(.*) *, *edm::refhelper::FindUsingAdvance< *\, *\ *> *>")
static std::regex const reArray("\\")
static std::regex const reLongLong("Long64_t")
Container::value_type value_type
static std::regex const reComma(",")
static std::regex const reAlpakaQueueCpuBlocking("alpaka::QueueGenericThreadsBlocking<alpaka::DevCpu>")
std::string friendlyName(std::string const &iFullName)
static std::regex const reUnorderedSetHash("std::unordered_set< *(.*), *std::hash<> *>")
static std::regex const reToRefs1("edm::RefVector< *(.*)< *(.*) *>, *\ *, *edm::refhelper::FindUsingAdvance< *< *\ *> *, *\ *> *>")
static std::regex const reAlpakaDevCpu("alpaka::DevCpu")
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static std::regex const reUnorderedSetCustomHashKeyEqual("std::unordered_set< *(.*), *(.*) *, *std::equal_to<> *>")
static std::regex const reAlpakaQueueHipRtNonBlocking("alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt,false>")
static std::regex const reOneToOne("edm::AssociationMap< *edm::OneToOne<(.*?),(.*?), *u[a-z]*> >")
std::string handleNamespaces(std::string const &iIn)
static std::regex const reWrapper("edm::Wrapper<(.*)>")
static std::regex const reUnorderedMapHashKeyEqual("std::unordered_map< *(.*), *(.*), *std::hash<> *, *std::equal_to<> *>")
static std::regex const reAlpakaQueueCudaRtBlocking("alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiCudaRt,true>")
static std::regex const reUnorderedSet("std::unordered_set")
static std::regex const reSorted("edm::SortedCollection<(.*), *edm::StrictWeakOrdering<\ *> >")
static std::regex const reTemplateArgs("[^<]*<(.*)>$")
static std::regex const reAlpakaDevCudaRt("alpaka::DevUniformCudaHipRt<alpaka::ApiCudaRt>")
static std::regex const reToRefsAssoc("edm::RefVector< *Association(.*) *, *edm::helper(.*), *Association(.*)::Find>")
static std::regex const reULongLong("ULong64_t")
static std::regex const reVector("std::vector")
std::string standardRenames(std::string const &iIn)
static std::regex const reUnorderedSetHashKeyEqual("std::unordered_set< *(.*), *std::hash<> *, *std::equal_to<> *>")
static std::regex const reColons("::")
std::string handleTemplateArguments(std::string const &)
static std::regex const reAlpakaQueueHipRtBlocking("alpaka::uniform_cuda_hip::detail::QueueUniformCudaHipRt<alpaka::ApiHipRt,true>")
static std::string const emptyString("")
static std::regex const reBeginSpace("^ +")
static std::regex const reOwnVector("edm::OwnVector<(.*), *edm::ClonePolicy<\ *> >")
static std::regex const reUnorderedMapHash("std::unordered_map< *(.*), *(.*), *std::hash<> *>")
static std::regex const reUniquePtr("^std::unique_ptr")
static std::regex const reclangabi("std::__1::")
static std::regex const reUnorderedMapCustomHashKeyEqual("std::unordered_map< *(.*), *(.*), *(.*) *, *std::equal_to<> *>")
static std::regex const reString2("std::string")
static std::regex const reString("std::basic_string<char>")
static std::regex const reAllSpaces(" +")
static std::regex const reOneToValue("edm::AssociationMap< *edm::OneToValue<(.*?),(.*?), *u[a-z]*> >")
std::string removeExtraSpaces(std::string const &iIn)