Hi,
I have problems adding vectors of vectors into a Tree. I am not using cint but included all necessary libraries into my c++ project. It also shows no errors but the data is not inserted into the Tree.
I did try two different possibilities.
Here is an example.
typedef std::vector< std::vector<long> > LongMatrix;
LongMatrix fadcRawData_;
I fill the array.
then I try to add the data into the tree by doing:
TTree* outputTree_;
outputTree_->Branch("fadcRawData_tree",&fadcRawData_);
outputTree->Fill();
it doesnt work.
when I use
TTree* outputTree_;
outputTree_->Branch("fadcRawData_tree",&fadcRawData_,"fadcRawdata[size]/i");
outputTree->Fill();
it inputs data but I get some strange errors not while compiling but after running the program.
*** glibc detected *** ./hat: double free or corruption (!prev): 0x097f0bd0 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x3c9f591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x3ca0de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x3ca3ecd]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0x4a16741]
./hat(_ZN9__gnu_cxx13new_allocatorIlE10deallocateEPlj+0x11)[0x805b5bf]
./hat(_ZNSt12_Vector_baseIlSaIlEE13_M_deallocateEPlj+0x25)[0x805b257]
./hat(_ZNSt12_Vector_baseIlSaIlEED2Ev+0x38)[0x805ae12]
./hat(_ZNSt6vectorIlSaIlEED1Ev+0x39)[0x805a955]
./hat(_ZSt8_DestroyISt6vectorIlSaIlEEEvPT_+0x11)[0x805b903]
./hat(_ZNSt12_Destroy_auxILb0EE9__destroyIPSt6vectorIlSaIlEEEEvT_S6_+0x13)[0x805b687]
./hat(_ZSt8_DestroyIPSt6vectorIlSaIlEEEvT_S4_+0x18)[0x805b35c]
./hat(_ZSt8_DestroyIPSt6vectorIlSaIlEES2_EvT_S4_RSaIT0_E+0x18)[0x805b002]
./hat(_ZNSt6vectorIS_IlSaIlEESaIS1_EED1Ev+0x2e)[0x805aa40]
./hat(_ZN14TRawDataReaderD1Ev+0x21)[0x8060a9d]
./hat(main+0x2a7)[0x8063b27]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x3c4abd6]
./hat[0x8057d71]
======= Memory map: ========
00110000-002a0000 r-xp 00000000 08:06 660685 /libs/root_5.27_2/lib/libRIO.so
002a0000-002a3000 r--p 00190000 08:06 660685 /libs/root_5.27_2/lib/libRIO.so
002a3000-002a5000 rw-p 00193000 08:06 660685 /libs/root_5.27_2/lib/libRIO.so
002a5000-002a6000 rw-p 00000000 00:00 0
002a6000-00481000 r-xp 00000000 08:06 660693 /libs/root_5.27_2/lib/libGraf.so
00481000-0048a000 r--p 001db000 08:06 660693 /libs/root_5.27_2/lib/libGraf.so
0048a000-0048d000 rw-p 001e4000 08:06 660693 /libs/root_5.27_2/lib/libGraf.so
0048d000-00494000 rw-p 00000000 00:00 0
00494000-00594000 r-xp 00000000 08:06 660733 /libs/root_5.27_2/lib/libGraf3d.so
00594000-00595000 ---p 00100000 08:06 660733 /libs/root_5.27_2/lib/libGraf3d.so
00595000-0059a000 r--p 00100000 08:06 660733 /libs/root_5.27_2/lib/libGraf3d.so
0059a000-0059c000 rw-p 00105000 08:06 660733 /libs/root_5.27_2/lib/libGraf3d.so
0059c000-0059e000 rw-p 00000000 00:00 0
0059e000-005cb000 r-xp 00000000 08:06 660694 /libs/root_5.27_2/lib/libRint.so
005cb000-005cc000 r--p 0002c000 08:06 660694 /libs/root_5.27_2/lib/libRint.so
005cc000-005cd000 rw-p 0002d000 08:06 660694 /libs/root_5.27_2/lib/libRint.so
005cd000-005cf000 r-xp 00000000 08:06 1052317 /lib/tls/i686/cmov/libdl-2.11.1.so
005cf000-005d0000 r--p 00001000 08:06 1052317 /lib/tls/i686/cmov/libdl-2.11.1.so
005d0000-005d1000 rw-p 00002000 08:06 1052317 /lib/tls/i686/cmov/libdl-2.11.1.so
005d1000-005f5000 r-xp 00000000 08:06 1052318 /lib/tls/i686/cmov/libm-2.11.1.so
005f5000-005f6000 r--p 00023000 08:06 1052318 /lib/tls/i686/cmov/libm-2.11.1.so
005f6000-005f7000 rw-p 00024000 08:06 1052318 /lib/tls/i686/cmov/libm-2.11.1.so
005f7000-005fd000 r-xp 00000000 08:06 1052321 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
005fd000-005fe000 r--p 00006000 08:06 1052321 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
005fe000-005ff000 rw-p 00007000 08:06 1052321 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
00600000-0061b000 r-xp 00000000 08:06 1044618 /lib/ld-2.11.1.so
0061b000-0061c000 r--p 0001a000 08:06 1044618 /lib/ld-2.11.1.so
0061c000-0061d000 rw-p 0001b000 08:06 1044618 /lib/ld-2.11.1.so
0061d000-006ef000 r-xp 00000000 08:06 660649 /libs/root_5.27_2/lib/libGpad.so
006ef000-006f4000 r--p 000d1000 08:06 660649 /libs/root_5.27_2/lib/libGpad.so
006f4000-006f5000 rw-p 000d6000 08:06 660649 /libs/root_5.27_2/lib/libGpad.so
006f5000-006f7000 rw-p 00000000 00:00 0
006f7000-0073e000 r-xp 00000000 08:06 660648 /libs/root_5.27_2/lib/libPostscript.so
0073e000-0073f000 r--p 00047000 08:06 660648 /libs/root_5.27_2/lib/libPostscript.so
0073f000-00740000 rw-p 00048000 08:06 660648 /libs/root_5.27_2/lib/libPostscript.so
00740000-007cf000 r-xp 00000000 08:06 660656 /libs/root_5.27_2/lib/libPhysics.so
007cf000-007d1000 r--p 0008f000 08:06 660656 /libs/root_5.27_2/lib/libPhysics.so
007d1000-007d2000 rw-p 00091000 08:06 660656 /libs/root_5.27_2/lib/libPhysics.so
007d2000-007d3000 rw-p 00000000 00:00 0
007d3000-0081b000 r-xp 00000000 08:06 660731 /libs/root_5.27_2/lib/libThread.so
0081b000-0081d000 r--p 00047000 08:06 660731 /libs/root_5.27_2/lib/libThread.so
0081d000-0081e000 rw-p 00049000 08:06 660731 /libs/root_5.27_2/lib/libThread.so
0081e000-0081f000 rw-p 00000000 00:00 0
0081f000-00828000 r-xp 00000000 08:06 1052316 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00828000-00829000 r--p 00008000 08:06 1052316 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00829000-0082a000 rw-p 00009000 08:06 1052316 /lib/tls/i686/cmov/libcrypt-2.11.1.so
0082a000-00851000 rw-p 00000000 00:00 0
00858000-0086d000 r-xp 00000000 08:06 1052328 /lib/tls/i686/cmov/libpthread-2.11.1.so
0086d000-0086e000 r--p 00014000 08:06 1052328 /lib/tls/i686/cmov/libpthread-2.11.1.so
0086e000-0086f000 rw-p 00015000 08:06 1052328 /lib/tls/i686/cmov/libpthread-2.11.1.so
0086f000-00871000 rw-p 00000000 00:00 0
00871000-00884000 r-xp 00000000 08:06 1052320 /lib/tls/i686/cmov/libnsl-2.11.1.so
00884000-00885000 r--p 00012000 08:06 1052320 /lib/tls/i686/cmov/libnsl-2.11.1.soAborted
Pleas help.
BR
Erik