Branch flag value

The error generated when I run the selector is-
Error in TTreeReaderValueBse::CreateProxy(): The branch flag contains data of type bool. It cannot be accessed by a TTreeReaderValueint

Hi Muthusamy,
this does not look like a question :slight_smile:
You are accessing a branch of type bool with a TTreeReaderValue<int>, and the error message is pointing out just that.
You have to switch to a TTreeReaderValue<bool>.

When I use the same code in another selector created for the same tree, this error message does not show up and infact the compiler does not stop running. Could you also elaborate on how I should go about changing the type of the branch, sorry I am a beginner.

You have to find out which branch is the bool that you are accessing as int.
If another selector is fine, you probably introduced an error in this particular selector somewhere. It is hard to tell without seeing the code and the data.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.