Skip to content
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

getProducerParameterSet #29148

Closed
wants to merge 3 commits into from
Closed

getProducerParameterSet #29148

wants to merge 3 commits into from

Conversation

tschuh
Copy link
Contributor

@tschuh tschuh commented Mar 8, 2020

PR description:

second getProducerParameterSet function to get ParameterSet of module without Provenance.

PR validation:

only build of FWCore/Framework without git cms-checkdeps -a -A

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2020

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29148/14080

  • This PR adds an extra 24KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29148/14081

  • This PR adds an extra 24KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 8, 2020

A new Pull Request was created by @tschuh for master.

It involves the following packages:

FWCore/Framework

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@davidlange6, @silviodonato, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@smuzaffar
Copy link
Contributor

@tschuh , please update the title of this PR

@tschuh tschuh changed the title A getProducerParameterSet Mar 9, 2020
@makortel
Copy link
Contributor

makortel commented Mar 9, 2020

@tschuh Could you please explain the motivation for the new overload?

@tschuh
Copy link
Contributor Author

tschuh commented Mar 9, 2020

I have no idea how to get the Provenance of an ESProducer. But I was able to figure out process name and the module label.
I needed the configuration of TTStubAlgorithm_official_Phase2TrackerDigi_. Is there a better way to get the ParameterSet of this module?

@Dr15Jones
Copy link
Contributor

If you get the data from the EventSetup, you can ask the ESHandle for the ComponentDescription which has the ParameterSetID for the module which created that data.

@tschuh
Copy link
Contributor Author

tschuh commented Mar 9, 2020

I struggle to get the ESProducer. If I do what I naively expect I have to do like:
void beginRun(const Run& iRun, const EventSetup& iSetup) { ESHandle<TTStubAlgorithm<Ref_Phase2TrackerDigi_>> handleTTStubAlgorithm; iSetup.get<TTStubAlgorithmRecord>().get(handleTTStubAlgorithm); }
I am getting a NoRecord exception during run. I guess the record is not stored in EventSetup. How can I get an ESProducer without record?

@makortel
Copy link
Contributor

makortel commented Mar 9, 2020

To get an ESProduct from the EventSetup an ESProducer is needed (+ESSource for the record) in the configuration. From your message I interpret that your job does not have one. Are you then trying to access the ParameterSet of a job that produced the input of your job?

@tschuh
Copy link
Contributor Author

tschuh commented Mar 10, 2020

I am working with RelVal samples. They contain TTStubs using a TTStubAlgorithm during production. Unfortunately I need something from the TTStubAlgorithm which has not been stored in the TTStubs. Therefore I am reconstructing the TTStubAlgorithm and I want to ensure that it uses the same configuration as the TTStubAlgorithm during production. Since the configuration has been stored in the samples I am extracting that from there.
I would like to avoid a situation where I have even the possibility to configure something in my EDProudcer in a different way as the RelVal sample producer. We have this already with tracker geometries which is annoying.

@makortel
Copy link
Contributor

Could you just include the configuration of the same ESProducer in your job than what was run in the RelVal?

The provenance system is not intended to propagate configuration values from an earlier job to a later job, but to have the ability to (mostly visually) inspect how a given event has been processed. (of course it can be abused to propagate values, but then you are on your own).

Said that, the inability to propagate configuration fragments is a weakness in our configuration system.

@tschuh
Copy link
Contributor Author

tschuh commented Mar 13, 2020

Well, I could load the default release configurations. However, people are playing with this bend window configuration and tracker geometries for example. I can never be sure that for a given relval sample the default config has been used (by purpose or by mistake).

@makortel
Copy link
Contributor

So RelVals are being produced with customize functions (or customize commands) altering these parameters?

@silviodonato
Copy link
Contributor

@tschuh do you still need this PR?

@tschuh
Copy link
Contributor Author

tschuh commented Apr 7, 2020

Ah sorry, got distracted. I use the code from this PR in PR #29151 which seems half approved. So it would be nice, else wise I will likely define the function somewhere else. This seems the correct place for me but I don't mind where it goes.

@makortel
Copy link
Contributor

makortel commented Apr 7, 2020

As I mentioned in #29151 (comment), we do not really like this use of pset::Registry() singleton, but its use in #29151 is tolerated because we do not have any better mechanism to cross check if a module is configured in the same way in two separate jobs (issue #29288). We do not, however, endorse such a use of pset::Registry(), and therefore this function will, unfortunately, not be accepted inside FWCore.

@makortel
Copy link
Contributor

makortel commented Apr 7, 2020

-1

@tschuh
Copy link
Contributor Author

tschuh commented Apr 7, 2020

Alright, no worries and many thanks for the help so far.

@tschuh tschuh closed this Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants