# Histograms with same name

**URL:** <https://root-forum.cern.ch/t/histograms-with-same-name/28988>\
**Category:** ROOT\
**Created:** [May 12, 2018, 4:21pm UTC](https://root-forum.cern.ch/t/histograms-with-same-name/28988 "2018-05-12T16:21:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 12, 2018, 7:29pm UTC](https://root-forum.cern.ch/t/histograms-with-same-name/28988/3 "2018-05-12T19:29:56Z")

</div>

Either:

> [@Aux;1 aux;2 aux3;](https://root-forum.cern.ch/t/aux-1-aux-2-aux3/13345/2):
>
> Search for “cycle” and/or “namecycle”, for example in: In a Nutshell: [Input and Output](https://root.cern.ch/d/input-and-output) . ROOT User’s Guide: [Input/Output](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#inputoutput) : [Retrieving Objects from Disk](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#retrieving-objects-from-disk) , [Subdirectories and Navigation](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#subdirectories-and-navigation) . Just for reference: [some additional notes about GetObject, Get, FindObjectAny, FindKeyAny, ReadObj, ReadObjAny](https://root-forum.cern.ch/t/broken-tdirectoryfile-findobjectany-and-tdirectoryfile-findkeyany/20943/16) .

or:

> [@Problem with Reading Root File](https://root-forum.cern.ch/t/problem-with-reading-root-file/12164/2):
>
> An expert’s advice is needed, why there is a “segmentation violation” in the code below. [8-[] { TFile \*TPCTOFEfffile = TFile::Open("EFFTPCTOF.root", "read"); #if 1 /\* 0 or 1 \*/ // This method works well. TH1F \*TPCTOFEFFDeltapp = (TH1F\*)(TPCTOFEfffile-\>FindObjectAny("hEff;1")); TH1F \*TPCTOFEFFDeltamm = (TH1F\*)(TPCTOFEfffile-\>FindObjectAny("hEff;2")); TH1F \*TPCTOFEFFAverage = (TH1F\*)(TPCTOFEfffile-\>FindObjectAny("hEff;3")); #else /\* 0 or 1 \*/ // This method should also work, I get…

---

_[View the full topic](https://root-forum.cern.ch/t/histograms-with-same-name/28988)._
