[ROOT] Extend ROOT importer by possibility to load trees and tuples
ClosedPublic

Authored by croick on Dec 15 2018, 6:28 PM.

Details

Summary

ROOT trees allow the storage of associated data of different types
in so-called branches. Each branch contains at least one leaf which
labels the contained data. The actual data is stored in baskets,
which contain data of predefined size.
This patch extends the ROOTHist class by the possibility to import
such trees and ntuples, which are a easier-to-use version of simple
trees.

Further changes:

  • fix loading of large files
  • load streamer info from file, use a default description if none is found
Test Plan
  • import test files

Diff Detail

Repository
R262 LabPlot
Branch
roottree
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6254
Build 6272: arc lint + arc unit
croick created this revision.Dec 15 2018, 6:28 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptDec 15 2018, 6:28 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
croick requested review of this revision.Dec 15 2018, 6:28 PM
croick updated this revision to Diff 47635.Dec 15 2018, 6:41 PM
  • minor changes after first online diff

The new importer options now look a little different.


I don't expect review of the whole code, but a quick glance at the interface would be nice.

yurchor added inline comments.
src/backend/datasources/filters/ROOTFilter.h
108 ↗(On Diff #47635)

Typo: colums -> columns

src/backend/datasources/filters/ROOTFilterPrivate.h
182 ↗(On Diff #47635)

Typo: entriees -> entries

238 ↗(On Diff #47635)

Typo: entriees -> entries

asemke added a subscriber: asemke.Dec 21 2018, 4:29 PM

The new importer options now look a little different.


I don't expect review of the whole code, but a quick glance at the interface would be nice.

Looks good. Please check my minor comments. Another valuable and big contribution to LabPlot. Thank you a lot for this.

By looking at your screenshot I again realize that we should maybe remove the title "Format Options" for the group box completely for file types like hdf5, netcdf, fits and root. Here we don't have any "options" like for ASCII. Also, removing of the border of this groupbox for this types will make the import widget less over loaded. But this is something for another code change...

src/backend/datasources/filters/ROOTFilter.h
66 ↗(On Diff #47635)

QStringList listHistograms(const QString& fileName) const;

68 ↗(On Diff #47635)

same here.

70 ↗(On Diff #47635)

same here

78 ↗(On Diff #47635)

also here we can add const

82 ↗(On Diff #47635)

same here

croick updated this revision to Diff 47983.Dec 21 2018, 10:37 PM
  • minor changes after first online diff
  • Fix several typos in comments, declare access to content as const
croick marked 8 inline comments as done.Dec 21 2018, 10:41 PM

Thanks for the comments.

Actually the calls are not as const as they seem to be, each call could change the internal file name and everything that follows.
But that would be a different patch as well.

asemke accepted this revision.Dec 22 2018, 8:22 AM
This revision is now accepted and ready to land.Dec 22 2018, 8:22 AM
This revision was automatically updated to reflect the committed changes.