xAOD Dumper

Dump xAODs in a single bound!

Download as .zip Download as .tar.gz View on GitHub

Table of Contents generated with DocToc

xAODDumper - A RootCore Package

Installing

This will work on (most) xAODs in (most) a given AnalysisBase release. To install,

git clone https://github.com/kratsg/xAODDumper.git
rc find_packages
rc compile
dumpSG.py <input file> *kwargs

or

asetup AnalysisBase,21.2.0,here
cmake ../src
make
dumpSG.py <input file> *kwargs

It has been tested on Rel19 xAODs, Rel20 xAODs, DxAODs, mc14, and mc15 datasets. That is literally amazing!

Functionality Included

Example Usage

Understanding physical sizes of the containers

dumpSG.py input.root --format json --size --attr -b

will produce two sets of pie charts. One pie chart represents the physical space on the disk and the other represents the amount of space in memory (RAM)

On-Disk Sizes In-Memory Sizes

dumpSG.py

usage: dumpSG.py filename [filename] [options]

Process xAOD File and Dump Information.

positional arguments:
  input_filename        input root file(s) to read

optional arguments:
  -h, --help            show this help message and exit
  --tree TREE_NAME      Specify the tree that contains the StoreGate
                        structure. Default: CollectionTree
  -o OUTPUT_FILENAME, --output OUTPUT_FILENAME
                        Output file to store dumped information. Default:
                        info.dump
  -d OUTPUT_DIRECTORY, --output_directory OUTPUT_DIRECTORY
                        Output directory to store the report generated.
                        Default: report
  -t CONTAINER_TYPE_REGEX, --type CONTAINER_TYPE_REGEX
                        Regex specification for the xAOD container type. For
                        example, --type="xAOD::Jet*" will match
                        `xAOD::JetContainer` while --type="xAOD::*Jet*" will
                        match `xAOD::TauJetContainer`. This uses Unix filename
                        matching. Default: *
  -c CONTAINER_NAME_REGEX, --container CONTAINER_NAME_REGEX
                        Regex specification for the xAOD container name. For
                        example, --container="AntiKt10LCTopo*" will match
                        `AntiKt10LCTopoJets`. This uses Unix filename
                        matching. Default: *
  -f {json,pickle,pretty}, --format {json,pickle,pretty}
                        Specify the output format. Default: pretty
  -v, --verbose         Enable verbose output of various levels. Use --debug-
                        root to enable ROOT debugging. Default: no verbosity
  --debug-root          Enable ROOT debugging/output. Default: disabled
  -b, --batch           Enable batch mode for ROOT. Default: disabled
  --has_aux             Enable to only include containers which have an
                        auxillary container. By default, it includes all
                        containers it can find. Default: disabled
  --has_interface       Enable to only include containers which have an
                        interface container. By default, it includes all
                        containers it can find. Default: disabled
  --no_warn_missing_auxillary
                        Enable to turn on warnings for missing auxillary.
  --no_warn_missing_interface
                        Enable to turn off warnings for missing interface.
  --prop                Enable to print properties of container. By default,
                        it only prints the xAOD::ContainerType and containers
                        for that given type. This is like an increased
                        verbosity option for container properties. Default:
                        disabled
  --attr                Enable to print attributes of container. By default,
                        it only prints the xAOD::ContainerType and containers
                        for that given type. This is like an increased
                        verbosity option for container attributes. Default:
                        disabled
  --report              Enable to also create a directory containing plots and
                        generate additional reporting information/statistics.
                        By default, this is turned off as it can be
                        potentially slow. The output directory containing the
                        plots will be named `xAODDumper_Report`. Default:
                        disabled
  --merge-report        Enable to merge the generated report by container. By
                        default, this is turned off. Default: disabled
  --size                Enable to build a pie chart of the size distributions
                        in memory and on-disk. By default, this is turned off.
                        Default: disabled
  --noEntries NO_ENTRIES
                        If a plot generated by a report has no entries, color
                        it with this ROOT color value. Default: kRed
  --noRMS NO_RMS        If a plot generated by a report has RMS = 0.0 (mean !=
                        0.0), color it with this ROOT color value. Default:
                        kYellow
  --noMean NO_MEAN      If a plot generated by a report has mean = 0.0, color
                        it with this ROOT color value. Default: kOrange
  --filterProps PROPERTY_NAME_REGEX
                        (INACTIVE) Regex specification for xAOD property
                        names. Only used if --prop enabled.
  --filterAttrs ATTRIBUTE_NAME_REGEX
                        (INACTIVE) Regex specification for xAOD attribute
                        names. Only used if --attr enabled.
  -i, --interactive     (INACTIVE) Flip on/off interactive mode allowing you
                        to navigate through the container types and
                        properties.

Known Bugs

Authors

Acknowledgements