# How to convert Hbook/PAW files to ROOT

**URL:** <https://root-forum.cern.ch/t/how-to-convert-hbook-paw-files-to-root/44411>\
**Category:** Howto\
**Created:** [April 14, 2021, 1:15pm UTC](https://root-forum.cern.ch/t/how-to-convert-hbook-paw-files-to-root/44411 "2021-04-14T13:15:48Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [April 14, 2021, 1:15pm UTC](https://root-forum.cern.ch/t/how-to-convert-hbook-paw-files-to-root/44411/1 "2021-04-14T13:15:48Z")

</div>

Use `h2root` (a program to convert an HBOOK file into a ROOT file)  
This program is delivered with the ROOT distribution.

It is invoked via:

```auto
h2root hbook_file_name root_file_name compress tolower

```

if the second parameter `root_file_name` is missing the name will be  
automatically generated from the hbook file name. Example:

```auto
 h2root test.hbook

```

is identical to

```auto
h2root test.hbook test.root

```

- if compress is missing (or = 1)the ROOT file will be compressed
- if compress = 0 the ROOT file will not be compressed.
- if tolower is missing (or = 1) ntuple column names are converted to lower case  
but the first character is converted to upper case.
- if tolower = 2 same as tolower=1 except that the first character is also converted to lower case
