I am filling a Tree with a map<string,Float_t> the branch is called “Integrals”.
This seems to work properly.
If I use pyroot and accessing a single Event with
tree.GetEntry(x) tree.Integrals.size() for i in tree.Integrals: print i.first,i.second
I can see that the map is properly filled and I can access all variables.
I would now create some histograms with this map by using the tree.Draw function.
It seems that
In principle works, the number of entries agrees with the size of the tree times the size of the map.
If I use
I can only see the first entry of the map, but all others are not there. e.g. the number of entries of the histogram is only equal to the number of entries of the tree.
So here I cannot see the different keys I used for filling the tree.
I also would like to do something like:
but if I try that I get the Errror
Is there an option to get that working?
I played around with a loader.c file which contains the definitions of map<string,float> but did not help.
Would be glad for any advises or other ways to save the data in the tree to make it easier to access.