Implement PathStateCapture and PathStateRelease#48598
Conversation
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48598/45564
|
|
A new Pull Request was created by @fwyzard for master. It involves the following packages:
@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
please test |
|
@Dr15Jones here are the modules we discussed. |
|
+1 Size: This PR adds an extra 36KB to repository Comparison SummarySummary:
|
| @@ -0,0 +1,31 @@ | |||
| #include "DataFormats/Common/interface/PathActivityToken.h" | |||
There was a problem hiding this comment.
I realize PathActivityProducer may not be the final name, but the file name should match the name of the producer class.
There was a problem hiding this comment.
Yes, my bad, I forgot to rename the file.
I'll try bouncing ideas of Matti once he is in. The important ideas is the Filter is trying to replicate the behavior seen by the Producer. So they form a pair. Maybe using |
|
Chris and I brainstormed on the naming and came up with a suggestion
|
| <class name="edm::PathActivityToken" ClassVersion="3"> | ||
| <version ClassVersion="3" checksum="4071377827"/> | ||
| </class> | ||
| <class name="edm::Wrapper<edm::PathActivityToken>"/> |
There was a problem hiding this comment.
Can the data product be made transient (wrt OutputModules)
| <class name="edm::PathActivityToken" ClassVersion="3"> | |
| <version ClassVersion="3" checksum="4071377827"/> | |
| </class> | |
| <class name="edm::Wrapper<edm::PathActivityToken>"/> | |
| <class name="edm::PathActivityToken"/> | |
| <class name="edm::Wrapper<edm::PathActivityToken>" persistent="false"/> |
?
There was a problem hiding this comment.
No, the idea is to serialise it and transfer it over the network, which requires a dictionary.
The requirement could be bypassed using some spacial-casing - but in general I don't see why we shouldn't support storing this.
There was a problem hiding this comment.
Marking the Wrapper transient doesn't preclude ROOT serialization in general. The persistent is a CMS-specific attribute, whose main impact is that OutputModules ignore such data products (plus some knock-on effects in the framework).
There was a problem hiding this comment.
How does one check at runtime if a Wrapper has a ROOT dictionary ?
DataFormats/Provenance/interface/BranchDescription.h only provides transient().
There was a problem hiding this comment.
But orthogonal to that - why one should not be allowed to serialise this product ?
There was a problem hiding this comment.
How does one check at runtime if a
Wrapperhas a ROOT dictionary ?
Presently the framework requires a dictionary for all data products put into the Event. When we (hopefully) get to the point that transient data products would not need a dictionary, we should provide a clear function to check whether a dictionary exists or not.
But orthogonal to that - why one should not be allowed to serialise this product ?
My line of thought was that if this data product would not have to be stored in files, we could easily avoid a class of mistakes of accidentally storing them (and taking disk space for no reason) by declaring it to be transient. (just to be clear, the "storage in files" is different from general ability to "serialize with ROOT", I wasn't sure which you meant).
But we don't need to argue about this further. I'm fine with allowing the persistency if there is a foreseen use case.
| class PathActivityFilter : public global::EDFilter<> { | ||
| public: | ||
| explicit PathActivityFilter(ParameterSet const& config) | ||
| : token_(consumes<PathActivityToken>(config.getParameter<edm::InputTag>("producer"))) {} |
There was a problem hiding this comment.
If you decide to go with Checkpoint in the name, then maybe this should be "checkpoint".
ec5a788 to
12670de
Compare
An `edm::PathStateCapture` produces an `edm::PathStateToken` when run. The `edm::PathStateToken` is an empty struct, and acts as a "token"; it is used to communicate the status (active or not) of an `edm::Path` at a given point where an `edm::PathStateCapture` module is scheduled: - if the path is active, the module runs and produces the token; - if the path is not active the module does not run or produce the token. While any product would work, the use of a dedicated empty type is more explicit. An `edm::PathStateToken` may be consumed by an `edm::PathStateRelease`, an `EDFilter` with a result of `true` if the token is present, `false` otherwise.
701a12b to
1511011
Compare
|
please test |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48598/45598
|
|
Pull request #48598 was updated. @Dr15Jones, @makortel, @smuzaffar can you please check and sign again. |
|
please test |
|
+1 Size: This PR adds an extra 36KB to repository Comparison SummarySummary:
|
|
+core |
|
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. @sextonkennedy, @rappoccio, @antoniovilela, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
|
type ngt |
PR description:
An
edm::PathStateCaptureproduces anedm::PathStateTokenwhen run.The
edm::PathStateTokenis an empty struct, and acts as a "token"; it is used to communicate the status (active or not) of anedm::Pathat a given point where anedm::PathStateCapturemodule is scheduled:While any product would work, the use of a dedicated empty type is more explicit.
An
edm::PathStateTokenmay be consumed by anedm::PathStateRelease, anEDFilterwith a result oftrueif the token is present,falseotherwise.PR validation:
The new unit test passes.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
No backport expected.