CMS 3D CMS Logo

classNameFinder.h
Go to the documentation of this file.
1 #ifndef classNameFinder_h
2 #define classNameFinder_h
3 
4 #include <string>
5 #include <typeinfo>
6 #include <cxxabi.h>
7 
8 template< class T >
10 {
11  int status2 = 0;
12  char *dm2 = abi::__cxa_demangle( typeid(T).name(), nullptr, nullptr, &status2 );
13  std::string s2 = "failed demangle";
14  if ( status2 == 0 )
15  {
16  s2 = std::string(dm2);
17  }
18  return ( fName+std::string("< ") + s2 + std::string(" >") );
19 }
20 
21 template< class T >
23 {
24  int status2 = 0;
25  char *dm2 = abi::__cxa_demangle( typeid(T).name(), nullptr, nullptr, &status2 );
26  std::string s2 = "failed demangle";
27  if ( status2 == 0 )
28  {
29  s2 = std::string(dm2);
30  }
31  return s2;
32 }
33 
34 #endif
35 
std::string templateNameFinder()
std::string classNameFinder(std::string fName)
long double T