-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Allow SwitchProducer cases to declare different transient products #40104
Allow SwitchProducer cases to declare different transient products #40104
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40104/33088
|
A new Pull Request was created by @wddgit (W. David Dagenhart) for master. It involves the following packages:
@cmsbuild, @smuzaffar, @Dr15Jones, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@makortel We were discussing adding a separate check that would still throw an exception if a process was configured to get one of the transient products that is now allowed by this pull request. So it would still be OK for the producer to declare it produces them, only getting one of them would cause the exception. There was some discussion whether this extra check was worth the effort to implement. I think in the end we were leaning toward not implementing this extra code. The original idea was to not declare the SwitchProducer produces such products. The problem with that implementation is that when the SwitchProducer constructor is executed we do not know which products are produced by all cases. So this would be difficult (not impossible). A second idea was to not create the switch alias to such cases. But it seems to me that has the same problem. These two implementations seem difficult and not worth the effort. Plus they complicate the existing code. Given that in the long run we'd like to move on from SwitchProducer altogether, my recommendation would be to not implement this. I'll add one more comment. One other idea I had. It seems less of a hack and less difficult than the other options we discussed earlier. We could add an addition bool data member to the BranchDescription in the Transient data member. It could flag products which should not be gotten. Then the SwitchProducer ProductResolvers could check that and throw an exception if those products were retrieved from the event. If you think this idea is worth pursuing, or one of the other possible implementations, then let me know and I'll extend this PR to add that. Otherwise, I'll just leave it as is, we can be done with this and I'll start working on something else. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d10030/29089/summary.html Comparison SummarySummary:
|
edm::test::TestProcessor testProcessor1{config1}; | ||
|
||
edm::test::TestProcessor::Config config2{baseConfig2}; | ||
edm::test::TestProcessor testProcessor2{config2}; |
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.
How about adding here tester.test()
call and checks for the product values? The necessary code gets exercised (for now) via TestProcessor
constructor, but I think it would be good to ensure that the processor itself runs and gives correct values.
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.
Done. A good suggestion. Thanks.
Let's proceed with this way then. (for now, at least) |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40104/33097
|
please test |
Pull request #40104 was updated. @makortel, @smuzaffar, @Dr15Jones can you please check and sign again. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d10030/29125/summary.html Comparison SummarySummary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Allow SwitchProducer cases to declare different transient products. Currently we throw an exception if all cases do not declare the same produced products. With this, we allow differences for products marked as transient in their dictionary.
PR validation:
Extends an existing unit test to verify differences in declared transient products do not cause an exception to be thrown.