Branch of Float16_t datatype

Hi,
I am doing some experimentations to reduce the size of the root files we have.
I think converting branches from Float_t to Float16_t is a very good idea since we do not need all these digits especially when the values are in MeV.
In my experiments I used root 6.16/00 and actually I did not see any size reduction at all

Is this feature available in this root version?

This is the code I am using

TFile f("test.root", "RECREATE");
auto t = new TTree("t", "t");
TRandom3 r(1);
Float16_t  f1 = 0.;
t->Branch("f1", &f1, "f1/f");

for(int i=0;i<10000;i++){
    f1=r.Uniform(0,1);
    t->Fill();
    
}

f.cd();
t->Write();

This is supported only in the soon to be released v6.18/00 (and/or the master branch).

Cheers,
Philippe.

Thanks a lot,
I am eager to use this feature :sunglasses:
few questions:

  1. will vector<Float16_t> be supported?
  2. will we have a method to determine the number of digits to keep?
    for example 3.14159265359 can be reduced 3.1415.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.