GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » Different results for same information extracted in different ways
Re: Different results for same information extracted in different ways [message #17493 is a reply to message #17489] Mon, 10 November 2014 17:41 Go to previous messageGo to previous message
Stefan Pflueger is currently offline  Stefan Pflueger
Messages: 99
Registered: February 2012
continuous participant
From: *kph.uni-mainz.de
Hi Mamen,

so when I run your macro in the compiled mode (.C+) it runs fine (sometimes I get errors but all the way at the end, when everything is clean up). From what I can see in your Output file, your crashes appear also all the way at the end so all results etc should be fine. The segfault is annoying nevertheless... I don't see why it crashes at this point, but since it is all the way at the end it has to do with cleanup of your objects (destructors are called). I would guess that somehow the memory management of root screws up there.
When I run the macros in interpreter mode (.C) it runs fine on some files and crashes on other files. In my case it crashes when filling the Reco2 histogram at some defined entry (not the last) of the tree. Debugging this nearly impossible (afaik), as more or less non logical stuff happens. However I traced it back to the #include statements. So removing the them should make your macro run just just like in the compiled mode (crashes at the end of the macro when cleanup happens, but that is no biggie). Hope that helps...

Small remark: I would recommend to replace the char array and sprint statements with stringstreams as they are a bit safer, so something like this:

  int W2=10;
  std::string FWBW="bw";
  int NBINS=100;
  int BINMIN=-2;
  int BINMAX=2;

  std::stringstream ss;
  ss<<"epempi0-W2-"<<W2<<"-Delta0-"<<FWBW<<"-LargeQ2-Merged.root";


Cheers,

Stefan
 
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: vertex reconstruction without fitting?
Next Topic: Vertex fitter for two consecutive decays
Goto Forum:
  


Current Time: Sat Dec 14 08:06:06 CET 2024

Total time taken to generate the page: 0.00874 seconds