Skip to content

HnSparseTreeReader - Reader with THnSparse mapping and content stored in TTree #369

@mvala

Description

@mvala

The THnSparse class in ROOT provides a powerful and flexible way to store multi-dimensional histograms, especially when dealing with sparse data sets. However, directly managing very large THnSparse objects, particularly in terms of memory footprint and persistent storage, can present challenges. To address this, the HnSparseTreeReader emerges as a solution that leverages the robust data management capabilities of TTree while retaining the essential mapping and binning information provided by THnSparse. I built such ROOT object that is cappable of doing this (https://gitlab.com/ndmspc/ndmspc/-/blob/main/core/NHnSparseBase.h).

The HnSparseTreeReader should acts as an intermediary, allowing users to read the multi-dimensional structure and binning of their sparse data using the familiar THnSparse interface, but then efficiently store the actual bin content and associated weights within a TTree. This approach offers several significant advantages: improved scalability for extremely large datasets, reduced memory consumption during analysis or visualization by only loading relevant branches, and enhanced flexibility in how data is accessed and processed.

This issue will focus on the design, implementation of the HnSparseTreeReader using jsroot library.

Currently i get tree storage and mapping like this (i can store THnSparse in UserInfo if needed)

TFile *f = TFile::Open("root://eos.ndmspc.io//eos/ndmspc/scratch/hnst_cernstaff.root");
TTree *storage = (TTree*) gFile->Get("hnst")
THnSparse *mapping = ((Ndmspc::NBinning*)storage->GetUserInfo()->At(0))->GetContent()

Can you give me hint where to start?

Thanks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions