Skip to content

LArCV Data Files

drinkingkazu edited this page Jan 17, 2018 · 5 revisions

Being able to browse data file contents easily is extremely important. In this page we cover 2 ways to interactively access larcv data file contents: one using bare ROOT APIs and another using larcv IO handler. These two methods are complimentary to each other, and we recommend to get familiar with both methods.

Using ROOT APIs

larcv data files are stored in ROOT format which allows storing pretty much any C++ data representations and has a nice compression features. It also means you can use ROOT TFile and/or TChain objects to interface directly with data files. Read this tutorial to learn how you can access data contents interactively. You might find a list of functions available for TFile and TChain useful (but use these links as a reference, not a documentation to read since it's long)

(You could refer to an official documentation about how ROOT file streamer works, but it is not necessary to read: it can actually distract you because it is a lot of details you won't be even caring for the purpose of using larcv.)

Using LArCV's IO handler

larcv::IOManager is a C++ class (class header) which is accessible through either C++ source code or Python. IOManager automatically handles lots of careful operations to store many data products for many physics events. This notebook covers an overview of how LArCV data products are stored in file and how you can retrieve using IOManager.