# Histogram with "/" in name

**URL:** <https://root-forum.cern.ch/t/histogram-with-in-name/45960>\
**Category:** ROOT\
**Tags:** hist, root\
**Created:** [July 22, 2021, 8:06am UTC](https://root-forum.cern.ch/t/histogram-with-in-name/45960 "2021-07-22T08:06:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IKark](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ikark/32/25281_2.png) [@IKark](https://root-forum.cern.ch/u/IKark)\
**Post date:** [July 22, 2021, 8:06am UTC](https://root-forum.cern.ch/t/histogram-with-in-name/45960/1 "2021-07-22T08:06:16Z")

</div>

* * *

_Please read [tips for efficient and successful posting](https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292) and [posting code](https://root-forum.cern.ch/t/posting-code-read-this-first/28293)_

_ROOT Version:_ 6.24.02 (pyROOT)  
_Platform:_ Linux WSL1  
_Compiler:_ Not Provided

* * *

Good morning ROOT experts,

I want to ask regarding a possible bug  
that I am facing, when trying to ‘Get’ a histogram whose name includes “/”  
but is not in any directory.

I re-produce this behaviour if I do the following:

```auto
file = ROOT.TFile.Open("test.root","RECREATE")
hist = ROOT.TH1F( '/a/test', '', 100, -4, 4 )
hist.Write()
file.Close()

file = ROOT.TFile.Open("test.root","READ")
file.Get('/a/test/')

```

returns: `<cppyy.gbl.TH1F object at 0x(nil)>`

This appears to be a null-pointer.  
The histogram is clearly visible and functioning in the TBrowser,  
however I cannot seem to be able to escape the “/” character to ‘.Get’  
it from the file. Perhaps ROOT is trying to find directories with that structure  
and fails to find them thus returning a null-pointer?

Please excuse this post if this is mentioned as a no-go somewhere in the documentation.  
Thank you very much in advance,  
Ioannis

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 22, 2021, 8:08am UTC](https://root-forum.cern.ch/t/histogram-with-in-name/45960/2 "2021-07-22T08:08:15Z")

</div>

May be [this FAQ](https://root-forum.cern.ch/t/how-to-draw-an-object-with-special-characters-in-its-name/28248) can help you.

---

<div class="post-metadata">

**Author:** ![IKark](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ikark/32/25281_2.png) [@IKark](https://root-forum.cern.ch/u/IKark)\
**Post date:** [July 22, 2021, 8:43am UTC](https://root-forum.cern.ch/t/histogram-with-in-name/45960/3 "2021-07-22T08:43:28Z")

</div>

Thank you, this fixes the issue!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 5, 2021, 8:43am UTC](https://root-forum.cern.ch/t/histogram-with-in-name/45960/4 "2021-08-05T08:43:56Z")

</div>

Closed on August 5, 2021, 8:43am UTC

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