Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //We'll try to find global enum existing in ROOT...
- Long_t l=0;
- Int_t *value;
- TGlobal *enumval = gROOT->GetGlobal(ptr1,kTRUE);
- if (enumval){
- value = (Int_t*)(enumval->GetAddress());
- l = (Long_t)(*value);
- } else if (IsEnum()) {
- TObject *obj = fClass->GetListOfDataMembers(false)->FindObject(ptr1);
- if (obj)
- l = ((TEnumConstant*)obj)->GetValue();
- else
- l = gInterpreter->Calc(Form("%s;",ptr1));
- } else
- l = atol(ptr1);
- it1 = new TOptionListItem(this,l,0,0,ptr3,ptr1);
- fOptions->Add(it1);
Add Comment
Please, Sign In to add comment