# How to extract a data from dna.root file?

**URL:** <https://root-forum.cern.ch/t/how-to-extract-a-data-from-dna-root-file/16182>\
**Category:** ROOT\
**Created:** [June 3, 2013, 1:08pm UTC](https://root-forum.cern.ch/t/how-to-extract-a-data-from-dna-root-file/16182 "2013-06-03T13:08:06Z")\
**Posts on this page:** 1\
**Showing post:** 33

<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:** [June 13, 2020, 9:58am UTC](https://root-forum.cern.ch/t/how-to-extract-a-data-from-dna-root-file/16182/33 "2020-06-13T09:58:45Z")

</div>

> [@How to extract a data from dna.root file?](https://root-forum.cern.ch/t/how-to-extract-a-data-from-dna-root-file/16182/9):
>
> In ROOT 6, you need to: root [0] .\> dump.txt .x dump.cxx .\> root [3] Note also that, in many simple cases, you should be able to use the operating system redirection, e.g.: [...]$ root -l -q dump.cxx \> dump.txt

> [@How to convert .root to .txt file?](https://root-forum.cern.ch/t/how-to-convert-root-to-txt-file/30534/4):
>
> hummm … in ROOT 6, the usage of this script should be: .\> dump.txt .x dump.cxx .\> The .x dump.cxx(); \> dump.txt part is a retired interface supported only in ROOT 5 and older. Alternative use the following script: // Name this file "dump.cxx" and use as: // // root [0] .x dump.cxx("dump.txt") // // Produces "dump.txt" and "dump.xml" files. // void dump(const char \*outputname = "dump.txt", const char \*fname = "dump.root", const char \*nname = "ntuple") { if (!outputname…

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-extract-a-data-from-dna-root-file/16182)._
