H2ROOT(1)

πŸ“¦ version 6.40.04, in arch rolling, epel 10, epel 9, fedora 43, fedora 44

πŸ’– 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 β€” = 1 by default (use 0 for no compression)
  • tolower β€” = 1 by default (use 0 to keep case of column names)
  • lrecl β€” = 0 by default (must be specified if > 8092)

🌈 SEE ALSO 🌈


πŸ‘‘ ORIGINAL AUTHORS πŸ‘‘

The ROOT team (see web page above):

  • Rene Brun and Fons Rademakers

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