# Use parameters in GetUserInfo()

**URL:** <https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161>\
**Category:** Newbie\
**Created:** [January 4, 2019, 7:52am UTC](https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161 "2019-01-04T07:52:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvhviet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/nvhviet/32/23224_2.png) [@nvhviet](https://root-forum.cern.ch/u/nvhviet)\
**Post date:** [January 4, 2019, 7:52am UTC](https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161/1 "2019-01-04T07:52:18Z")

</div>

I search for a way to store some parameters together with tree in root file and some people suggest using GetUserInfo().

Now I can print out the parameters:

```auto
root [15] tree->GetUserInfo()->Print()
Collection name='UserInfo', class='TList', size=2
  TParameter<int> FGateL = 900
  TParameter<int> GateStep = 20

```

but don’t know how to take out these values to use as int variables.

//update  
I find the solution. I need to typecast to TParameter  
I update here if someone has similar problem.

```auto
root [3] TParameter<int> *par = (TParameter<int>*)tree->GetUserInfo()->At(0)
(TParameter<int> *) 0x7fffdba4e8b0
root [4] par->GetVal()
(const int) 900

```

Cheer,  
Viet

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [January 5, 2019, 8:19pm UTC](https://root-forum.cern.ch/t/use-parameters-in-getuserinfo/32161/2 "2019-01-05T20:19:03Z")

</div>

Indeed - apologies for the slow reply, it was Christmas / New Year’s time!
