-
Notifications
You must be signed in to change notification settings - Fork 60
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
Frame in memory interface #278
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 tasks
Using a mutex to guard the internal map. Not yet a policy with possibility to disable locking from the outside
Use a unique_ptr<mutex> to preserve default movability of things
- Make them non-copyable - Fix read_tests to use const references instead of copying
If REQUIRE is the last statement in a function run on a thread, clangs ThreadSanitizer triggers in the Catch2 internals.
Makes all thread test cases consistent
- Use case came up in k4SimDelphes
tmadlener
commented
Jun 20, 2022
Closing this, as it is fully contained in #287 and will be merged as an “atomic” commit introducing the Frame |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BEGINRELEASENOTES
podio::Frame
as a generalized (event) data container with the necessary prerequisites to extend this basic implementation with all the planned functionality later.ENDRELEASENOTES
This is a first version of the in-memory interface of the
Frame
proposal. I am putting this here to gather early feedback, mainly on the user interface and on some of the proposed functionality. At this point only the basic skeleton for thepodio::Frame
is present and much of the foreseen functionality is still missing. However, the interface should be somewhat stable already as most of that functionality should be hidden, or not observable through the interface. One thing that could still influence the interface could be the choice of policies that we want to offer. I have put some of my proposals below.Having this discussion early enough might make it possible to split this feature into several pull requests instead of having one extremely large one.
podio::Frame
interfaceThe Frame is implemented via type-erasure. This allows us to have different policies but only one user facing class with value semantics and the possibility to construct from different raw data types 1. The current public interface of the Frame looks essentially like this:
Some notes (about the actual implementation that are not visible in the above version):
put
andget
methods usestd::enable_if
to only be available for collections added by podio.put
method usesstd::enable_if
to force users to explicitly pass a temporary or relinquish ownership viastd::move
.{put|get}Parameter
functionality provides the extra data / meta data functionality and is using theGenericParameters
class under the hood.std::enable_if
to only be available for the types that are actually supported (int
,float
,std::string
andstd::vectors
of those)getParameter
is either aconst T&
or aT
(forint
andfloat
).putParameter
to enhance the usability, e.g. for passing raw string literals or initializer lists.Planned policies
There are a few policies that I have already in mind, but this is still open for discussion
put
interface to have more fine grained control, instead of having a "global" policyget
interface to have more fine grained control, instead of a "global" policy.Preliminary TODO list
Targets developon top of developdiff of once that is mergedFootnotes
This first proposal is still missing these features at the moment. ↩