thanks rene, spot on, that has solved the problem in one go.
..of course i am interested in turning my 38 Branch calls into one if
possible! (or if you have any other suggestions! :) )
cheers,
Dan.
Rene Brun wrote:
> Dan,
>
> I cannot test your problem without your input data set. However, I
> strongly suggest to change
> tree = new TTree("data","SPData");
> file = new TFile("temp/SPDAQTree.root","recreate");
> for
> file = new TFile("temp/SPDAQTree.root","recreate");
> tree = new TTree("data","SPData");
>
> I have a comment on your class rootTree. Your 38 calls to tree->Branch
> can be replaced by one single call ::)
>
> Rene Brun
>
> Dan Holmes wrote:
>> Hi ROOT support,
>>
>> ..sorry if i missed this in some faqs somewhere..
>>
>> I have problems with some code that fills and writes a tree. It was
>> working ok on slc3/root 5.04, (linked afs version) for many years but
>> now i have upgraded to slc4, downloaded binaries (and am trying 5.16,
>> 5.18).
>>
>> I have attached my set of .cpp files (makeTree wraps readData which
>> uses the rootTree object). I suspect you don't want to look at any of
>> them apart from rootTree.cc.
>>
>> The whole thing compiles ok.::
>> g++ -o makeTree.exe makeTree.cpp `root-config --cflags --libs`
>> The problem comes when the destructor to readData is called and
>> rootTree class tries to do TTree*->Write(). I get the horrible error
>> string attached.
>>
>> Anyone know what i'm doing wrong or have any pointers??
>>
>> cheers,
>>
>> Dan.
>
Received on Thu Jan 31 2008 - 13:48:20 CET