hadd(1)

πŸ“¦
version 6.40.04 Β· 3 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05

πŸ’– hadd(1) β€” the General Commands Manual glow-up πŸ’–

okay bestie, sit down, grab a strawberry πŸ“, because we're talking about hadd β€” yes, from the General Commands Manual, section 1, the real one. this is the tool that smooshes your ROOT files together and honestly? it eats. πŸ’…


✨ SYNOPSIS ✨

usage: hadd [-a] [-f] [-f[0-9]] [-fk] [-ff] [-k] [-L] [-Ltype] [-O] [-T]
            [-v V] [-j J] [-dbg] [-d D] [-n N] [-cachesize CACHESIZE]
            [-experimental-io-features EXPERIMENTAL_IO_FEATURES]
            TARGET SOURCES

like, that's the whole vibe check right there. TARGET and SOURCES, bestie. that's the assignment. πŸ“‹


🌸 DESCRIPTION 🌸

so what does this little icon actually do? it adds histograms, trees and other objects from a list of ROOT files, and writes them all into a target ROOT file. that's it. that's the whole main character moment. πŸ‘‘

the target file is newly created and it must not exist already. OR β€” if you pass -f (the "force" era) β€” it must not be one of the source files. no cap. don't be out here overwriting your own inputs, that's giving chaos. 😭


πŸŽ€ OPTIONS πŸŽ€

one bullet per flag, we're not skipping a single one, periodt. ✨

  • -a β€” append to the output. just keep adding, bestie. 🫢
  • -f β€” force overwriting of the output file. bold. brave. slightly scary. πŸ”₯
  • -f[0-9] β€” okay this one is the compression girlie. it gives you the ability to specify the compression algorithm i and level j of the target file by passing the number i*100 + j, e.g. -f505. the last digit (j) can be set from 0 = uncompressed to 9 = highly compressed. the first digit (i) is 1 for ZLIB, 2 for LZMA, 4 for LZ4 and 5 for ZSTD. the recommended numbers are 101 (ZLIB), 207 (LZMA), 404 (LZ4), 505 (ZSTD). the default value for this flag is 101 (kDefaultZLIB). see ROOT::RCompressionSetting and TFile::TFile documentation for more details. iykyk πŸ’…
  • -fk β€” sets the target file to contain the baskets with the same compression as the input files (unless -O is specified). it compresses the meta data using the compression level specified in the first input, or the compression setting after fk (for example 206 when using -fk206). so extra, so valid. ✨
  • -ff β€” the compression level used is the one specified in the first input. simple. iconic. πŸŽ€
  • -k β€” skip corrupt or non-existent files, do not exit. she's resilient, she doesn't panic. πŸ¦‹
  • -L β€” read the list of objects from FILE and either only merge or skip those objects depending on the value of -Ltype. FILE must contain one object name per line, which cannot contain whitespaces or /. you can also pass TDirectory names, which apply to the entire directory content. lines beginning with # are ignored. if this flag is passed, -Ltype MUST be passed as well. non-negotiable, bestie. 🚨
  • -Ltype β€” sets the type of operation performed on the objects listed in FILE given with the -L flag. "SkipListed" will skip all the listed objects; "OnlyListed" will only merge those objects. if this flag is passed, -L must be passed as well. they're a package deal, a duo, a ship. πŸ’ž
  • -O β€” re-optimize basket size when merging TTree. glow-up for your baskets. 🧺
  • -T β€” do not merge Trees. sometimes you just gotta leave the trees alone. 🌳
  • -v β€” explicitly set the verbosity level: 0 requests no output, 99 is the default. choose your volume, bestie. πŸ”Š
  • -j β€” parallelize the execution in J processes. if the number of processes is not specified, use the system maximum. go big or go home. ⚑
  • -dbg β€” enable verbosity. if -j was specified, do not not delete partial files stored inside working directory. (yes, that's what it says. read it twice. we don't ask questions. πŸ™ˆ)
  • -d β€” carry out the partial multiprocess execution in the specified directory. put it somewhere cute. πŸ“
  • -n β€” open at most N files at once (use 0 to request to use the system maximum). pacing herself, as she should. 🧘
  • -cachesize β€” resize the prefetching cache use to speed up I/O operations (use 0 to disable). speed. I/O speed. obsessed. 🏎️
  • -experimental-io-features β€” used with an argument provided, enables the corresponding experimental feature for output trees. see ROOT::Experimental::EIOFeatures. ✨experimental✨ bestie behavior.
  • TARGET β€” the target file. 🎯
  • SOURCES β€” the source files. πŸ“š

πŸ‘‘ ARGUMENTS πŸ‘‘

  • TARGET β€” target file. this is where everything lands. the destination wedding. πŸ’
  • SOURCES β€” source files. these are the guests. bring all of them. 🌈

heads up bestie: that TARGET file must not exist unless you're forcing it with -f, and even then it can't be one of the SOURCES. protect your data, queen. 🫢

and that's the whole page, fr fr. this lil beauty lives at hadd(1) in the General Commands Manual β€” you found her, you read her, you slayed. πŸ’–βœ¨πŸŽ€ go merge something gorgeous. πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from