CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UserData.cc
Go to the documentation of this file.
2 // Note: these two below are allowed in FWLite even if they come from FWCore
5 
6 void pat::UserData::checkDictionaries(const std::type_info &type) {
7  edm::TypeWithDict edmType(type);
8  if (!edmType.hasDictionary()) {
9  int status = 0;
10  char * demangled = abi::__cxa_demangle(type.name(), 0, 0, &status);
11  std::string typeName(status == 0 ? demangled : type.name());
12  if ((demangled != 0) && (status == 0)) free(demangled);
14  << " No REFLEX data dictionary found for the following class:\n\t"
15  << typeName
16  << "\n Most likely the dictionary was never generated,\n"
17  << " but it may be that it was generated in the wrong package.\n"
18  << " Please add (or move) the specification\n"
19  << "\t<class name=\"" << typeName << "\" />\n"
20  << " to the appropriate classes_def.xml file.\n"
21  << " If the class is a template instance, you may need\n"
22  << " to define a dummy variable of this type in classes.h.\n"
23  << " Also, if this class has any transient members,\n"
24  << " you need to specify them in classes_def.xml.\n";
25  } // check for dictionary
26 }
27 
28 std::string pat::UserData::demangleName(const char* iMangledName) {
29  int status = 0;
30  char * demangled = abi::__cxa_demangle(iMangledName, 0, 0, &status);
31  const std::string name(status == 0 ? demangled : "[UNKNOWN]");
32  if((status ==0) and (nullptr != demangled)) { free(demangled);}
33  return name;
34 }
bool hasDictionary() const
type
Definition: HCALResponse.h:21
static std::string demangleName(const char *iMangledName)
Definition: UserData.cc:28
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
tuple status
Definition: ntuplemaker.py:245
static void checkDictionaries(const std::type_info &type)
Definition: UserData.cc:6