Hello All, [Root 2.23/8 on WinNT 4sp5] I have a root file with 25K+ trees, each with 1K+ branches with 6 leaves of simple data types (int, float). It's not a very typical (as I understand it) root file in that each branch is completely separate from others (created with branch->Fill() as opposed to tree->Fill() which, BTW resulted in a 1/3 the file size in half the time). I have a few questions concerning this file; - when updating the file I do: TTree *tree = (TTree *)f_root->Get(temp_t); if (!tree) tree = new TTree(temp_t, ""); // branch = tree->GetBranch(temp_s); // if (branch) // delete branch; branch = tree->Branch(temp_s, &data, "t/i:of/F:hf/F:lf/F:cf/F:v/i", 4800); branch->Fill(); tree->Write(NULL, TObject::kOverwrite); delete tree; which despite the overwrite parameter will still add a branch (instead of replacing it) if a branch with a given name already exists. What should I do to force replacing an existing branch? As you can see, I tried to delete it before creating a new version of it, but that raises an exception. - The IsSortable returns TRUE yet new/updated trees are added to the end of the tree. How to keep trees, branches sorted (by name)? - On a root file with this many trees doing f->Get() is very time consuming. Is there a faster way? The update data is sorted (and so initially, see above, is the root file). I read the examples that use GetEntriesFast, but how does one see/set which tree is "active" for writing? - The AutoSave mechanism seems not to work under WinNT... reading/writing large root files will happily exhaust all (virtual)memory and force killing the program (that's why I immediately write a tree and delete it from memory... is there a better way?). Misc: TBenchmark: - The class description states that specifying an existing name with Start() resets that bench's parameters... on my system it does not. Also, wouldn't it useful to be able to force freeing of a slot in the bench table, for example by an additional parameter to Show? Thanks, /Mariusz
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:42 MET