add a tries member and replace local variable with it#80
add a tries member and replace local variable with it#80tomeichlersmith merged 7 commits intotrunkfrom
Conversation
instead of using a local variable in the Process::run production mode code, we simply use the member variable of the event header. This naturally means the number of tries it took to generate any event will be stored alongside the weight in the header.
This comment was marked as outdated.
This comment was marked as outdated.
add comments to some setters of importance about if downstream producers can/should call them
tomeichlersmith
left a comment
There was a problem hiding this comment.
Just have a few typos I noticed when re-reading in the browser.
|
Converting to draft because I just realized that the |
this is more style-friendly and I think more understandable from a header-reading point of view This also contains a rewrite of the get*Parmeter functions to manually check for existence of the input parameter name before attempting to access it - this means the exception thrown will be one of ours and hopefully more understandable
We cannot follow the incrementation from within the EventHeader since it is `Clear`ed on each event (successful or not) so we return to using the numTries mechanic currently on trunk. Besides that, we also carry the numTries counter across the num events completed boundary by using modulo instead of greater-than when comparing to the maximum number of tries. This incures that the sum of the number of tries is always equal to the configures maxEvents.
|
Alright, I've actually tested this with more thorough-ness now. I will need to re-do the v2/v3 interop testing since so much has changed since then, but I can at least show that the functionality of the storage of the number of tries is working. In the context of LDMX-Software/framework-testbench@d7d0c59 We want to make sure that the sum of the number of tries in the output file is always equal to the number of events actually tried. We can do this with this branch of Framework by comparing the number of tries in the output file to the status line printed on each event processing reported by the Framework during processing. In the below, I use framework-testbench's configs, scripts, and processors. Simple Case, no
|
|
(Editor's Note: The results here are the same as the above comment that I marked as "Outdated" but I manually copied them here to show the procedure and scripts I used from framework-testbench and to show that I did indeed double check the results were the same.) For these notes v2 and v3 reference the version of EventHeader as defined in the EventHeader Version InteropWriting and reading the EventHeader within either of its versions works smoothly (as expected). The v2 files don't have a Reading v3 EventHeaders with v2 EventHeaderThis could occur if a user is given a file generated by someone else. When running ROOT correctly identifies that the older schema is there. Since our Framework operates in 'slow-cloning' (i.e. event-by-event cloning), we expect the data not present in the old version will not be copied. It then correctly points out the missing subbranch. This is important since the file output from the Framework when reading a v3 EventHeader with v2 EventHeader will have Now, as ROOT points out, if we were to clone the EventHeader from the input file to the output file in "fast-cloning" mode (i.e. where we just copy the compressed baskets directly), then the
For these two reasons, I don't think the funky behavior of the Reading v2 EventHeaders with v3 EventHeaderWhen running with v3 EventHeader and reading a file written with v2 EventHeader, we do not see any messages printed. Looking into the resulting output file, the EventHeader is not altered and does not have a which isn't exactly what I expected to happen, but I suppose ROOT is making the conservative decision to leave the older class version in an unaltered state schema-wise. |
Instead of using a local variable in the Process::run production mode code, we simply use the member variable of the event header. This naturally means the number of tries it took to generate any event will be stored alongside the weight in the header.
Still To Do