GoddamnIDontNeedAUse

Untitled

Jul 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. //We'll try to find global enum existing in ROOT...
  2. Long_t l=0;
  3. Int_t *value;
  4. TGlobal *enumval = gROOT->GetGlobal(ptr1,kTRUE);
  5. if (enumval){
  6. value = (Int_t*)(enumval->GetAddress());
  7. l = (Long_t)(*value);
  8. } else if (IsEnum()) {
  9. TObject *obj = fClass->GetListOfDataMembers(false)->FindObject(ptr1);
  10. if (obj)
  11. l = ((TEnumConstant*)obj)->GetValue();
  12. else
  13. l = gInterpreter->Calc(Form("%s;",ptr1));
  14. } else
  15. l = atol(ptr1);
  16.  
  17. it1 = new TOptionListItem(this,l,0,0,ptr3,ptr1);
  18. fOptions->Add(it1);
Add Comment
Please, Sign In to add comment