# Write RDataFrame.Report to root file

**URL:** <https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623>\
**Category:** Newbie\
**Tags:** rdataframe\
**Created:** [September 28, 2020, 8:38am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623 "2020-09-28T08:38:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tancredi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tancredi/32/20395_2.png) [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Post date:** [September 28, 2020, 8:38am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623/1 "2020-09-28T08:38:31Z")

</div>

Hello,

I am using the report feature of RDataFrame

> **[ROOT: tutorials/dataframe/df004\_cutFlowReport.C File Reference](https://root.cern.ch/doc/master/df004__cutFlowReport_8C.html)**

Is it possible to write the cut-flow to a Rootfile or even better merge via hadd ?

Regards,  
Tancredi

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [September 28, 2020, 8:41am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623/2 "2020-09-28T08:41:36Z")

</div>

@eguiraud is the data frame expert. I am sure he can help you.

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [September 28, 2020, 9:15am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623/3 "2020-09-28T09:15:44Z")

</div>

Hi,  
about writing RCutFlowReports to file: you can write any C++ object to a ROOT file as long as you have dictionaries for it. We currently do not provide dictionaries for RCutFlowReport, but you can create them manually. Reading/writing RCutFlowReports without dictionaries might or might not work.

About merging different RCutFlowReports: we do not provide a way to programmatically merge different RCutFlowReport objects at the moment, but feel free to open a feature request at [github.com/root-project/root/issues/](http://github.com/root-project/root/issues/)

Cheers,  
Enrico

---

<div class="post-metadata">

**Author:** ![joa](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/dec6dc/32.png) [@joa](https://root-forum.cern.ch/u/joa)\
**Post date:** [September 29, 2020, 6:41am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623/4 "2020-09-29T06:41:31Z")

</div>

Hi,

I had a quick look. If it is the information and not the object you want to save, I often save ‘text’ in root files using a simple TNamed, adding the text as the title…

Cheers

Joa
