Funny faulty thing wrt getting objects from file-directories

Dear root experts,

See below. I open root, attach a file and then get from this file 3 objects with the same name but each from a different directory on the file.

Below is shown that when I get the object first from the top directory, I am not able to get the others with the “TFile::Get()” method. But if I first get those in the respective directories, that IS possible.

This is confusing to say the least. Can anyone tell me what is going on and how I can safely get the objects without running the risk of getting three times the same object?

Thanks in advance,

Ytsen.

[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 4.00/08 4 February 2005 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.138, May 23 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0]

[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root -l /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root
root [0]
Attaching file /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root as _file0…
root [1] TH1F * sysup = (TH1F * ) _file0->Get(“E_ALL_UP/h_ElecPtMiss”)
root [2] TH1F * sysdn = (TH1F * ) _file0->Get(“E_ALL_DOWN/h_ElecPtMiss”)
root [3] TH1F * mean = (TH1F * ) _file0->Get(“h_ElecPtMiss”)
root [4] sysup
(class TH1F*)0x8fe4f50
root [5] sysdn
(class TH1F*)0x8fe5720
root [6] mean
(class TH1F*)0x901d1f0
root [7] .q
[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root -l /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root
root [0]
Attaching file /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root as _file0…
root [1] TH1F * mean = (TH1F * ) _file0->Get(“h_ElecPtMiss”)
root [2] TH1F * sysup = (TH1F * ) _file0->Get(“E_ALL_UP/h_ElecPtMiss”)
root [3] TH1F * sysdn = (TH1F * ) _file0->Get(“E_ALL_DOWN/h_ElecPtMiss”)
root [4] mean
(class TH1F*)0x8fe5428
root [5] sysup
(class TH1F*)0x8fe5428
root [6] sysdn
(class TH1F*)0x8fe5428
root [7] gDirectory->ls()
TFile** /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root Histos from ModsHat
TFile* /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root Histos from ModsHat
OBJ: TH1F h_ElecPtMiss Pt(miss) Electron Channel (_Elec) : 0 at: 0x8fe5428
TDirectory* E_ALL_UP E_ALL_UP
KEY: TH1F h_GenPtMiss;1 Pt(miss) Electron Channel (_Gen)
KEY: TH1F h_GenPtHad;1 PT(X) Electron Channel (_Gen)
KEY: TH1F h_GenTh;1 Theta(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenThX;1 Theta(Electron) PTX>25 Electron Channel (_Gen)
KEY: TH1F h_ElecPtMiss;1 Pt(miss) Electron Channel (_Elec)
KEY: TH1F h_ElecPtHad;1 PT(X) Electron Channel (_Elec)
KEY: TH1F h_ElecTh;1 Theta(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecThX;1 Theta(Electron) PTX>25 Electron Channel (_Elec)
KEY: TH1F h_ElecNCPtMiss;1 Pt(miss) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtHad;1 PT(X) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCTh;1 Theta(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecNC)
KEY: TH1F h_ElecCCPtMiss;1 Pt(miss) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtHad;1 PT(X) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCTh;1 Theta(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecCC)
KEY: TH1F hLeptTh;1 #theta lepton (Lept)
KEY: TH1F hLeptThX;1 #theta lepton PTX>25 (Lept)
TDirectory* E_ALL_DOWN E_ALL_DOWN
KEY: TH1F h_GenPtMiss;1 Pt(miss) Electron Channel (_Gen)
KEY: TH1F h_GenPtHad;1 PT(X) Electron Channel (_Gen)
KEY: TH1F h_GenTh;1 Theta(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenThX;1 Theta(Electron) PTX>25 Electron Channel (_Gen)
KEY: TH1F h_ElecPtMiss;1 Pt(miss) Electron Channel (_Elec)
KEY: TH1F h_ElecPtHad;1 PT(X) Electron Channel (_Elec)
KEY: TH1F h_ElecTh;1 Theta(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecThX;1 Theta(Electron) PTX>25 Electron Channel (_Elec)
KEY: TH1F h_ElecNCPtMiss;1 Pt(miss) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtHad;1 PT(X) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCTh;1 Theta(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecNC)
KEY: TH1F h_ElecCCPtMiss;1 Pt(miss) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtHad;1 PT(X) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCTh;1 Theta(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecCC)
KEY: TH1F hLeptTh;1 #theta lepton (Lept)
KEY: TH1F hLeptThX;1 #theta lepton PTX>25 (Lept)
KEY: TDirectory E_ALL_UP;1 E_ALL_UP
KEY: TDirectory E_ALL_DOWN;1 E_ALL_DOWN
KEY: TNtuple IsolElecEvents;1 Isol Elec Kinematics
KEY: TTree IsolElec;1 Isol Elec Kinematic
KEY: TEventList New_SelectHat_List_3_2;1 Created by SelectHat
KEY: TH1F polarR;1 polarisation Right
KEY: TH1F polarL;1 polarisation Left
KEY: TH1F polar;1 polarisation All
KEY: TH1F h_GenPtMiss;1 Pt(miss) Electron Channel (_Gen)
KEY: TH1F h_GenPtHad;1 PT(X) Electron Channel (_Gen)
KEY: TH1F h_GenPtCalo;1 PT(calo) Electron Channel (_Gen)
KEY: TH1F h_GenPt;1 PT(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenTh;1 Theta(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenPh;1 Phi(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenAcop;1 Acop(Electron) Electron Channel (_Gen)
KEY: TH1F h_GenMt;1 MT(e-nu) Electron Channel (_Gen)
KEY: TH1F h_GenMw;1 M(e-nu) Electron Channel (_Gen)
KEY: TH1F h_GenQ2e;1 Q2e Electron Channel (_Gen)
KEY: TH1F h_GenDtra;1 Dtra Electron Channel (_Gen)
KEY: TH1F h_GenDjet;1 Djet Electron Channel (_Gen)
KEY: TH1F h_GenThX;1 Theta(Electron) PTX>25 Electron Channel (_Gen)
KEY: TH1F h_GenMwTag;1 M(e-nu) +Tagger Electron Channel (_Gen)
KEY: TH1F h_GenPtHadPos;1 PT(X) Electron Channel (pos) (_Gen)
KEY: TH1F h_GenPtHadNeg;1 PT(X) Electron Channel (neg) (_Gen)
KEY: TH1F h_GenEfrac;1 Energy Fraction Electron Channel (_Gen)
KEY: TH1F h_GenEHfrac;1 Hadronic Energy Fraction Electron Channel (_Gen)
KEY: TH1F h_GenDca;1 Tr-Clu Dca Electron Channel (_Gen)
KEY: TH1F h_GenPtTr;1 Track Pt Electron Channel (_Gen)
KEY: TH1F h_GenPtTrFr;1 Track Pt/Clus. Pt Electron Channel (_Gen)
KEY: TH1F h_GenRstart;1 Track Rstart Electron Channel (_Gen)
KEY: TH1F h_GenEmpz;1 E-Pz (_Gen)
KEY: TH1F h_GenVratio;1 Vratio (_Gen)
KEY: TH1F h_GenBGF;1 BackgroundFinderBits 3x30 (_Gen)
KEY: TH1F h_GenSelDif;1 Individual Selector Rates (_Gen)
KEY: TH1F h_GenSelRed;1 Successive Selectors Rates (_Gen)
KEY: TH1F h_GenPtGAll;1 PT(Electron) Electron Channel (Gen) no cuts (_Gen)
KEY: TH1F h_GenThGAll;1 Theta(Electron) Electron Channel (Gen) no cuts (_Gen)
KEY: TH1F h_GenPhGAll;1 Phi(Electron) Electron Channel (Gen) no cuts (_Gen)
KEY: TH1F h_GenPtGCAll;1 PT(Electron) Electron Channel (Gen Phase Space) no cuts (_Gen)
KEY: TH1F h_GenThGCAll;1 Theta(Electron) Electron Channel (Gen Phase Space) no cuts (_Gen)
KEY: TH1F h_GenPhGCAll;1 Phi(Electron) Electron Channel (Gen Phase Space) no cuts (_Gen)
KEY: TH1F h_GenPtG;1 PT(Electron) Electron Channel (Gen) (_Gen)
KEY: TH1F h_GenThG;1 Theta(Electron) Electron Channel (Gen) (_Gen)
KEY: TH1F h_GenPhG;1 Phi(Electron) Electron Channel (Gen) (_Gen)
KEY: TH1F h_GenPtGC;1 PT(Electron) Electron Channel (Gen Phase Space) (_Gen)
KEY: TH1F h_GenThGC;1 Theta(Electron) Electron Channel (Gen Phase Space) (_Gen)
KEY: TH1F h_GenPhGC;1 Phi(Electron) Electron Channel (Gen Phase Space) (_Gen)
KEY: TH1F h_ElecPtMiss;1 Pt(miss) Electron Channel (_Elec)
KEY: TH1F h_ElecPtHad;1 PT(X) Electron Channel (_Elec)
KEY: TH1F h_ElecPtCalo;1 PT(calo) Electron Channel (_Elec)
KEY: TH1F h_ElecPt;1 PT(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecTh;1 Theta(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecPh;1 Phi(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecAcop;1 Acop(Electron) Electron Channel (_Elec)
KEY: TH1F h_ElecMt;1 MT(e-nu) Electron Channel (_Elec)
KEY: TH1F h_ElecMw;1 M(e-nu) Electron Channel (_Elec)
KEY: TH1F h_ElecQ2e;1 Q2e Electron Channel (_Elec)
KEY: TH1F h_ElecDtra;1 Dtra Electron Channel (_Elec)
KEY: TH1F h_ElecDjet;1 Djet Electron Channel (_Elec)
KEY: TH1F h_ElecThX;1 Theta(Electron) PTX>25 Electron Channel (_Elec)
KEY: TH1F h_ElecMwTag;1 M(e-nu) +Tagger Electron Channel (_Elec)
KEY: TH1F h_ElecPtHadPos;1 PT(X) Electron Channel (pos) (_Elec)
KEY: TH1F h_ElecPtHadNeg;1 PT(X) Electron Channel (neg) (_Elec)
KEY: TH1F h_ElecEfrac;1 Energy Fraction Electron Channel (_Elec)
KEY: TH1F h_ElecEHfrac;1 Hadronic Energy Fraction Electron Channel (_Elec)
KEY: TH1F h_ElecDca;1 Tr-Clu Dca Electron Channel (_Elec)
KEY: TH1F h_ElecPtTr;1 Track Pt Electron Channel (_Elec)
KEY: TH1F h_ElecPtTrFr;1 Track Pt/Clus. Pt Electron Channel (_Elec)
KEY: TH1F h_ElecRstart;1 Track Rstart Electron Channel (_Elec)
KEY: TH1F h_ElecEmpz;1 E-Pz (_Elec)
KEY: TH1F h_ElecVratio;1 Vratio (_Elec)
KEY: TH1F h_ElecBGF;1 BackgroundFinderBits 3x30 (_Elec)
KEY: TH1F h_ElecSelDif;1 Individual Selector Rates (_Elec)
KEY: TH1F h_ElecSelRed;1 Successive Selectors Rates (_Elec)
KEY: TH1F h_ElecPtGAll;1 PT(Electron) Electron Channel (Gen) no cuts (_Elec)
KEY: TH1F h_ElecThGAll;1 Theta(Electron) Electron Channel (Gen) no cuts (_Elec)
KEY: TH1F h_ElecPhGAll;1 Phi(Electron) Electron Channel (Gen) no cuts (_Elec)
KEY: TH1F h_ElecPtGCAll;1 PT(Electron) Electron Channel (Gen Phase Space) no cuts (_Elec)
KEY: TH1F h_ElecThGCAll;1 Theta(Electron) Electron Channel (Gen Phase Space) no cuts (_Elec)
KEY: TH1F h_ElecPhGCAll;1 Phi(Electron) Electron Channel (Gen Phase Space) no cuts (_Elec)
KEY: TH1F h_ElecPtG;1 PT(Electron) Electron Channel (Gen) (_Elec)
KEY: TH1F h_ElecThG;1 Theta(Electron) Electron Channel (Gen) (_Elec)
KEY: TH1F h_ElecPhG;1 Phi(Electron) Electron Channel (Gen) (_Elec)
KEY: TH1F h_ElecPtGC;1 PT(Electron) Electron Channel (Gen Phase Space) (_Elec)
KEY: TH1F h_ElecThGC;1 Theta(Electron) Electron Channel (Gen Phase Space) (_Elec)
KEY: TH1F h_ElecPhGC;1 Phi(Electron) Electron Channel (Gen Phase Space) (_Elec)
KEY: TH1F h_ElecNCPtMiss;1 Pt(miss) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtHad;1 PT(X) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtCalo;1 PT(calo) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPt;1 PT(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCTh;1 Theta(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPh;1 Phi(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCAcop;1 Acop(Electron) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCMt;1 MT(e-nu) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCMw;1 M(e-nu) Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCQ2e;1 Q2e Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCDtra;1 Dtra Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCDjet;1 Djet Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCMwTag;1 M(e-nu) +Tagger Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtHadPos;1 PT(X) Electron Channel (pos) (_ElecNC)
KEY: TH1F h_ElecNCPtHadNeg;1 PT(X) Electron Channel (neg) (_ElecNC)
KEY: TH1F h_ElecNCEfrac;1 Energy Fraction Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCEHfrac;1 Hadronic Energy Fraction Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCDca;1 Tr-Clu Dca Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtTr;1 Track Pt Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCPtTrFr;1 Track Pt/Clus. Pt Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCRstart;1 Track Rstart Electron Channel (_ElecNC)
KEY: TH1F h_ElecNCEmpz;1 E-Pz (_ElecNC)
KEY: TH1F h_ElecNCVratio;1 Vratio (_ElecNC)
KEY: TH1F h_ElecNCBGF;1 BackgroundFinderBits 3x30 (_ElecNC)
KEY: TH1F h_ElecNCSelDif;1 Individual Selector Rates (_ElecNC)
KEY: TH1F h_ElecNCSelRed;1 Successive Selectors Rates (_ElecNC)
KEY: TH1F h_ElecNCPtGAll;1 PT(Electron) Electron Channel (Gen) no cuts (_ElecNC)
KEY: TH1F h_ElecNCThGAll;1 Theta(Electron) Electron Channel (Gen) no cuts (_ElecNC)
KEY: TH1F h_ElecNCPhGAll;1 Phi(Electron) Electron Channel (Gen) no cuts (_ElecNC)
KEY: TH1F h_ElecNCPtGCAll;1 PT(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecNC)
KEY: TH1F h_ElecNCThGCAll;1 Theta(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecNC)
KEY: TH1F h_ElecNCPhGCAll;1 Phi(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecNC)
KEY: TH1F h_ElecNCPtG;1 PT(Electron) Electron Channel (Gen) (_ElecNC)
KEY: TH1F h_ElecNCThG;1 Theta(Electron) Electron Channel (Gen) (_ElecNC)
KEY: TH1F h_ElecNCPhG;1 Phi(Electron) Electron Channel (Gen) (_ElecNC)
KEY: TH1F h_ElecNCPtGC;1 PT(Electron) Electron Channel (Gen Phase Space) (_ElecNC)
KEY: TH1F h_ElecNCThGC;1 Theta(Electron) Electron Channel (Gen Phase Space) (_ElecNC)
KEY: TH1F h_ElecNCPhGC;1 Phi(Electron) Electron Channel (Gen Phase Space) (_ElecNC)
KEY: TH1F h_ElecCCPtMiss;1 Pt(miss) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtHad;1 PT(X) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtCalo;1 PT(calo) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPt;1 PT(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCTh;1 Theta(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPh;1 Phi(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCAcop;1 Acop(Electron) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCMt;1 MT(e-nu) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCMw;1 M(e-nu) Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCQ2e;1 Q2e Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCDtra;1 Dtra Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCDjet;1 Djet Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCThX;1 Theta(Electron) PTX>25 Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCMwTag;1 M(e-nu) +Tagger Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtHadPos;1 PT(X) Electron Channel (pos) (_ElecCC)
KEY: TH1F h_ElecCCPtHadNeg;1 PT(X) Electron Channel (neg) (_ElecCC)
KEY: TH1F h_ElecCCEfrac;1 Energy Fraction Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCEHfrac;1 Hadronic Energy Fraction Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCDca;1 Tr-Clu Dca Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtTr;1 Track Pt Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCPtTrFr;1 Track Pt/Clus. Pt Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCRstart;1 Track Rstart Electron Channel (_ElecCC)
KEY: TH1F h_ElecCCEmpz;1 E-Pz (_ElecCC)
KEY: TH1F h_ElecCCVratio;1 Vratio (_ElecCC)
KEY: TH1F h_ElecCCBGF;1 BackgroundFinderBits 3x30 (_ElecCC)
KEY: TH1F h_ElecCCSelDif;1 Individual Selector Rates (_ElecCC)
KEY: TH1F h_ElecCCSelRed;1 Successive Selectors Rates (_ElecCC)
KEY: TH1F h_ElecCCPtGAll;1 PT(Electron) Electron Channel (Gen) no cuts (_ElecCC)
KEY: TH1F h_ElecCCThGAll;1 Theta(Electron) Electron Channel (Gen) no cuts (_ElecCC)
KEY: TH1F h_ElecCCPhGAll;1 Phi(Electron) Electron Channel (Gen) no cuts (_ElecCC)
KEY: TH1F h_ElecCCPtGCAll;1 PT(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecCC)
KEY: TH1F h_ElecCCThGCAll;1 Theta(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecCC)
KEY: TH1F h_ElecCCPhGCAll;1 Phi(Electron) Electron Channel (Gen Phase Space) no cuts (_ElecCC)
KEY: TH1F h_ElecCCPtG;1 PT(Electron) Electron Channel (Gen) (_ElecCC)
KEY: TH1F h_ElecCCThG;1 Theta(Electron) Electron Channel (Gen) (_ElecCC)
KEY: TH1F h_ElecCCPhG;1 Phi(Electron) Electron Channel (Gen) (_ElecCC)
KEY: TH1F h_ElecCCPtGC;1 PT(Electron) Electron Channel (Gen Phase Space) (_ElecCC)
KEY: TH1F h_ElecCCThGC;1 Theta(Electron) Electron Channel (Gen Phase Space) (_ElecCC)
KEY: TH1F h_ElecCCPhGC;1 Phi(Electron) Electron Channel (Gen Phase Space) (_ElecCC)
KEY: TH1F hCCPtMiss;1 Pt(miss) Standard CC Sel. (CC)
KEY: TH1F hCCPtHad;1 PT(X) Standard CC Sel. (CC)
KEY: TH1F hCCNDTNV;1 N(DTNV) Standard CC Sel. (CC)
KEY: TH1F hCCNDTNVA;1 N(DTNV) Standard CC Sel. PT>20 (CC)
KEY: TH1F hCCNDTNVB;1 N(DTNV) Standard CC Sel. PT>30 (CC)
KEY: TH1F hCCNDTNVC;1 N(DTNV) Standard CC Sel. PT>40 (CC)
KEY: TH1F hNCPtEle;1 Pt(ele) Standard NC Sel. (NC)
KEY: TH1F hNCThEle;1 #theta (ele) Standard NC Sel. (NC)
KEY: TH1F hNCPhEle;1 #phi (ele) Standard NC Sel. (NC)
KEY: TH1F hNCPtHad;1 Pt(had) Standard NC Sel. (NC)
KEY: TH1F hNCThHad;1 #theta (had) Standard NC Sel. (NC)
KEY: TH1F hNCPhHad;1 #phi (had) Standard NC Sel. (NC)
KEY: TH1F hNCQ2e;1 Q2e Standard NC Sel. (NC)
KEY: TH1F hNCPtBal;1 Pt Balance Standard NC Sel. (NC)
KEY: TH1F hNCPtmiss;1 Pt(miss) Standard NC Sel. (NC)
KEY: TH1F hNCNDTNV;1 N(DTNV) Standard NC Sel. (NC)
KEY: TH1F hNCNDTNVA;1 N(DTNV) Standard NC Sel. PT>20 (NC)
KEY: TH1F hNCNDTNVB;1 N(DTNV) Standard NC Sel. PT>30 (NC)
KEY: TH1F hNCNDTNVC;1 N(DTNV) Standard NC Sel. PT>40 (NC)
KEY: TH1F hNCTNDTNV;1 N(DTNV) Standard NC Sel. thetahad>25 (NC)
KEY: TH1F hNCTNDTNVA;1 N(DTNV) Standard NC Sel. thetahad>25 PT>20 (NC)
KEY: TH1F hNCTNDTNVB;1 N(DTNV) Standard NC Sel. thetahad>25 PT>30 (NC)
KEY: TH1F hNCTNDTNVC;1 N(DTNV) Standard NC Sel. thetahad>25 PT>40 (NC)
KEY: TH1F hMNCPtEle;1 Pt(ele) Standard NC Sel. (MNC)
KEY: TH1F hMNCThEle;1 #theta (ele) Standard NC Sel. (MNC)
KEY: TH1F hMNCPhEle;1 #phi (ele) Standard NC Sel. (MNC)
KEY: TH1F hMNCPtHad;1 Pt(had) Standard NC Sel. (MNC)
KEY: TH1F hMNCThHad;1 #theta (had) Standard NC Sel. (MNC)
KEY: TH1F hMNCPhHad;1 #phi (had) Standard NC Sel. (MNC)
KEY: TH1F hMNCQ2e;1 Q2e Standard NC Sel. (MNC)
KEY: TH1F hMNCPtBal;1 Pt Balance Standard NC Sel. (MNC)
KEY: TH1F hMNCPtmiss;1 Pt(miss) Standard NC Sel. (MNC)
KEY: TH1F hMNCNDTNV;1 N(DTNV) Standard NC Sel. (MNC)
KEY: TH1F hMNCNDTNVA;1 N(DTNV) Standard NC Sel. PT>20 (MNC)
KEY: TH1F hMNCNDTNVB;1 N(DTNV) Standard NC Sel. PT>30 (MNC)
KEY: TH1F hMNCNDTNVC;1 N(DTNV) Standard NC Sel. PT>40 (MNC)
KEY: TH1F hMNCTNDTNV;1 N(DTNV) Standard NC Sel. thetahad>25 (MNC)
KEY: TH1F hMNCTNDTNVA;1 N(DTNV) Standard NC Sel. thetahad>25 PT>20 (MNC)
KEY: TH1F hMNCTNDTNVB;1 N(DTNV) Standard NC Sel. thetahad>25 PT>30 (MNC)
KEY: TH1F hMNCTNDTNVC;1 N(DTNV) Standard NC Sel. thetahad>25 PT>40 (MNC)
KEY: TH1F hLeptPt;1 PT(lepton) e+#mu (Lept)
KEY: TH1F hLeptAcop;1 Acop(l-X) e+#mu (Lept)
KEY: TH1F hLeptPtHad;1 PT(X) e+#mu (Lept)
KEY: TH1F hLeptMt;1 MT(l-#nu) e+#mu (Lept)
KEY: TH1F hLeptTh;1 #theta lepton (Lept)
KEY: TH1F hLeptThX;1 #theta lepton PTX>25 (Lept)
KEY: TH1F hIsolPresPtMiss;1 Pt_miss (IsolPres)
root [8]

Btw, this does not occur (below) when using gDirectory->GetObjec().

So, was the TFile::Get() not intended for this use… or what is the story??

[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root


  •                                     *
    
  •    W E L C O M E  to  R O O T       *
    
  •                                     *
    
  • Version 4.00/08 4 February 2005 *
  •                                     *
    
  • You are welcome to visit our Web site *
  •      [root.cern.ch](http://root.cern.ch)            *
    
  •                                     *
    

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.138, May 23 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .q
[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root -l /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root
root [0]
Attaching file /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root as _file0…
root [1] TH1F * mean;
root [2] TH1F * sysup;
root [3] TH1F * sysdn;
root [4] gDirectory->GetObject(“E_ALL_UP/h_ElecPtMiss”, sysup)
root [5] gDirectory->GetObject(“E_ALL_DOWN/h_ElecPtMiss”, sysdn)
root [6] gDirectory->GetObject(“h_ElecPtMiss”, mean)
root [7] mean
(class TH1F*)0x901eac0
root [8] sysup
(class TH1F*)0x8fe6168
root [9] sysdn
(class TH1F*)0x8fe6938
root [10] .q
[h1desy05] ~/oo_2.7.9/MarIsol_279_C $ root -l /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root
root [0]
Attaching file /afs/desy.de/user/y/ytsen/oo_2.7.9/MarIsol_279_C/MarIsol/histo.9900.W.root as _file0…
root [1] TH1F * mean;
root [2] TH1F * sysup;
root [3] TH1F * sysdn;
root [4] gDirectory->GetObject(“h_ElecPtMiss”, mean)
root [5] gDirectory->GetObject(“E_ALL_DOWN/h_ElecPtMiss”, sysdn)
root [6] gDirectory->GetObject(“E_ALL_UP/h_ElecPtMiss”, sysup)
root [7] mean
(class TH1F*)0x8fe6148
root [8] sysup
(class TH1F*)0x8fe6e10
root [9] sysdn
(class TH1F*)0x9014150
root [10]

Hi,

The different between Get and GetObject in the version of ROOT you tried is that GetObject was not looking in the list of objects in memory.

The issue is related to the fact that your 3 objects have the same names and Get (and in later version of ROOT GetObject) were looking in the wrong list of memory objects.

This problem was completely fixed in CVS yesterday.

Cheers,
Philippe