6 #include "tbb/concurrent_unordered_map.h"
26 std::string typeToClassName(std::type_info
const& iType) {
31 theError <<
"TypeID::typeToClassName: can't demangle " << iType.name() <<
'\n';
39 tbb::tbb_hash<std::string> hasher;
47 typedef tbb::concurrent_unordered_map<edm::TypeID, std::string, TypeIDHasher> Map;
48 static Map s_typeToName;
50 auto itFound = s_typeToName.find(*
this);
51 if(s_typeToName.end() == itFound) {
54 return itFound->second;
60 if (theName.find(
"edm::Wrapper") == 0) {
74 char const space =
' ';
76 if (idx == std::string::npos) {
81 if (theName[idx] ==
'<') {
82 after = theName.rfind(
'>');
83 assert (after != std::string::npos);
86 theName = theName.substr(0, idx);
89 while (space == theName[--idxa]) --after;
91 while (space == theName[idxf++]) ++
first;
92 theName = theName.substr(first, after - first);
100 if(colonIndex == std::string::npos) {
105 if(bracketIndex == std::string::npos || bracketIndex < colonIndex) {
107 return theName.substr(colonIndex+1);
112 char c = theName[
index - 1];
115 }
else if(c ==
'<') {
118 }
else if(depth == 0 && c ==
':') {
119 return theName.substr(
index);
126 return !(*
this == nullTypeID);
void print(std::ostream &os) const
const std::type_info & typeInfo() const
size_t operator()(TypeID const &tid) const
std::string friendlyName(std::string const &iFullName)
Container::value_type value_type
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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