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

Issue with Tasks implementation for 9X #51

Closed
kpedro88 opened this issue Sep 21, 2017 · 1 comment
Closed

Issue with Tasks implementation for 9X #51

kpedro88 opened this issue Sep 21, 2017 · 1 comment

Comments

@kpedro88
Copy link

It was pointed out to me today that running my group's ntuple code in 92X (https://github.com/TreeMaker/TreeMaker/tree/Run2_2017) produces a file called jettoolbox.root, even though we haven't explicitly requested it.

The problem seems to be that the implementation of Tasks in the toolbox always adds this to the config:

process.out = cms.OutputModule("PoolOutputModule",
    fileName = cms.untracked.string('jettoolbox.root'),
    outputCommands = cms.untracked.vstring('keep *_ak8PFJetsCHSCleanPrunedMass_*_*', 
        'keep *_NjettinessAK8CHSClean_*_*', 
        'keep *_selectedPatJetsAK8PFCHSClean_*_*', 
        'drop *_selectedPatJetsAK8PFCHSClean_calo*_*', 
        'drop *_selectedPatJetsAK8PFCHSClean_tagInfos_*', 
        'drop *_selectedPatJets*_genJets_*', 
        'drop recoGenJets_*_*_*', 
        'drop *_selectedclean_tagInfos_*', 
        'keep *_patCaloMet_*_*', 
        'keep *_patCaloMet_*_*', 
        'keep *_patCaloMet_*_*')
)
process.endpath = cms.EndPath(process.out, process.myTask)

I'm not sure what the best solution is, but there needs to be some way for the user to turn this off.

@kpedro88
Copy link
Author

Maybe you can use some cms.Process accessors to check if there's already a path/endpath created, and if so, just associate the jet toolbox task with that (only creating the new endpath if nothing else is available)?
https://github.com/cms-sw/cmssw/blob/CMSSW_9_1_X/FWCore/ParameterSet/python/Config.py#L210-L217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant