H2ROOT(1)
π H2ROOT π
okay bestie, gather round, because this little cutie (h2root, she's a General Commands Manual girlie) is about to convert your whole PAW/HBOOK situation into ROOT files and honestly? iconic behavior. β¨
πΈ NAME πΈ
h2root β convert PAW HBOOK files to ROOT files π¦
π SYNOPSIS π
h2root file.hbook file.root [compress] [tolower] [lrecl]
β¨ DESCRIPTION β¨
so like, h2root is the girl you call when you need to convert your HBOOK/PAW histograms or your ntuples files into ROOT files. to run her, you type this shell script command:
h2root hbookfile rootfile
and if you're feeling lazy and don't specify that second parameter? no worries babe, a file name gets generated for you automatically. so if hbookfile looks like file.hbook, then your ROOT file is gonna be called file.root. the universe just handles it for you, periodt. π
now the actual glow-up: this program converts HBOOK histograms into ROOT objects of the class TH1F. HBOOK profile histograms? those become ROOT profile histograms (go peek at the class TProfile). and HBOOK row-wise and column-wise ntuples get automatically converted into ROOT Trees (see TTree, she's the moment). β
ngl there's one lil caveat: some HBOOK column-wise ntuples may not be fully converted if one of the columns is an array with fix dimensions (eg. var[6]) or is a multi-dimensional array. sad but true, bestie. π
HBOOK integer identifiers get converted into ROOT named objects by prefixing the integer identifier with the letter h if the identifier is a positive integer, and with h_ if it's a negative integer identifier. little naming ritual, we love a consistent queen. π
and for row-wise or column-wise ntuples, each column becomes a branch of a Tree. also note that h2root is able to convert HBOOK files containing several levels of sub-directories β yes, she goes deep, she's thorough. once you've converted your file, you can look at it and draw histograms or process ntuples using the ROOT interactive module. you can also use the ROOT browser (see TBrowser) to inspect this file. π«Ά
the chapter How to read a Tree explains two ways to read a Tree. ROOT includes the function TTree::MakeCode to automatically generate the code for a skeleton analysis function. With β and yes, that's literally how the original sentence ends, mid-thought, we simply respect the cliffhanger π
π OPTIONS π
compressβ =1by default (use0for no compression)tolowerβ =1by default (use0to keep case of column names)lreclβ =0by default (must be specified if >8092)
π SEE ALSO π
root(1),g2root(1)- and The ROOT Users Guide, available from the main ROOT website:
http://root.cern h2rootis documented fully onhttp://root.cern/root/HowtoConvert.html
π ORIGINAL AUTHORS π
The ROOT team (see web page above):
- Rene Brun and Fons Rademakers
π§ COPYRIGHT π§
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
π AUTHOR π
This manual page was written by Christian Holm Christensen <cholm@nbi.dk>, for the Debian GNU/Linux system (but may be used by others).
and that's the whole page, bestie!! π sending you off with the energy of ROOT, Version 3 β go convert something gorgeous, iykyk. π¦πΈβ¨
π¦ where this page comes from
- arch rolling: root 6.40.04-1 Β· LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause-LBNL AND NCSA
- arch rolling: root-cuda 6.40.04-1 Β· LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause-LBNL AND NCSA
- epel 10: root-hbook 6.40.04-4.el10_3 Β· LGPL-2.1-or-later
- epel 9: root-hbook 6.40.04-4.el9 Β· LGPL-2.1-or-later
- fedora 43: root-hbook 6.36.04-2.fc43 Β· LGPL-2.1-or-later
- fedora 43: root-hbook 6.40.04-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: root-hbook 6.38.04-1.fc44 Β· LGPL-2.1-or-later
- fedora 44: root-hbook 6.40.04-1.fc44
- fedora 44: root-hbook 6.40.04-4.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms