Reading of nonexistent objects [message #7760] |
Tue, 27 January 2009 11:48 |
Ralf Kliemt
Messages: 507 Registered: May 2007 Location: GSI, Darmstadt
|
first-grade participant |
From: 141.30.85*
|
|
Hi all,
I try to run the PndMicroWriter and face the following issue. If there is no "Track" TClonesArray then the writer intends to use the "LhePidTrack" TClonesArray.
Unfortunately the framework recieves a segfault at ioman->GetObject("Track"); (the object is not existent). So the it does not work like it is intended.
I think once we could try to get an object and end the run with an adequate error message.
The code sniplet:
Toggle Spoiler
// Get input array
fTrArray = (TClonesArray*) ioman->GetObject("Track");
if ( ! fTrArray) {
cout << "-W- PndMicroWriter::Init: "
<< "No Track array!" << endl;
fTrArray=new TClonesArray("Track");
//return kERROR;
} else fStoreTrack=true;
The gdb output of the thing is:
Toggle Spoiler Inside the Init function****
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229109552 (LWP 13643)]
0xb4014ca6 in CbmRootManager::ActivateBranch (this=0x86ff6d8, BrName=0xb2c96f44 "Track")
at /home/ralfk/Pandaroot/pandaroot/base/CbmRootManager.cxx:474
474 fObj2[fNObj] = fold->FindObjectAny(BrName);
(gdb) bt
#0 0xb4014ca6 in CbmRootManager::ActivateBranch (this=0x86ff6d8, BrName=0xb2c96f44 "Track")
at /home/ralfk/Pandaroot/pandaroot/base/CbmRootManager.cxx:474
#1 0xb4014eee in CbmRootManager::GetObject (this=0x86ff6d8, BrName=0xb2c96f44 "Track")
at /home/ralfk/Pandaroot/pandaroot/base/CbmRootManager.cxx:517
#2 0xb2c884ec in PndMicroWriter::Init (this=0x8957610) at /home/ralfk/Pandaroot/pandaroot/tutorials/anatask/PndMicroWriter.cxx:100
#3 0xb40214fb in CbmTask::InitTask (this=0x8957610) at /home/ralfk/Pandaroot/pandaroot/base/CbmTask.cxx:41
Greetings from Dresden,
Ralf.
[Updated on: Tue, 27 January 2009 11:51] Report message to a moderator
|
|
|
|