Project

General

Profile

Support #6234

Size of SQLite database in file reported as 1.4GiB by ROOT regardless of size.

Added by Christopher Green over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Paul Russo
Category:
Metadata
Target version:
-
Start date:
05/12/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
Scope:
Internal
Experiment:
-
SSI Package:
art
Duration:

Description

According to Herb, asking ROOT about the size of the SQLite database in a ROOT file produces an answer which does not depend on the actual size of the DB. Please investigate and mitigate if possible.

History

#1 Updated by Christopher Green over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Paul Russo

#2 Updated by Paul Russo over 6 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

The reported problem was that when you use the root TBrowser to inspect the TKey named "RootFileDB;1" in an art root file, the size data members fNbytes and FObjlen report invalid numbers. This is indeed true, the numbers are meaningless.

However if you fetch the TKey from the open file programatically and dump it like this:

TKey* tk = gDirectory->GetKey("RootFileDB");
tk->Dump();

the fNbytes and fObjlen data members do have the correct numbers (they also have individual accessor member functions).

So this is just poor behavior on the part of the TBrowser, the correct data is fetchable from the file in the normal way.

#3 Updated by Paul Russo over 6 years ago

Here is example code to fetch the size info:

TFile* f = TFile("MyArtDataFile.root");
TKey* tk = f->GetKey("RootFileDB");
Int_t nbytes = tk->GetNbytes();
Int_t objlen = tk->GetObjlen();

#4 Updated by Christopher Green over 6 years ago

  • Status changed from Resolved to Closed

#5 Updated by Christopher Green about 6 years ago

  • Tracker changed from Bug to Support
  • Target version deleted (1.13.00)

Also available in: Atom PDF