//
// Insert object of given type
//
- if (!fElements) fElements = new TObjArray(1000);
+ if (!fElements) fElements = new TObjArray(10000);
+ if (fElements->GetSize()<=fCurrentIndex) fElements->Expand(fCurrentIndex*2);
TTreeDataElement* element = (TTreeDataElement*)fElements->At(fCurrentIndex);
if (!element) {
element = new TTreeDataElement(type);
//
// Build the Tree
//
- if (fTree->GetEntries()>0) return;
- fTree = new TTree(GetName(),GetName());
+ if (fTree && fTree->GetEntries()>0) return;
+ if (!fTree) fTree = new TTree(GetName(),GetName());
Int_t entries = fElements->GetEntriesFast();
fBranches = new TObjArray(entries);
}
-TTreeStream &TTreeStream::operator<<(Char_t *name)
+TTreeStream &TTreeStream::operator<<(const Char_t *name)
{
//
// Endl