Clear()

Hi,
in your example $(ROOTSYS)/eventa.cxx in loop on all events is:

for (Int_t i=0;i<nevent;i++) {

nb += T->GetEntry(i);
event->Clear();
}

in $(ROOTSYS)/stress.cxx in function stress8read(Int_t nevent):

for (Int_t ev = 0; ev < nev; ev++) {
nb += tree->GetEntry(ev); //read complete event in memory
}

WITHOUT Clear(), why ?

I need clear array with Clear() for reading (only) any TTree ?
If yes, I need also call Track::Clear ( Event::Clear(“C”) ) ? or Clear() is only for write any TTree ?

Thanks, Jan

Sorry to my poor English.

You can remove the call to event->Clear.
This call was necessary with old versions of ROOT.
I have updated this file in the CVS version.

Rene

Thanks Rene,
now in the case writing any TTree, I need Clear() pointer to TClonesArray:

in *.h:
class THit

public:
void Clear(Option_t *option="") { ; } // this is OK, empty ?!

class TEvent
private:
UShort_t fNHits;
TClonesArray *fHits;
public:
void Clear(Option_t *option="");

in *.cxx:
TEvent::Clear()
{
fHits->Clear(); // I need this ?! or fHits->Clear(“R”)
fNhits = 0;
}

Thank you for your patience.