Hi Dan, I have investigated your problem and found the solution. Your first file has a TNtuple (with float variables). Your second file has a TNtupleD (with double variables). You have generated the header file via TTree::MakeClass on the TNtuple file. Then you use it on a TChain combining the two files. This is wrong. You should have done the inverse. Anyhow a simple solution is to replace Float_t E_1; Float_t px_1; Float_t py_1; Float_t pz_1; Float_t E_2; Float_t px_2; Float_t py_2; Float_t pz_2; Float_t theta; Float_t phi; Float_t ebeam; by Double_t E_1; Double_t px_1; Double_t py_1; Double_t pz_1; Double_t E_2; Double_t px_2; Double_t py_2; Double_t pz_2; Double_t theta; Double_t phi; Double_t ebeam; and your script will work correctly Rene Brun On 4 Mar 2003, Dan Krop wrote: > Hi, > I tried 3.05/02 and the behavior is the same. I've made an even > simpler example which requires no external shared libs. It is on the > same website: > > http://dustbunny.physics.indiana.edu/~dkrop/root_problems > > Note that the location of the ntuple files must be correctly declared in > the header file before testing. I would be interested if anybody can > reproduce the behavior I have seen. > > Thanks again, > Dan > > On Tue, 2003-03-04 at 04:15, Rene Brun wrote: > > Hi Dan, > > > > I cannot test your system because your external shared lib cannot run on > > my systems. However, I suggest you move to one of the pro versions > > 3.03/09, 3.04/02 or the latest version 3.05/02. Problems in some > > conditions when moving to a new file in a TChain were fixed in these > > versions. > > > > Rene Brun > > > > On 3 Mar 2003, Dan Krop wrote: > > > > > Hello, > > > I'm seeing some unexpected behavior when using the MakeClass method on > > > a TChain. I'm using RH 7.3. One of the files in the chain was created > > > with version 3.03/04 and the other with 3.03/07. When I chain them > > > together on the machine with 3.03/04, do a MakeClass, and then run the > > > analysis loop, it seems to not find the correct entries in the tree when > > > it gets to the 2nd file- it gives random numbers for branch entries in > > > those events. Since the ntuples are rather large and there is a > > > necessary supporting library, I've created a web page with links to > > > download all the files needed to reproduce this problem. The page is > > > at: > > > > > > http://dustbunny.physics.indiana.edu/~dkrop/root_problems > > > > > > Note that when each file is analyzed separately, i.e. not in a TChain, > > > no problems are found. > > > > > > Thanks in advance, > > > Dan > > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET