Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/roofit/roofitcore/src/RooCintUtils.cxx b/roofit/roofitcore/src/RooCintUtils.cxx
index 314aabfbec..829654dc2e 100644
--- a/roofit/roofitcore/src/RooCintUtils.cxx
+++ b/roofit/roofitcore/src/RooCintUtils.cxx
@@ -25,6 +25,7 @@
#include "RooMsgService.h"
#include "TInterpreter.h"
+#include "TEnum.h"
#include <string.h>
#include <string>
@@ -116,25 +117,7 @@ namespace RooCintUtils
strlcpy(buf,typeName,256) ;
char* className = strtok(buf,":") ;
- // Chop any class name prefix from value
- if (strrchr(value,':')) {
- value = strrchr(value,':')+1 ;
- }
-
- ClassInfo_t* cls = gInterpreter->ClassInfo_Factory(className);
- DataMemberInfo_t* dm = gInterpreter->DataMemberInfo_Factory(cls);
-
- Bool_t res;
-
- if (string(value)==gInterpreter->DataMemberInfo_Name(dm))
- res = kTRUE;
- else
- res = kFALSE;
-
- gInterpreter->DataMemberInfo_Delete(dm);
- gInterpreter->ClassInfo_Delete(cls);
-
- return res;
+ return (TEnum::GetEnum(className) == TEnum::GetEnum(value));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment