{"action":"created","issue":{"url":"https://api.github.com/repos/cbernet/cmssw/issues/18","labels_url":"https://api.github.com/repos/cbernet/cmssw/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/cbernet/cmssw/issues/18/comments","events_url":"https://api.github.com/repos/cbernet/cmssw/issues/18/events","html_url":"https://github.com/cbernet/cmssw/pull/18","id":57458709,"number":18,"title":"Add option for cmsRun preprocessor in Heppy","user":{"login":"arizzi","id":5022358,"avatar_url":"https://avatars.githubusercontent.com/u/5022358?v=3","gravatar_id":"","url":"https://api.github.com/users/arizzi","html_url":"https://github.com/arizzi","followers_url":"https://api.github.com/users/arizzi/followers","following_url":"https://api.github.com/users/arizzi/following{/other_user}","gists_url":"https://api.github.com/users/arizzi/gists{/gist_id}","starred_url":"https://api.github.com/users/arizzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arizzi/subscriptions","organizations_url":"https://api.github.com/users/arizzi/orgs","repos_url":"https://api.github.com/users/arizzi/repos","events_url":"https://api.github.com/users/arizzi/events{/privacy}","received_events_url":"https://api.github.com/users/arizzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-12T13:17:32Z","updated_at":"2015-02-12T13:45:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cbernet/cmssw/pulls/18","html_url":"https://github.com/cbernet/cmssw/pull/18","diff_url":"https://github.com/cbernet/cmssw/pull/18.diff","patch_url":"https://github.com/cbernet/cmssw/pull/18.patch"},"body":"This adds the possibility (discussed in last CMGTools meeting) to run on the fly a cmsRun preprocessor (e.g. to fix the photons :-) ).\r\nThe output file should contain ONLY the newly computed stuff and does not need to copy the whole miniaod content because the files are then opened with two-files solution in fwlite.\r\n\r\nin order to enable the preprocessor it is enough to:\r\n```\r\nfrom PhysicsTools.Heppy.utils.cmsswPreprocessor import CmsswPreprocessor\r\npreprocessor = CmsswPreprocessor(\"makeAK5Jets.py\")\r\n```\r\n\r\nand then to add the preprocessor in the looper config:\r\n```\r\nconfig = cfg.Config( components = selectedComponents,\r\n                     sequence = sequence,\r\n                     services = [],\r\n                     events_class = Events,\r\n                     preprocessor=preprocessor)  #add this line\r\n```"},"comment":{"url":"https://api.github.com/repos/cbernet/cmssw/issues/comments/74072191","html_url":"https://github.com/cbernet/cmssw/pull/18#issuecomment-74072191","issue_url":"https://api.github.com/repos/cbernet/cmssw/issues/18","id":74072191,"user":{"login":"cbernet","id":4138171,"avatar_url":"https://avatars.githubusercontent.com/u/4138171?v=3","gravatar_id":"","url":"https://api.github.com/users/cbernet","html_url":"https://github.com/cbernet","followers_url":"https://api.github.com/users/cbernet/followers","following_url":"https://api.github.com/users/cbernet/following{/other_user}","gists_url":"https://api.github.com/users/cbernet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbernet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbernet/subscriptions","organizations_url":"https://api.github.com/users/cbernet/orgs","repos_url":"https://api.github.com/users/cbernet/repos","events_url":"https://api.github.com/users/cbernet/events{/privacy}","received_events_url":"https://api.github.com/users/cbernet/received_events","type":"User","site_admin":false},"created_at":"2015-02-12T13:45:01Z","updated_at":"2015-02-12T13:45:01Z","body":"Hi Andrea, \n\nCould you please replace the use of kwargs by explicit parameters? \nOtherwise the user does not have a direct way to know which parameters are expected for the config object. \n\nThanks, \n\nColin\n\n\nLe 12 févr. 2015 à 14:17, arizzi <notifications@github.com> a écrit :\n\n> This adds the possibility (discussed in last CMGTools meeting) to run on the fly a cmsRun preprocessor (e.g. to fix the photons :-) ).\n> The output file should contain ONLY the newly computed stuff and does not need to copy the whole miniaod content because the files are then opened with two-files solution in fwlite.\n> \n> in order to enable the preprocessor it is enough to:\n> \n> from PhysicsTools.Heppy.utils.cmsswPreprocessor import CmsswPreprocessor\n> preprocessor = CmsswPreprocessor(\"makeAK5Jets.py\")\n> and then to add the preprocessor in the looper config:\n> \n> config = cfg.Config( components = selectedComponents,\n>                      sequence = sequence,\n>                      services = [],\n>                      events_class = Events,\n>                      preprocessor=preprocessor)  #add this line\n> You can view, comment on, or merge this pull request online at:\n> \n>   https://github.com/cbernet/cmssw/pull/18\n> \n> Commit Summary\n> \n> Merged heppy_7_2_2_patch2 from repository cbernet\n> add cmsRun preprocessor\n> clean up and fix file hierarchy\n> File Changes\n> \n> A PhysicsTools/Heppy/python/utils/cmsswPreprocessor.py (46)\n> M PhysicsTools/Heppy/test/example_autofill.py (4)\n> A PhysicsTools/Heppy/test/example_autofill_wCmsRun.py (89)\n> A PhysicsTools/Heppy/test/makeAK5Jets.py (28)\n> M PhysicsTools/HeppyCore/python/framework/config.py (3)\n> M PhysicsTools/HeppyCore/python/framework/eventsfwlite.py (14)\n> M PhysicsTools/HeppyCore/python/framework/eventstfile.py (2)\n> M PhysicsTools/HeppyCore/python/framework/looper.py (9)\n> Patch Links:\n> \n> https://github.com/cbernet/cmssw/pull/18.patch\n> https://github.com/cbernet/cmssw/pull/18.diff\n> —\n> Reply to this email directly or view it on GitHub.\n> \n\n"}}