Re: checking result of SetBranchAddress

From: Alexander Mann <amann_at_uni-goettingen.de>
Date: Fri, 11 Sep 2009 18:25:04 +0200


Hi Philippe,

> However what you can do in your routine is the following:
> ...
> This test is stricter than necessary but should work well enough.

I tried to code sth like this myself, but it failed (like your proposal) because of the fact that I'm using STL objects (none derived from TObject or similar), so that typeid returns rather strange names

  ( ERROR ) P2C1V3 : ROOT Does not known about: PSt6vectorIfSaIfEE

which I cannot compare against the ROOT internal names.

Which is strange because ROOT actually knows both names (-> "The pointer type give (vector<bool>) does not correspond to the class needed (vector<int>) by the branch:"), but I was not able to extract the mechanism ROOT uses to produce these messages. (It's in some function called TTree::CheckBranchAddressType.)

> or to catch the error message using a custom error message handler ...

Could you point me to a tutorial / web page where this is described? I guess this would be the easiest way then.

cu,
Alexander Received on Fri Sep 11 2009 - 18:25:19 CEST

This archive was generated by hypermail 2.2.0 : Fri Sep 11 2009 - 23:50:02 CEST