# Reading THashList from a TTree

**URL:** <https://root-forum.cern.ch/t/reading-thashlist-from-a-ttree/12115>\
**Category:** ROOT\
**Created:** [March 22, 2011, 6:45pm UTC](https://root-forum.cern.ch/t/reading-thashlist-from-a-ttree/12115 "2011-03-22T18:45:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [March 22, 2011, 9:16pm UTC](https://root-forum.cern.ch/t/reading-thashlist-from-a-ttree/12115/2 "2011-03-22T21:16:49Z")

</div>

Hi Steve,

Indeed the Streamer of TList (from which THashList derives) was missing a call to Clear to avoid the ‘adding’ behavior your noticed. This is fixed by revision 38559 of the trunk.

As a work-around, you will need to call Clear explicitly on the THashList object before the GetEntry.

Cheers,  
Philippe.

---

_[View the full topic](https://root-forum.cern.ch/t/reading-thashlist-from-a-ttree/12115)._
