CMS 3D CMS Logo

UserData.cc
Go to the documentation of this file.
1 #include <cxxabi.h>
3 // Note: these two below are allowed in FWLite even if they come from FWCore
6 
7 void pat::UserData::checkDictionaries(const std::type_info& type) {
8  if (!edm::hasDictionary(type)) {
9  int status = 0;
10  char* demangled = abi::__cxa_demangle(type.name(), nullptr, nullptr, &status);
11  std::string typeName(status == 0 ? demangled : type.name());
12  if ((demangled != nullptr) && (status == 0))
13  free(demangled);
15  << " No REFLEX data dictionary found for the following class:\n\t" << 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::typeNameFor(std::type_info const& iType) {
29  int status = 0;
30  const char* demangled = abi::__cxa_demangle(iType.name(), nullptr, nullptr, &status);
31  return std::string(status == 0 ? demangled : "[UNKNOWN]");
32 }
void free(void *ptr) noexcept
demangled
Definition: symbols.py:70
static std::string typeNameFor(std::type_info const &iInfo)
Definition: UserData.cc:28
virtual const std::string & typeName() const =0
Human readable name of the concrete type of stored data.
bool hasDictionary(std::type_info const &)
static void checkDictionaries(const std::type_info &type)
Definition: UserData.cc:7