Re: interactive handling of TClonesArray (ROOT 1.01/07)

Pasha Murat (murat@cdfsga.fnal.gov)
Sat, 5 Jul 1997 20:46:22 GMT


The problem I reported also reveals itself if one is trying to get pointer to
the track starting from the examples test/eventa.cxx and test/eventb.cxx
(we start from the file Event.root created by Event executable):
--------------------------------------------------------------------------------
CINT/ROOT C/C++ Interpreter version 5.13.11, May 25 1997
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .x eventload.cxx
root [1] gROOT->Reset()
root [2] TFile f("Event.root");
root [3] TTree *T = (TTree*)f.Get("T");
root [4] Event *event = new Event();
root [5] T->SetBranchAddress("event", &event);
root [6] Int_t nevent = T->GetEntries();
root [7] .p nevent
(Int_t)400
root [8] Int_t nb = 0;
root [9] Int_t i = 0;
root [10] nb += T->GetEvent(i);
root [11] .p nb
(Int_t)44744
root [12] TClonesArray* track = event->GetTracks();
root [13] .p (*track)[0]
Error: Pointer to function 0x107cd188 can not access from interpreter(2) FILE: LINE:0
Error: G__getvariable: expression [0] FILE: LINE:0
*** Interpreter error recovered ***
--------------------------------------------------------------------------------
What I'm doing wrong?
Thanks,
Pasha