Skip to content

Instantly share code, notes, and snippets.

@yamaguchi1024
Created March 9, 2018 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamaguchi1024/91d0605d7e2c730538101ececd427848 to your computer and use it in GitHub Desktop.
Save yamaguchi1024/91d0605d7e2c730538101ececd427848 to your computer and use it in GitHub Desktop.
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