I encountered a strange behaviour with a TClonesArray, which may eventually be caused by a selection of the wrong operator of the parent class TObjArray?
virtual TObject*& operator[](Int_t i)
virtual TObject* operator[](Int_t i) const
When I create an TClonesArray GetEntries shows that it is empty, but as soon as I access an Array Entry with the operator[](Int_t i) member function a random Entry seems to be created.
my root version is 4.00/08
example Code:
root [4] TClonesArray test2(“TObject”,128)
root [6] test2->GetEntries()
(const Int_t)0
root [7] test2[6]
(class TObject*)0x8e39b30
root [8] test2->GetEntries()
(const Int_t)1
A TObjArray doesn’t show this behaviour.
cheers
Dirk