-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expansion of the TStreamerInfo actions. #16995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This enables the StreamerInfoActions to enable the shortcuts that are possible in that case.
The version recorded 'here' is the version of the TStreamerInfo class not the user class
Even without schema evolution, the representation of a collection of enums on file is a `vector<int>` so `TStreamerElement::fType` and `TStreamerElement::fClassObject` should point to `vector<int>` while `TStreamerElement::fNewType` and `TStreamerElement::fNewClass` should point to the current in memory representaition `actualCollectionType< actualEnum >` that will know/remember what is the actual enum in memory representation.
Combine the code with the one use for the text actions
Combine the code with the one use for the text actions
To use be for case where the read and write implementation differs only slightly
To be used for function template that can be used for more than one actual looper (usually in conjunction with the LoopOverCollection template
Allow to share code with the collection loopers.
Test Results 18 files 18 suites 3d 21h 3m 41s ⏱️ For more details on these failures, see this check. Results for commit 17097bc. ♻️ This comment has been updated with latest results. |
ef312d6 to
c9d3c07
Compare
dpiparo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this major improvement. I added some comments for the review. In general I believe it could be very useful to take this opportunity, perhaps to the documentation of TStreamerInfo, to add a 1 page explanation of what this major overhaul does, also explaining simply, without code and only in English, what the pre-existing code was doing.
When executing the streaming on an object, the execution of the case covered by the case In its previous implementation (which is still used in a few rare cases involved backward compatibility), the case |
This add TStreamerInfo actions for the case of base class, nested objects, externally assignment streamer and array thereof (
kBase,kAny,kStreamer,kStreamLoop) for both scalar and collection cases. It also expands the scope of the writing actions to cover the collections cases and the new cases (kBase,kAny,kStreamer,kStreamLoop)Companion PR of root-project/roottest#1224
When executing the streaming on an object, the execution of the case covered by the case
kBase,kAny,kStreamer,kStreamLoopwas migrated from using the legacy code within the source fileTStreamerInfoReadBuffer.cxxandTStreamerInfoWriteBuffer.cxxwhich is based on a pair of 'giant' switch statement to the newer framework based on the composition ofTStreamerInfoActions(and the corresponding collection:TActionSequence). The change fromswitchstatement to a set of function pointers allows to improve performance by executing for each data members only the code strictly necessary.In its previous implementation (which is still used in a few rare cases involved backward compatibility), the case
kBase(for both reading and writing) was forcing the use of theswitchstatement for all the data members of the base classes. This prevented the use of the new convert-on-write actions (with no existing corresponding implementation in the writeswitchstatement) that are necessary for supporting theEnumswith non default size.