crash [message #20363] |
Thu, 23 February 2017 00:57 |
Gianluigi Boca
Messages: 177 Registered: March 2004
|
first-grade participant |
From: *pv.infn.it
|
|
Hi,
does anyone know why within the Init or Exec method of a class,
let's say in
sttmvdtracking/PndMixBackgroundEvents.cxx
class, the following very normal statements lead to an inexplicable
crash ?
TFile *f = new TFile("../dpm/digi_complete.root");
TTree * fTree = (TTree*) f->Get("cbmsim");
TClonesArray * fClone;
fTree->SetBranchAddress("MVDPixelDigis",&fClone);
fTree->GetEntry(5); // it crashes here
Note that other things like
fTree->Print()
for instance give a quite normal usual output. The file ../dpm/digi_complete.root
has been generated with the standard sim_complete.C and digi_complete.C
Macros in the trunk repository.
The crash doesn't happen if I do the same statements within the
root
interactive command.
Thanks in advance
Gianluigi
|
|
|