Ay, that is the rub. For if I use a ROOT object (I did use TLorentzVector) I get that warning in the subject. Now, documentation says that I should use split level -1 if class has a custom streamer, but I still want to use default splitlevel=99 in all other cases.
Now, the question is: how can I know whether “classname” named class has a custom streamer or not?
[quote]Now, the question is: how can I know whether “classname” named class has a custom streamer or not? [/quote]ifTClass::GetClass(classname)->GetStreamer()!=0 || TClass::GetClass(classname)->GetClassInfo()->RootFlag() & 1() is true.
I’m sorry, I realize now that the description of my problem was wrong.
I actually have the problem with objects like std::vector.
Summary: if I use splitlevel -1 or 0, no sub-branch is created; if I use a positive (e.g. 99) splitlevel, all branches ae produced but I get that streamer warning:
Using split mode on a class: TLorentzVector with a custom Streamer
The final question is this: which split mode/alchemy have I to use to have all the branches of a std::vector and no complain by ROOT?
Thank you again.
In attach, an example producing a tree of std::vector and one of std::vector (a custom, CLASSDEFined class) and printing the resulting branch structure.
Currently we allow for the content of TClonesArray and stl collection to be split eventhough they do have a custom streamer. This do indeed induce the warning message you are talking about. In some case (like in particular) TLorentzVector, this warning can be safely ignored since the Streamer does not contain any code that is needed in your case (the only additional code is to support read older version of TLorentzVector (file produced by version of ROOT prior to 2002)).
Cheers,
Philippe.
PS. We plan on introduce a new feature to TClass to allow the class implementer to tell whether the custom streamer should cancel splitting or not, this would remove the (spurrious) error message.