CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClassID.cc
Go to the documentation of this file.
3 #include <typeinfo>
4 #include "cxxabi.h"
5 
6 namespace cond {
7 
8  char const * className(const std::type_info& t) {
9  int status=0;
10  return __cxxabiv1::__cxa_demangle(t.name(), 0, 0, &status);
11  }
12 
13 // namespace {
14 // std::string id(const std::type_info& t) {
15 // const Reflex::Type type=Reflex::Type::ByTypeInfo(t);
16 // std::string s;
17 // if (type) {
18 // Reflex::PropertyList pl = type.Properties();
19 // if ( pl.HasProperty("ClassID") ) {
20 // s = pl.PropertyAsString("ClassID");
21 // }
22 // else {
23 // char buff[20];
24 // genMD5(type.Name(Reflex::SCOPED),buff);
25 // Guid* gd = reinterpret_cast<Guid*>(buff);
26 // s = gd->toString();
27 // }
28 // }
29 // else {
30 // // only for test
31 // std::string name = className(t);
32 // char buff[20];
33 // genMD5(name,buff);
34 // Guid* gd = reinterpret_cast<Guid*>(buff);
35 // s = gd->toString();
36 // }
37 // return s;
38 // }
39 // }
40 
41 
57  std::string ClassInfo::pluginName(std::string const & prefix) const {
58  return prefix + "/" +className(tinfo);
59  //return prefix + "/" +id(tinfo);
60  }
61 
62 }
63 
const std::type_info & tinfo
Definition: ClassID.h:29
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
std::string pluginName(std::string const &prefix) const
Definition: ClassID.cc:57
char const * className(const std::type_info &t)
Definition: ClassID.cc:8
tuple status
Definition: ntuplemaker.py:245