Open vepadulano opened 6 months ago
Hi @vepadulano
This tutorial shows how to write a C++ stand alone application that reads and writes a custom class to a tree https://github.com/root-project/root/tree/master/tutorials/tree/dictionary
Do you think this tutorial solves the issue or the tutorial should be evolved?
Explain what you would like to see improved and how.
From https://its.cern.ch/jira/browse/ROOT-5157
Chapter on schema evolution support needs to be added to the Users' Guide. For example bases in the scenario:
Simplest implementation is to have Cartesian coordinates as private attributes;
The users find that they most often use radius and azimuth, hence decide to store spherical coordinates instead of (x,y,z);
Actually, colliders use eta more often than theta, so that the internal state is now given by (r, phi, eta).
a. Simplest implementation is to have only the energy as private member;
b. Because the number of requests for the transverse energy is very high, the users want to optimize the speed by keeping Et as private member;
c. Well, it happens that disk space is short and e() is rarely called, so that it makes sense to reduce the size of the Hit class by dropping the energy member and computing the energy just when calling the method e(). They also found that the detector parameters used to store data in version b are wrong, so that one needs to scale the energy by 1.3 only for version b (a and c are correct).
Could you please provide a working example in which data are saved and fetched with different combinations of (1, 2, 3)x(a, b, c) (at least with 1a, 2b, 3c)?
i) define
ii) Because the crazy developers of Hit decided to make such class variable size, one needs to store a vector of pointers instead of objects:
iii) Disk space is very short! We cannot waste the single 32-bits word used by the STL vector...
Please, provide some working example that shows how to write and read all these 3 evolutions of Track (you may use whatever version of Hits).
[Courtesy of Diego Casadei]
ROOT version
Any
Installation method
Any
Operating system
Any
Additional context
No response