[ROOT] Changing the name of a Leaf.

From: Maurik Holtrop (maurik.holtrop@unh.edu)
Date: Thu Jun 15 2000 - 00:42:09 MEST


Dear Root,

I wrote a large amount of data files with a Class that had an incorrect name
for one of it's data members. The name of this variable did not reflect the
contends of this variable, which is extremely confusing to the user.
I tried changing the name in the Class, and then read this class. Everything
seems to work ok, however, the variable with the new name is now only filled
with zeros.

The streamer is constructed correctly by rootcint, and looks like it would
fill the data into the correct place. It just does not work when reading a
root tree from a file.

How can I have my name change?

I am assuming something goes wrong in SetBranchAddress, in the call:

fEventChain->SetBranchAddress("DCPB",&fcaDCPBStore);

where fcaDCPBStore is the name of the TClonesArray of DCPB objects, and DCPB
is the name of the object in the root tree on the file (but the definition
of DCPB changed the name of 4 data members). 

One of variables in the file, when I browse it, is DCPB.Th_cc, in the class
the variable is called R_v (distance from production vertex to beam.) This
seems to be causing the address to not get assigned properly.

Can I fix this problem in any way? (setting the adress by hand?)

Thank you much,

	Maurik



-- 
-----------------------------------------------    -----------------------
 Maurik Holtrop              web: http://www.physics.unh.edu/Maurik
 UNH Physics Department      tel: (603) 862-2019 | fax: (603) 862-2998
 DeMeritt Hall               mailto:maurik.holtrop@unh.edu
 Durham, NH 03824            Home: (603) 659-8765
----------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET