Hi Rooters:
What may be wrong in a short code used TTree::Fill method.
Code adds new records to Ttree. The next error message was
received after a lot of records has been added.
"Fatal in <operator new>: storage exhausted. Aborting"
DBX showed me the place of error. It was a call of Fill
method of TTree.
Code was used on Alpha computer (Digital Unix) with Root
version 2.24.
A key part of code is here
TFile *FOUT = new TFile(cfo,"update"); //== Ouput File
FOUT->Print();
TTree *FCube = (TTree*) FOUT->Get("FCube");
FCube->Print();
FCube->SetBranchAddress("Spectrum",buf4.fbuf);
while(ix <= nx)
{
Cube1->GetEntry(i);
Cube2->GetEntry(i);
Cube3->GetEntry(i);
for(iz = 10; iz < nz; ++iz)
{
buf4.fbuf[iz] = (float) buf1.sbuf[iz]
+ (float) buf2.sbuf[iz]
+ (float) buf3.sbuf[iz];
}
FCube->Fill(); //== Line 133 of code ref. by dbx
//== New values of ix and i
}
FCube->Write();
FOUT->Close();
Andrei
----------------------------------------
Andrei Daniel
FLNR, JINR, Dubna 141980, Russia
Tel: (7-09621)64568 Fax: (7-09621)65083
daniel@cv.jinr.ru
PS
Initial state of TTree and Output of DBX:
TFile** /u3/daniel/CF252_95WN.root
TFile* /u3/daniel/CF252_95WN.root
KEY: TTree FCube;120 Cf252 data of 1995 SUM OF 3 Weeks
KEY: TTree FCube;119 Cf252 data of 1995 SUM OF 3 Weeks
TFile: name=/u3/daniel/CF252_95WN.root, title=, option=update
****************************************************************************
**
*Tree :FCube : Cf252 data of 1995 SUM OF 3 Weeks
*
*Entries : 362526 : Total Size = -978479535 bytes File Size =
810541330 *
* : : Tree compression factor = 14.73
*
****************************************************************************
**
*Branch :Spectrum : fbuf[8192]/F
*
*Entries : 362526 : Total Size = -980998152 bytes File Size =
808022713 *
*Baskets : 362526 : Basket Size = 32000 bytes Compression= 14.73
*
*...........................................................................
.*
1 (unknown)() [0x3ff8019839c]
2 __tis_raise(0x3ffc0082590, 0x141ee3a34, 0x3ff8011036c, 0x3ffc0080c50,
0x3ff8015acb4) [0x3ff80110368]
3 raise(0x3ff8011036c, 0x3ffc0080c50, 0x3ff8015acb4, 0x0, 0x3ff8017167c)
[0x3ff8015acb0]
4 abort(0x3ffff7969f8, 0x0, 0x0, 0x0, 0x3ff00000000) [0x3ff80171678]
5 Abort__11TUnixSystemXi(0x0, 0x0, 0x3ff00000000, 0x3ffc0080310,
0x3ffbeb98988) [0x3ffbed8015c]
6 DefaultErrorHandler__XiUcPCcPCc(0x3ffbeb98ac8, 0xbb8, 0x0, 0x1,
0x11ffeaee8) [0x3ffbeb98984]
7 ErrorHandler(0x3ff80195410, 0x1, 0x10, 0x3ffc0080e18, 0x0)
[0x3ffbeb98ac4]
8 Fatal__XPCcPCce(0x3ffbf661f40, 0x3ffbf661f28, 0x100000, 0x1, 0x0)
[0x3ffbeb98cf0]
9 __nw__XUl(0x0, 0x100000, 0x3ffbf6629ac, 0x0, 0xffffff) [0x3ffbf662558]
10 __nwa__XUl(0x3ffbf6629ac, 0x0, 0xffffff, 0x100000048, 0x3ffbec8f780)
[0x3ffbf6629a8]
11 __ct__4TKeyXP7TObjectPCcCi(0x14052be88, 0x0, 0x14205a768, 0x14205a768,
0x100000001) [0x3ffbec8f77c]
12 Write__7TObjectXPCcii(0x14205a768, 0x100000001, 0x0, 0x0, 0x1010c379e)
[0x3ffbec9e858]
13 AutoSave__5TTreeXv(0x3ffbfc5cf80, 0x140517208, 0x8000, 0x14205a448,
0x141f88f88) [0x3ffbfc5accc]
14 Fill__5TTreeXv(0x2000, 0x9e, 0x402, 0x80aa1, 0x3ffffd38000)
[0x3ffbfc5cf7c]
15 main() ["add.cpp":133, 0x120003808]
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:28 MET