The expression mu_staco_pt[i] is a vector (mu_staco_pt is a pointer, pointer[i] is a pointed object, vector in your case).
TH1F does not have version of Fill, which accepts vector. So, you have to use vector instead of pointer to vector or do something else - depends on what do you really want to do.
I have thought of that, but however the *mu_staco_pt is just one of the many variables in the header file that is generated by the MakeClass function, that is something that I can’t change. I can only change what I do within the for loop to apply selection cuts and/or plot it.
I have thought of that, but however the *mu_staco_pt is just one of the many variables in the header file that is generated by the MakeClass function, that is something that I can’t change. I can only change what I do within the for loop to apply selection cuts and/or plot it.
Cheers
Jason[/quote]
Jason, mu_staco_pt is pointer, mu_staco_pt[i] is a *(mu_stack_pt + i) - dereferenced increased value of pointer, which is a vector.
What is your ‘i’? Are you sure mu_staco_pt pointer is initialized correctly? Are you trying to iterate on this vector? If yes, you can do: