# How to extract information event by event

**URL:** <https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716>\
**Category:** Newbie\
**Created:** [January 1, 2024, 8:17pm UTC](https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716 "2024-01-01T20:17:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamaanand](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/i/9d8465/32.png) [@iamaanand](https://root-forum.cern.ch/u/iamaanand)\
**Post date:** [January 1, 2024, 8:17pm UTC](https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716/1 "2024-01-01T20:17:33Z")

</div>

I have done some simulation with 10k events. I am storing the information by creating NTuple.  
Finally I am getting an overall spectrum where the number of entries are 213234.

For each individual event there is a similar kind of distribution of time with lesser no of entries. How to get the information for every event from this final histogram?

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [January 2, 2024, 8:48am UTC](https://root-forum.cern.ch/t/how-to-extract-information-event-by-event/57716/2 "2024-01-02T08:48:29Z")

</div>

Hello,

If I understand correctly, you want to create histograms of some quantities that are stored in a ntuple (a TTree I asume, concretely), right?

If yes, my suggestion would be to be to use [RDataFrame](https://root.cern/doc/master/classROOT_1_1RDataFrame.html). Quite some documentation is available at that page. Should there be any doubts, don’t hesitate to come back with specific questions.

Best,  
Danilo
