6 #include "tbb/concurrent_unordered_map.h" 25 std::string typeToClassName(std::type_info
const& iType) {
30 theError <<
"TypeID::typeToClassName: can't demangle " << iType.name() <<
'\n';
38 tbb::tbb_hash<std::string> hasher;
44 typedef tbb::concurrent_unordered_map<edm::TypeID, std::string, TypeIDHasher> Map;
45 static Map s_typeToName;
47 auto itFound = s_typeToName.find(*
this);
48 if (s_typeToName.end() == itFound) {
51 return itFound->second;
56 if (theName.find(
"edm::Wrapper") == 0) {
66 char const space =
' ';
68 if (idx == std::string::npos) {
73 if (theName[idx] ==
'<') {
74 after = theName.rfind(
'>');
75 assert(after != std::string::npos);
78 theName = theName.substr(0, idx);
81 while (space == theName[--idxa])
84 while (space == theName[idxf++])
86 theName = theName.substr(first, after - first);
93 if (colonIndex == std::string::npos) {
98 if (bracketIndex == std::string::npos || bracketIndex < colonIndex) {
100 return theName.substr(colonIndex + 1);
105 char c = theName[
index - 1];
108 }
else if (c ==
'<') {
111 }
else if (depth == 0 && c ==
':') {
112 return theName.substr(
index);
void print(std::ostream &os) const
void append(Exception const &another)
const std::type_info & typeInfo() const
size_t operator()(TypeID const &tid) const
Container::value_type value_type
std::string friendlyName(std::string const &iFullName)
std::string userClassName() const
std::string typeDemangle(char const *mangledName)
std::string stripNamespace(std::string const &theName)
std::string const & className() const
T first(std::pair< T, U > const &p)
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
bool stripTemplate(std::string &theName)
const char * name() const
std::string friendlyClassName() const