Hi
In C++ ,in order to assign the value of a branch to a variable i would write something like this:
float data_tau1_pt;
data_tree->SetBranchAddress("pt_1",&data_tau1_pt);
I am now using pyroot and wrote the corresponding code like this:
data_tau1_pt = float()
data_tree.SetBranchAddress("pt_1",data_tau1_pt)
But i get the following error:
TypeError: none of the 3 overloaded methods succeeded. Full details:
Int_t TTree::SetBranchAddress(const char* bname, void** add, TBranch** ptr = 0) =>
could not convert argument 2
Int_t TTree::SetBranchAddress(const char* bname, void* add, TClass* realClass, EDataType datatype, Bool_t isptr) =>
takes at least 5 arguments (2 given)
Int_t TTree::SetBranchAddress(const char* bname, void* add, TBranch** ptr, TClass* realClass, EDataType datatype, Bool_t isptr) =>
takes at least 6 arguments (2 given)
As per my understanding passing TBranch is optional. So the error is with the variable to which the value is to be assigned, in my case with ‘data_tau1_pt’.