{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/24791","repository_url":"https://api.github.com/repos/cms-sw/cmssw","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/24791/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/24791/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/24791/events","html_url":"https://github.com/cms-sw/cmssw/pull/24791","id":365994002,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Nzc4NTAw","number":24791,"title":"EventSetup consumes interface","user":{"login":"knoepfel","id":7603566,"node_id":"MDQ6VXNlcjc2MDM1NjY=","avatar_url":"https://avatars2.githubusercontent.com/u/7603566?v=4","gravatar_id":"","url":"https://api.github.com/users/knoepfel","html_url":"https://github.com/knoepfel","followers_url":"https://api.github.com/users/knoepfel/followers","following_url":"https://api.github.com/users/knoepfel/following{/other_user}","gists_url":"https://api.github.com/users/knoepfel/gists{/gist_id}","starred_url":"https://api.github.com/users/knoepfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoepfel/subscriptions","organizations_url":"https://api.github.com/users/knoepfel/orgs","repos_url":"https://api.github.com/users/knoepfel/repos","events_url":"https://api.github.com/users/knoepfel/events{/privacy}","received_events_url":"https://api.github.com/users/knoepfel/received_events","type":"User","site_admin":false},"labels":[{"id":52881179,"node_id":"MDU6TGFiZWw1Mjg4MTE3OQ==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/analysis-pending","name":"analysis-pending","color":"fbca04","default":false},{"id":673935056,"node_id":"MDU6TGFiZWw2NzM5MzUwNTY=","url":"https://api.github.com/repos/cms-sw/cmssw/labels/code-checks-pending","name":"code-checks-pending","color":"fbca04","default":false},{"id":88653795,"node_id":"MDU6TGFiZWw4ODY1Mzc5NQ==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-pending","name":"comparison-pending","color":"fbca04","default":false},{"id":52822606,"node_id":"MDU6TGFiZWw1MjgyMjYwNg==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/core-pending","name":"core-pending","color":"fbca04","default":false},{"id":56953091,"node_id":"MDU6TGFiZWw1Njk1MzA5MQ==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-pending","name":"orp-pending","color":"fbca04","default":false},{"id":53167770,"node_id":"MDU6TGFiZWw1MzE2Nzc3MA==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"ff8000","default":false},{"id":56131152,"node_id":"MDU6TGFiZWw1NjEzMTE1Mg==","url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-pending","name":"tests-pending","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/77","html_url":"https://github.com/cms-sw/cmssw/milestone/77","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/77/labels","id":3502981,"node_id":"MDk6TWlsZXN0b25lMzUwMjk4MQ==","number":77,"title":"CMSSW_10_3_X","description":null,"creator":{"login":"smuzaffar","id":4115138,"node_id":"MDQ6VXNlcjQxMTUxMzg=","avatar_url":"https://avatars3.githubusercontent.com/u/4115138?v=4","gravatar_id":"","url":"https://api.github.com/users/smuzaffar","html_url":"https://github.com/smuzaffar","followers_url":"https://api.github.com/users/smuzaffar/followers","following_url":"https://api.github.com/users/smuzaffar/following{/other_user}","gists_url":"https://api.github.com/users/smuzaffar/gists{/gist_id}","starred_url":"https://api.github.com/users/smuzaffar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuzaffar/subscriptions","organizations_url":"https://api.github.com/users/smuzaffar/orgs","repos_url":"https://api.github.com/users/smuzaffar/repos","events_url":"https://api.github.com/users/smuzaffar/events{/privacy}","received_events_url":"https://api.github.com/users/smuzaffar/received_events","type":"User","site_admin":false},"open_issues":67,"closed_issues":732,"state":"open","created_at":"2018-07-17T14:14:12Z","updated_at":"2018-10-04T13:26:45Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2018-10-02T17:07:53Z","updated_at":"2018-10-04T13:29:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/24791","html_url":"https://github.com/cms-sw/cmssw/pull/24791","diff_url":"https://github.com/cms-sw/cmssw/pull/24791.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/24791.patch"},"body":"This PR introduces an interface that mirrors the consumes system for modules.  It provides the `edm::ESGetTokenT<MyESProduct>` token, which can be used for retrieving event-setup products.\r\n\r\n**N.B.** This PR does include quite a few whitespace changes, primarily from using nested namespaces.  Although clicking on the individual commit and specifying a trailing \"?w=1\" in the URL should be sufficient to suppress them, please let me know if you'd prefer me to revert.\r\n\r\n**Module interface**\r\n\r\n    class MyModule : public ... {\r\n      edm::ESInputTag esTag_;\r\n      edm::ESGetTokenT<ESProduct> token_;\r\n      edm::ESGetTokenT<OtherESProduct> otherToken_;\r\n      ...\r\n    public:\r\n      MyModule(ParameterSet const&) : \r\n        esTag_{...},\r\n        // Indication to consume the ESProduct during the event\r\n        token_{esConsumes<ESProduct, ESRecord>(esTag_)},\r\n        // Tell system to consume at begin SubRun\r\n        otherToken_{esConsumes<OtherESProduct, OtherESRecord, edm::Transition::BeginSubRun>(esTag_)}\r\n      {}\r\n    };\r\n\r\n**ESProducer interface**\r\n\r\n    class MyESProducer: public edm::ESProducer {\r\n    public:\r\n      MyESProducer() {\r\n        edm::ESConsumesCollector cc = setWhatProduced(this);\r\n        edm::ESGetTokenT<Foos> foos = cc.consumes<Foos>(); // gets from same record\r\n        edm::ESGetTokenT<Bars> bars = cc.consumes<Bars, BarRecord, edm::Transition::EndSubRun>();\r\n      }\r\n    };\r\n\r\n**Additional comments**\r\n\r\n- The `edm::EventRecord::get()` calls now return `bool` instead of `void`.  A return value of `true` implies that the event-record retrieval was successful, and the handle can be safely dereferenced.\r\n- The `edm::ESInputTag` constructor overload set has been expanded to better match user expectations for constructions via single strings (representing data labels) and those via encoded representations, which require an additional `edm::ESInputTag::Encoded` constructor argument."},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/427018700","html_url":"https://github.com/cms-sw/cmssw/pull/24791#issuecomment-427018700","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/24791","id":427018700,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzAxODcwMA==","user":{"login":"cmsbuild","id":4170616,"node_id":"MDQ6VXNlcjQxNzA2MTY=","avatar_url":"https://avatars1.githubusercontent.com/u/4170616?v=4","gravatar_id":"","url":"https://api.github.com/users/cmsbuild","html_url":"https://github.com/cmsbuild","followers_url":"https://api.github.com/users/cmsbuild/followers","following_url":"https://api.github.com/users/cmsbuild/following{/other_user}","gists_url":"https://api.github.com/users/cmsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsbuild/subscriptions","organizations_url":"https://api.github.com/users/cmsbuild/orgs","repos_url":"https://api.github.com/users/cmsbuild/repos","events_url":"https://api.github.com/users/cmsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/cmsbuild/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T13:29:12Z","updated_at":"2018-10-04T13:29:12Z","author_association":"CONTRIBUTOR","body":"+code-checks\n\nLogs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24791/6748"}}
{"actor":{"display_login":"cmsbuild"}}