Hi Colin, TTree has two functions Process(const char *selectorname,..) Process(TSelector *sel,,) In your case, use the second form Rene Brun On Thu, 12 Dec 2002, Colin Bernet wrote: > > Hello, > > I just gave a try to TSelector. I think it is great, and I'm really eager > to start using it. > > But how can I get access to my histograms after filling them ? I couldn't > find a TSelector* TTree::GetSelector() which would return the last > TSelector used. I also looked in the TTreePlayer > class, without success. > > What I did is booking the histograms in myslector.h, creating and filling > them in myselector.C > > I don't want to draw or fill them in Terminate, I would like to get access > and see later : say you try a fit in Terminate, and it doesn't work. Then > it is nice to have a pointer to your histogram, and try again with another > function. If you want to continue the next day, you can write the histo to > file : > > mytree.GetSelector()->fHsomething->Write() > > Could this function be implemented, or am I missing something ? > > eg : > > in TVirtualTreePlayer, add a TSelector* and a GetSelector() function. > > Int_t TTreePlayer::Process(TSelector *selector,Option_t *option, Int_t > nentries, Int_t firstentry) { > fSelector = selector; > ... > } > > TTree::GetSelector() is then just returning > this->GetPlayer()->GetSelector() > > I'm using root 3.03/09 > thank you ! > > Colin > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET