{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20","id":41614993,"html_url":"https://github.com/cp3-llbb/Framework/pull/20","diff_url":"https://github.com/cp3-llbb/Framework/pull/20.diff","patch_url":"https://github.com/cp3-llbb/Framework/pull/20.patch","issue_url":"https://api.github.com/repos/cp3-llbb/Framework/issues/20","number":20,"state":"closed","locked":false,"title":"Make ProducersManager::get templated","user":{"login":"blinkseb","id":386274,"avatar_url":"https://avatars.githubusercontent.com/u/386274?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkseb","html_url":"https://github.com/blinkseb","followers_url":"https://api.github.com/users/blinkseb/followers","following_url":"https://api.github.com/users/blinkseb/following{/other_user}","gists_url":"https://api.github.com/users/blinkseb/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkseb/subscriptions","organizations_url":"https://api.github.com/users/blinkseb/orgs","repos_url":"https://api.github.com/users/blinkseb/repos","events_url":"https://api.github.com/users/blinkseb/events{/privacy}","received_events_url":"https://api.github.com/users/blinkseb/received_events","type":"User","site_admin":false},"body":"It's a small improvement for ``ProducersManager``. Instead of letting the user do the ugly const dynamic cast to the right type, let the function do it for him.\r\n\r\nOld syntax:\r\n\r\n```C++\r\nconst MuonsProducer& muons = dynamic_cast<const MuonsProducer&>(producers.get(\"muons\"));\r\n```\r\n\r\nNew syntax:\r\n```C++\r\nconst MuonsProducer& muons = producers.get<MuonsProducer>(\"muons\");\r\n```\r\n\r\nA compile-time check is done to be sure that the class used inherit from ``Framework::Producer``. As a bonus, this PR also breaks the circular dependency between ``Framework`` and ``ProducersManager`` :smile_cat: \r\n\r\n**Note**: this will most likely break all the existing analyzers, so better doing it now than later :smile: ","created_at":"2015-08-04T20:42:39Z","updated_at":"2015-08-05T14:04:13Z","closed_at":"2015-08-05T14:04:13Z","merged_at":"2015-08-05T14:04:13Z","merge_commit_sha":"141ad5c222655977f366194ae89dee19ed74498e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20/commits","review_comments_url":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20/comments","review_comment_url":"https://api.github.com/repos/cp3-llbb/Framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cp3-llbb/Framework/issues/20/comments","statuses_url":"https://api.github.com/repos/cp3-llbb/Framework/statuses/1ec321828772973e9607976b53e023c28d1e0f67","head":{"label":"blinkseb:producers_manager_refactoring","ref":"producers_manager_refactoring","sha":"1ec321828772973e9607976b53e023c28d1e0f67","user":{"login":"blinkseb","id":386274,"avatar_url":"https://avatars.githubusercontent.com/u/386274?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkseb","html_url":"https://github.com/blinkseb","followers_url":"https://api.github.com/users/blinkseb/followers","following_url":"https://api.github.com/users/blinkseb/following{/other_user}","gists_url":"https://api.github.com/users/blinkseb/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkseb/subscriptions","organizations_url":"https://api.github.com/users/blinkseb/orgs","repos_url":"https://api.github.com/users/blinkseb/repos","events_url":"https://api.github.com/users/blinkseb/events{/privacy}","received_events_url":"https://api.github.com/users/blinkseb/received_events","type":"User","site_admin":false},"repo":{"id":38388627,"name":"Framework","full_name":"blinkseb/Framework","owner":{"login":"blinkseb","id":386274,"avatar_url":"https://avatars.githubusercontent.com/u/386274?v=3","gravatar_id":"","url":"https://api.github.com/users/blinkseb","html_url":"https://github.com/blinkseb","followers_url":"https://api.github.com/users/blinkseb/followers","following_url":"https://api.github.com/users/blinkseb/following{/other_user}","gists_url":"https://api.github.com/users/blinkseb/gists{/gist_id}","starred_url":"https://api.github.com/users/blinkseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinkseb/subscriptions","organizations_url":"https://api.github.com/users/blinkseb/orgs","repos_url":"https://api.github.com/users/blinkseb/repos","events_url":"https://api.github.com/users/blinkseb/events{/privacy}","received_events_url":"https://api.github.com/users/blinkseb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blinkseb/Framework","description":"Common framework for all cp3-llbb analyses","fork":true,"url":"https://api.github.com/repos/blinkseb/Framework","forks_url":"https://api.github.com/repos/blinkseb/Framework/forks","keys_url":"https://api.github.com/repos/blinkseb/Framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blinkseb/Framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blinkseb/Framework/teams","hooks_url":"https://api.github.com/repos/blinkseb/Framework/hooks","issue_events_url":"https://api.github.com/repos/blinkseb/Framework/issues/events{/number}","events_url":"https://api.github.com/repos/blinkseb/Framework/events","assignees_url":"https://api.github.com/repos/blinkseb/Framework/assignees{/user}","branches_url":"https://api.github.com/repos/blinkseb/Framework/branches{/branch}","tags_url":"https://api.github.com/repos/blinkseb/Framework/tags","blobs_url":"https://api.github.com/repos/blinkseb/Framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blinkseb/Framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blinkseb/Framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/blinkseb/Framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blinkseb/Framework/statuses/{sha}","languages_url":"https://api.github.com/repos/blinkseb/Framework/languages","stargazers_url":"https://api.github.com/repos/blinkseb/Framework/stargazers","contributors_url":"https://api.github.com/repos/blinkseb/Framework/contributors","subscribers_url":"https://api.github.com/repos/blinkseb/Framework/subscribers","subscription_url":"https://api.github.com/repos/blinkseb/Framework/subscription","commits_url":"https://api.github.com/repos/blinkseb/Framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/blinkseb/Framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/blinkseb/Framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/blinkseb/Framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/blinkseb/Framework/contents/{+path}","compare_url":"https://api.github.com/repos/blinkseb/Framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blinkseb/Framework/merges","archive_url":"https://api.github.com/repos/blinkseb/Framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blinkseb/Framework/downloads","issues_url":"https://api.github.com/repos/blinkseb/Framework/issues{/number}","pulls_url":"https://api.github.com/repos/blinkseb/Framework/pulls{/number}","milestones_url":"https://api.github.com/repos/blinkseb/Framework/milestones{/number}","notifications_url":"https://api.github.com/repos/blinkseb/Framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blinkseb/Framework/labels{/name}","releases_url":"https://api.github.com/repos/blinkseb/Framework/releases{/id}","created_at":"2015-07-01T18:44:40Z","updated_at":"2015-07-01T18:44:40Z","pushed_at":"2015-08-04T22:10:49Z","git_url":"git://github.com/blinkseb/Framework.git","ssh_url":"git@github.com:blinkseb/Framework.git","clone_url":"https://github.com/blinkseb/Framework.git","svn_url":"https://github.com/blinkseb/Framework","homepage":null,"size":197,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cp3-llbb:master","ref":"master","sha":"98f0988a447347602688fc9e7e736b42075a1db0","user":{"login":"cp3-llbb","id":12397486,"avatar_url":"https://avatars.githubusercontent.com/u/12397486?v=3","gravatar_id":"","url":"https://api.github.com/users/cp3-llbb","html_url":"https://github.com/cp3-llbb","followers_url":"https://api.github.com/users/cp3-llbb/followers","following_url":"https://api.github.com/users/cp3-llbb/following{/other_user}","gists_url":"https://api.github.com/users/cp3-llbb/gists{/gist_id}","starred_url":"https://api.github.com/users/cp3-llbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cp3-llbb/subscriptions","organizations_url":"https://api.github.com/users/cp3-llbb/orgs","repos_url":"https://api.github.com/users/cp3-llbb/repos","events_url":"https://api.github.com/users/cp3-llbb/events{/privacy}","received_events_url":"https://api.github.com/users/cp3-llbb/received_events","type":"Organization","site_admin":false},"repo":{"id":38299502,"name":"Framework","full_name":"cp3-llbb/Framework","owner":{"login":"cp3-llbb","id":12397486,"avatar_url":"https://avatars.githubusercontent.com/u/12397486?v=3","gravatar_id":"","url":"https://api.github.com/users/cp3-llbb","html_url":"https://github.com/cp3-llbb","followers_url":"https://api.github.com/users/cp3-llbb/followers","following_url":"https://api.github.com/users/cp3-llbb/following{/other_user}","gists_url":"https://api.github.com/users/cp3-llbb/gists{/gist_id}","starred_url":"https://api.github.com/users/cp3-llbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cp3-llbb/subscriptions","organizations_url":"https://api.github.com/users/cp3-llbb/orgs","repos_url":"https://api.github.com/users/cp3-llbb/repos","events_url":"https://api.github.com/users/cp3-llbb/events{/privacy}","received_events_url":"https://api.github.com/users/cp3-llbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cp3-llbb/Framework","description":"Common framework for all cp3-llbb analyses","fork":false,"url":"https://api.github.com/repos/cp3-llbb/Framework","forks_url":"https://api.github.com/repos/cp3-llbb/Framework/forks","keys_url":"https://api.github.com/repos/cp3-llbb/Framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cp3-llbb/Framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cp3-llbb/Framework/teams","hooks_url":"https://api.github.com/repos/cp3-llbb/Framework/hooks","issue_events_url":"https://api.github.com/repos/cp3-llbb/Framework/issues/events{/number}","events_url":"https://api.github.com/repos/cp3-llbb/Framework/events","assignees_url":"https://api.github.com/repos/cp3-llbb/Framework/assignees{/user}","branches_url":"https://api.github.com/repos/cp3-llbb/Framework/branches{/branch}","tags_url":"https://api.github.com/repos/cp3-llbb/Framework/tags","blobs_url":"https://api.github.com/repos/cp3-llbb/Framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cp3-llbb/Framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cp3-llbb/Framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/cp3-llbb/Framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cp3-llbb/Framework/statuses/{sha}","languages_url":"https://api.github.com/repos/cp3-llbb/Framework/languages","stargazers_url":"https://api.github.com/repos/cp3-llbb/Framework/stargazers","contributors_url":"https://api.github.com/repos/cp3-llbb/Framework/contributors","subscribers_url":"https://api.github.com/repos/cp3-llbb/Framework/subscribers","subscription_url":"https://api.github.com/repos/cp3-llbb/Framework/subscription","commits_url":"https://api.github.com/repos/cp3-llbb/Framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/cp3-llbb/Framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/cp3-llbb/Framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/cp3-llbb/Framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/cp3-llbb/Framework/contents/{+path}","compare_url":"https://api.github.com/repos/cp3-llbb/Framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cp3-llbb/Framework/merges","archive_url":"https://api.github.com/repos/cp3-llbb/Framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cp3-llbb/Framework/downloads","issues_url":"https://api.github.com/repos/cp3-llbb/Framework/issues{/number}","pulls_url":"https://api.github.com/repos/cp3-llbb/Framework/pulls{/number}","milestones_url":"https://api.github.com/repos/cp3-llbb/Framework/milestones{/number}","notifications_url":"https://api.github.com/repos/cp3-llbb/Framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cp3-llbb/Framework/labels{/name}","releases_url":"https://api.github.com/repos/cp3-llbb/Framework/releases{/id}","created_at":"2015-06-30T09:13:46Z","updated_at":"2015-06-30T09:26:27Z","pushed_at":"2015-08-05T14:04:13Z","git_url":"git://github.com/cp3-llbb/Framework.git","ssh_url":"git@github.com:cp3-llbb/Framework.git","clone_url":"https://github.com/cp3-llbb/Framework.git","svn_url":"https://github.com/cp3-llbb/Framework","homepage":null,"size":418,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20"},"html":{"href":"https://github.com/cp3-llbb/Framework/pull/20"},"issue":{"href":"https://api.github.com/repos/cp3-llbb/Framework/issues/20"},"comments":{"href":"https://api.github.com/repos/cp3-llbb/Framework/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/cp3-llbb/Framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cp3-llbb/Framework/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/cp3-llbb/Framework/statuses/1ec321828772973e9607976b53e023c28d1e0f67"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"OlivierBondu","id":2760084,"avatar_url":"https://avatars.githubusercontent.com/u/2760084?v=3","gravatar_id":"","url":"https://api.github.com/users/OlivierBondu","html_url":"https://github.com/OlivierBondu","followers_url":"https://api.github.com/users/OlivierBondu/followers","following_url":"https://api.github.com/users/OlivierBondu/following{/other_user}","gists_url":"https://api.github.com/users/OlivierBondu/gists{/gist_id}","starred_url":"https://api.github.com/users/OlivierBondu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlivierBondu/subscriptions","organizations_url":"https://api.github.com/users/OlivierBondu/orgs","repos_url":"https://api.github.com/users/OlivierBondu/repos","events_url":"https://api.github.com/users/OlivierBondu/events{/privacy}","received_events_url":"https://api.github.com/users/OlivierBondu/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":40,"deletions":30,"changed_files":7}}