# What type should I use for long items in SetBranchAddress？

**URL:** <https://root-forum.cern.ch/t/what-type-should-i-use-for-long-items-in-setbranchaddress/51973>\
**Category:** Newbie\
**Created:** [October 15, 2022, 2:02am UTC](https://root-forum.cern.ch/t/what-type-should-i-use-for-long-items-in-setbranchaddress/51973 "2022-10-15T02:02:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dyson](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dyson/32/30894_2.png) [@Dyson](https://root-forum.cern.ch/u/Dyson)\
**Post date:** [October 15, 2022, 2:02am UTC](https://root-forum.cern.ch/t/what-type-should-i-use-for-long-items-in-setbranchaddress/51973/1 "2022-10-15T02:02:45Z")

</div>

In my algorithm I define these two branches using

NTuple::Item m\_runNo11;  
NTuple::Item m\_evtNo11;

Right now, I want to use SetBranchAddress to read out the data in the root file, then what type of variable should I use?

Int\_t runNo11,evtNo11;  
ExcluRealdata-\>SetBranchAddress(“runNo11”,&runNo11);ExcluRealdata-\>SetBranchAddress(“evtNo11”,&evtNo11);

Thank you very much ：）

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [October 15, 2022, 4:04am UTC](https://root-forum.cern.ch/t/what-type-should-i-use-for-long-items-in-setbranchaddress/51973/2 "2022-10-15T04:04:48Z")

</div>

Use the same types that you used to create the branches.  
Try (it should return the list of branches and their types): `ExcluRealdata->Print();`

---

<div class="post-metadata">

**Author:** ![Dyson](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dyson/32/30894_2.png) [@Dyson](https://root-forum.cern.ch/u/Dyson)\
**Post date:** [October 15, 2022, 4:45am UTC](https://root-forum.cern.ch/t/what-type-should-i-use-for-long-items-in-setbranchaddress/51973/3 "2022-10-15T04:45:20Z")

</div>

Thank you very much. The problem seems to come from the version of the ROOT. I changed the version from root5 to root6.24 then everything is fine…
