-
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
fix incomplete esconsumes migration #34631
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34631/24218
|
A new Pull Request was created by @ptcox for master. It involves the following packages:
@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@ptcox , please, have a look into current approach, for example, https://cmssdt.cern.ch/lxr/source/SimG4Core/Application/src/OscarMTMasterThread.cc - this may be not one to one for digitizer but is checked to be correct, also have a look into header file. |
I'm not sure what you mean. The entire handling of ParticleDataTable should be changed? I didn't handle the original change to esConsumes so I don't understand. |
@ptcox , in your case, Tokens should be defined in the class constructor via consumesCollector(), access to geometry, magnetic field, and particle table - beginRun(const edm::Run&, const edm::EventSetup& es). |
I really don't understand. All the tokens are already in the code. I don't see why the getHandle(token) calls are not doing the correct thing. &* to convert to a pointer to pass down into the code. It seems to me the getData line I delete in this PR is the only thing that is 'wrong' - it's left over from the code before the esConsumes tokens were added. |
@ptcox , it is working now but will be deprecated in 12_1_0. It is planned design change needed for proper multi-threading. |
So let me get this straight. A call like |
So the minimal fix seems ok |
@ptcox , my main concern is to this producer structure. There are three type of data: geometry, magnetic field, and particle data. These data are unique and shared between all threads. In the constructor of this class tokens are defined correctly. There is also digitazer as a part of this producer. Normally, access to these data should be obtained inside beginRun method using the tokens and getData() method (which you are trying to remove). In the produce method you do this each time when number of hits more than zero. This is a not needed overhead. |
Vladimir,
This is the first time you said anything about the structure of the
producer. That may well need work. What I was trying to do is remove the
EXTRANEOUS call to a getData(.) which does nothing. It seems to be left
from the old code in 9_4_X, for example.
When I have time I'll look at the the structure. However, I was under
the impression the way to access EventData IS exactly like this. It does
the caching, not user code. You seem to be saying it doesn't.
Regards, Tim
Vladimir Ivantchenko wrote on 8/3/21 13:30:
…
@ptcox <https://github.com/ptcox> , my main concern is to this
producer structure. There are three type of data: geometry, magnetic
field, and particle data. These data are unique and shared between all
threads. In the constructor of this class tokens are defined
correctly. There is also digitazer as a part of this producer.
Normally, access to these data should be obtained inside beginRun
method using the tokens and getData() method (which you are trying to
remove). In the produce method you do this each time when number of
hits more than zero. This is a not needed overhead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#34631 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGYLHXOCJPA2GXGGXC5ZATT27HLRANCNFSM5BAWO6YA>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
In fact The current code is not making any complex calculations and is working just like this. I think this is why there is no |
+1 OK, may I was wrong, let us merge this fix. |
This pull request is fully signed and it will be integrated in one of the next master IBs after it passes the integration tests. This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy, @perrotta (and backports should be raised in the release meeting by the corresponding L2) |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a08460/17510/summary.html Comparison SummarySummary:
|
+1
|
PR description:
PR validation: