Branch of Type Float16_t

Hi,
I downloaded root from the master branch and currently I am testing branch with Float16_t type,

I can see that vector<Float16_t>; is not supported, only simple types are.
Something else,
is is possible to read branches with type Float16_t using variable with normal float type ?
Float_t b;
t->SetBranchAddress(“b”, &b);
t->GetEntry (0);
std::cout<<b<<std::endl;

I made a test in cling and it looks fine, but I am not sure it makes sense !

Cheers

Hi,

perhaps this tutorial can help you: https://root.cern/doc/master/float16_8C.html
It deals with writing and reading Float16_t. In addition this doc of TTree is helpful: https://root.cern.ch/doc/master/classTTree.html#addcolumnoffundamentaltypes

Cheers,
P

Thanks a lot Philippe,
The tutorial is great, it help me a lot to understand how Float16_t and Double32_t work.
I can see that Float16_t Array[n] works fine but not vectors, in our root files we have vector not array I think it is very hard to change the format. Is there a possibility to support vector<Float16_t> ?

Cheers
Muhammad

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