Adding vector TLorentzVector someName and vector TVector3 someName in headerfile crashing code (adding angle bracket to TLorentzVector make the word invisible here); even if I don’t use them in my .C file [header file includes #include, #include “TVector3.h”, #include “TLorentzVector.h”]
following line appears below of large crash report:
#5 0x00007fb9c3ac793c in free () from /lib64/libc.so.6
however, vector float someName (or vector double someName) works fine
ROOT Version: 5.34/38
_Platform: x86_64 GNU/Linux
_Compiler:gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
any suggestions? thank you.
Please post your macro showing the problem. It is not clear from the text. Also I see you are using a very old ROOT version, please consider upgrading to a newer one (e.g. 6.28)
Sorry for delay, somehow this response did not make an email notification.
Here are minimal working example:
the code is made from MakeClass method.
In header file,
vector < TVector3 > PionPlus;
[header files are already added #include< vector> and #include “TVector3.h”]
In main file, Loop(), inside track loop
vMom.SetXYZ(Px[iTracks], Py[iTracks], Pz[iTracks]);
if (charge > 0) PionPlus.push_back(vMom);
After track loop finish,
Please let me know if some additional information is needed.
Thank you for your help.
Please attach the full code, it is not clear what the error is from what you are writing. You are also reading a ROOT file, I think, so we would need also the ROOT file to reproduce the crash