Hi, >From your description, the only reason I would see that happenning is that you cut eliminites all events (Try without any cut). For any further investigation, I would need a working example reproducing the problem. Cheers, Philippe. -----Original Message----- From: Alberto Pulvirenti [mailto:alberto.pulvirenti@ct.infn.it] Sent: Thursday, May 20, 2004 8:05 AM To: Philippe Canal Cc: ROOT mailing list Subject: RE: [ROOT] TEventList and TTree->Draw() With a method which loads the file and reads data, I get some data, then the tree is there and it is filled. This is the reason because I am wandering about why the event lists and so on do not work Cheers, Alberto On Wed, 2004-05-19 at 17:38, Philippe Canal wrote: > Hi Alberto, > > It seems like you tree is empty. > Also in your case I recommend against using this style of branch making. Instead > you should generate the dictionary for 'branch' (and you should named it something else ... this is confusing). Then you could do > > > branchData = new branch(); > t_branchData = t_data->Branch ("branchData", "branch", &branchData, 100000000); > > Then make sure that > t_data->Fill(); > is properly called. And make sure that the file is saved at the end. > t_file->Write(); > > Cheers, > Philippe. > > -----Original Message----- > From: owner-roottalk@pcroot.cern.ch > [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Alberto Pulvirenti > Sent: Wednesday, May 19, 2004 2:35 AM > To: ROOT mailing list > Subject: [ROOT] TEventList and TTree->Draw() > > > Hi, > > I need to manage a TTree object which contains a unique branch, which is > in the form of a class that does not inherit from TObject. > Is is created this way: > > ---------------------------------- > > // Tree declaration > t_data = new TTree("t_data","data tree"); > > // autosave when 100 MB written > t_data->SetAutoSave(100000000); > > // Data objects for the tree > branchData = new branch(); > branchNoisyPixels = new branchCoordinates(); > > t_branchData = t_data->Branch ("branchData", branchData, > "parameter/D:eventNumber/D:plane/D:chip/D:multiplicity/D:column/D:row/D:sigma2C/D:sigma2R/D:clusterSizeC/D:clusterSizeR/D",100000000); > > --------------------- > > Now, when I open the file which contains it and I try to draw a member > via clicking on its name in a TBrowser, I get no plots. > Moreover, if I try to use the TTree->Draw() method from the ROOT prompt, > I get no plots. > I made also a trial to use TEventList: > > ---- > TCut cut_ev = Form("eventNumber < %d", evMax); > TCut cut_p1 = Form("plane == %d", plane1); > TCut cut_p2 = Form("plane == %d", plane2); > t_branch->Draw(">>list1", cut_ev && cut_p1); > TEventList *list1 = (TEventList*)gDirectory->Get("list1"); > t_branch->Draw(">>list2", cut_ev && cut_p2); > TEventList *list2 = (TEventList*)gDirectory->Get("list2"); > Int_t N1 = list1->GetN(); > Int_t N2 = list2->GetN(); > cout << "Entries in the given planes: " << N1 << " , " << N2 << endl; > ---- > > and in this case I get an error message which tells me that the object > "list1" and "list2" are 0x0 pointers. > > Is there some techique to deal with these data? > > Thanks, > Alberto >
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET