# Root macro to retrieve and copy in a csv file the number of photo-electrons from a root file

**URL:** <https://root-forum.cern.ch/t/root-macro-to-retrieve-and-copy-in-a-csv-file-the-number-of-photo-electrons-from-a-root-file/57189>\
**Category:** Newbie\
**Tags:** root\
**Created:** [November 21, 2023, 11:09am UTC](https://root-forum.cern.ch/t/root-macro-to-retrieve-and-copy-in-a-csv-file-the-number-of-photo-electrons-from-a-root-file/57189 "2023-11-21T11:09:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [November 21, 2023, 4:58pm UTC](https://root-forum.cern.ch/t/root-macro-to-retrieve-and-copy-in-a-csv-file-the-number-of-photo-electrons-from-a-root-file/57189/4 "2023-11-21T16:58:19Z")

</div>

Check out this thread:

> [@Add a String Filter in Datafram](https://root-forum.cern.ch/t/add-a-string-filter-in-datafram/46200):
>
> ROOT Version: 6.24/02 Platform: Scientific Linux 7.3 (Nitrogen) Compiler: gcc 4.8.5(Red Hat 4.8.5-28) I am using RDataFrame to analyze some data in a root file, which involves the filtering of string data. i.e. auto Si = d.Filter("ParticleName == \"proton\"").Histo1D({"Si","Si",4000,0,400},"particleEnergy"); That is to filter out the energy of protons. However, there is a problem with the above filter statement, and the error is as follows: /opt/root62402/include/ROOT/RVec.hxx:609:23: er…

---

_[View the full topic](https://root-forum.cern.ch/t/root-macro-to-retrieve-and-copy-in-a-csv-file-the-number-of-photo-electrons-from-a-root-file/57189)._
