CMS 3D CMS Logo

Functions
classNameFinder.h File Reference
#include <string>
#include <typeinfo>
#include <cxxabi.h>

Go to the source code of this file.

Functions

template<class T >
std::string classNameFinder (std::string fName)
 
template<class T >
std::string templateNameFinder ()
 

Function Documentation

template<class T >
std::string classNameFinder ( std::string  fName)

Definition at line 9 of file classNameFinder.h.

References dataset::name, indexGen::s2, and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
long double T
template<class T >
std::string templateNameFinder ( )

Definition at line 22 of file classNameFinder.h.

References dataset::name, indexGen::s2, and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
long double T