test
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.
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(), 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::typeNameFor(std::type_info const& iType) {
29  int status = 0;
30  const char * demangled = abi::__cxa_demangle(iType.name(), 0, 0, &status);
31  return std::string(status == 0 ? demangled : "[UNKNOWN]");
32 }
type
Definition: HCALResponse.h:21
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 &)
tuple status
Definition: ntuplemaker.py:245
static void checkDictionaries(const std::type_info &type)
Definition: UserData.cc:7