@pcanal I have a TTree with a branch of type [1][1][48][48]/b. It is necessary that for future data I change it to [1][1][48][48]/F. Still, I would like to be able to read both old and new data with the same software. To read values from the array I used to declare unsigned char pcd[a][b][c][d], set the branch address to it with SetBranchAddress and loop over the tree. Now, the variable type has to be changed accordingly to the branch type. With new “auto” wonders in C++ and ROOT, I wonder if it is possible to automatically set a proper type for the pcd variable?
Unfortunately schema evolution is not supported for “leaflist” branches (i.e. your cases) and thus you will have to read the 2 set of files separately or if you use a TChain you will need to switch the branch address at each file boundary.
If the data was the same size (not your case, eg long to float), then since the memory area would have been the same size, a single SetBranchAddress would work but still require to interpret the data differently for each file.