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

◆ classNameFinder()

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

Definition at line 9 of file classNameFinder.h.

References fileCollector2::fName, Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

9  {
10  int status2 = 0;
11  char *dm2 = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, &status2);
12  std::string s2 = "failed demangle";
13  if (status2 == 0) {
14  s2 = std::string(dm2);
15  }
16  return (fName + std::string("< ") + s2 + std::string(" >"));
17 }
long double T

◆ templateNameFinder()

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

Definition at line 20 of file classNameFinder.h.

References Skims_PA_cff::name, and AlCaHLTBitMon_QueryRunRegistry::string.

20  {
21  int status2 = 0;
22  char *dm2 = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, &status2);
23  std::string s2 = "failed demangle";
24  if (status2 == 0) {
25  s2 = std::string(dm2);
26  }
27  return s2;
28 }
long double T