hi there,
I was trying to unmarshal types containing a TMap
with groot but failed.
it seems ROOT files containing such values do not store the StreamerInfo for TMap
s.
see:
$> root
------------------------------------------------------------
| Welcome to ROOT 6.14/04 http://root.cern.ch |
| (c) 1995-2018, The ROOT Team |
| Built for linuxx8664gcc |
| From tags/v6-14-04@v6-14-04, Aug 23 2018, 17:00:44 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
root [0] auto f = TFile::Open("o.root","RECREATE");
root [1] auto m = new TMap();
root [2] m->Add(new TObjString("key"), new TObjString("val"));
root [3] m->Write("my-map")
(int) 178
root [4] f->Write()
(int) 0
root [5] f->Close()
root [6] .q
$> root-ls -sinfos ./o.root
=== [./o.root] ===
version: 61404
streamer-infos:
StreamerInfo for "TObjString" version=1 title=""
BASE TObject offset= 0 type= 66 size= 0 Basic ROOT object
TString fString offset= 0 type= 65 size= 24 wrapped TString
---
TObjString my-map Collectable string class (cycle=2)
TObjString my-map Collectable string class (cycle=1)
why is that?
other containers such as TList
, THashList
and TObjArray
do get their TStreamerInfo
stored inside the ROOT file…
cheers,
-s
ROOT Version: 6.14/04
Platform: Linux/amd64
Compiler: Not Provided