Draw histogram of a class member in TBrowser

Hi,
I saved a user defined class in root file which contains a TH2F member. When I double click the histogram in TBrowser, it do not draw itself on canvas like other directly saved histogram do. Instead, it shows all its members in class TH2F. How can I make the histogram of a class member draw itself in TBrowser?

Thanks.


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.14/04
_Platform: Debian Linux 9
_Compiler: g++ 6.3.0


Any solution here?

Probably… Can you post your root file?

I’m sorry I’m not able to upload root file because of encryption of the company. But it’s like in the picture. While I double click DetIntTest the image can be shown, do the same to DetIntH2F which is a member of class UCTSimuDetRes, all its member functions are shown, not the image.

Sorry, but there is nothing I can do with this…

According to your image, DetIntH2F is not a histogram, nor a variable, so you cannot “draw” it just like you cannot directly draw a tree (like your “RunMetadataTree”). Its icon, if it were a histogram, would look like the one of DetIntTest (blue bars). If there is a histogram inside DetIntH2F you have to scroll down the list inside DetIntH2F and see if you find anything.

1 Like

But DetIntH2F is actually a histogram just like DetIntTest. It act like a class.

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

We really need the root file (or a subset of it reproducing the problem) to help you further.