CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/DataFormats/PatCandidates/src/UserData.cc

Go to the documentation of this file.
00001 #include "DataFormats/PatCandidates/interface/UserData.h"
00002 // Note: these two below are allowed in FWLite even if they come from FWCore
00003 #include <FWCore/Utilities/interface/TypeID.h>
00004 #include <FWCore/Utilities/interface/EDMException.h>
00005 
00006 void pat::UserData::checkDictionaries(const std::type_info &type) {
00007     edm::TypeID edmType(type);
00008     if (!edmType.hasDictionary()) {
00009         int status = 0;
00010         char * demangled = abi::__cxa_demangle(type.name(),  0, 0, &status);
00011         std::string typeName(status == 0 ? demangled : type.name());
00012         if ((demangled != 0) && (status == 0)) free(demangled);
00013         throw edm::Exception(edm::errors::DictionaryNotFound)
00014             << "   No REFLEX data dictionary found for the following class:\n\t"
00015             << typeName 
00016             << "\n   Most likely the dictionary was never generated,\n"
00017             << "   but it may be that it was generated in the wrong package.\n"
00018             << "   Please add (or move) the specification\n"
00019             << "\t<class name=\"" << typeName << "\" />\n"
00020             << "   to the appropriate classes_def.xml file.\n"
00021             << "   If the class is a template instance, you may need\n"
00022             << "   to define a dummy variable of this type in classes.h.\n"
00023             << "   Also, if this class has any transient members,\n"
00024             << "   you need to specify them in classes_def.xml.\n";
00025     } // check for dictionary
00026 }