{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/41232732","id":41232732,"diff_hunk":"@@ -104,42 +114,19 @@ HLTScoutingCaloProducer::produce(edm::StreamID sid, edm::Event & iEvent, edm::Ev\n \n     //get rho\n     Handle<double>rho;\n-    if(!iEvent.getByToken(rho_, rho)){\n-        edm::LogError (\"HLTScoutingCaloProducer\") << \"invalid collection: rho\" << \"\\n\";\n-        return;\n+    std::auto_ptr<double> outRho(new double(-999));\n+    if(iEvent.getByToken(rho_, rho)){\n+        outRho.reset(new double(*rho));\n     }\n-    std::auto_ptr<double> outRho(new double(*rho));\n \n     //get MET \n     Handle<reco::CaloMETCollection> metCollection;\n-    if(doMet && !iEvent.getByToken(metCollection_, metCollection)){\n-        edm::LogError (\"HLTScoutingCaloProducer\") << \"invalid collection: metCollection\" << \"\\n\";\n-        return;\n-    }\n-\n-    //produce calo jets\n-    std::auto_ptr<ScoutingCaloJetCollection> outCaloJets(new ScoutingCaloJetCollection());\n-    for(auto &jet : *caloJetCollection){\n-        if(jet.pt() > caloJetPtCut && fabs(jet.eta()) < caloJetEtaCut){\n-            outCaloJets->emplace_back(\n-                    jet.pt(), jet.eta(), jet.phi(), jet.mass(),\n-                    jet.jetArea(), jet.maxEInEmTowers(), jet.maxEInHadTowers(),\n-                    jet.hadEnergyInHB(), jet.hadEnergyInHE(), jet.hadEnergyInHF(),\n-                    jet.emEnergyInEB(), jet.emEnergyInEE(), jet.emEnergyInHF(),\n-                    jet.towersArea(), 0.0\n-                    );\n-        }\n-    }\n-\n-    //produce MET\n-    double metPt = -999;\n-    double metPhi = -999;\n-    if(doMet){\n-        metPt = metCollection->front().pt();\n-        metPhi = metCollection->front().phi();\n+    std::auto_ptr<double> outMetPt(new double(-999));\n+    std::auto_ptr<double> outMetPhi(new double(-999));\n+    if(doMet && iEvent.getByToken(metCollection_, metCollection)){\n+        outMetPt.reset(new double(metCollection->front().pt()));\n+        outMetPhi.reset(new double(metCollection->front().phi()));","path":"HLTrigger/JetMET/plugins/HLTScoutingCaloProducer.cc","position":67,"original_position":67,"commit_id":"d5169cc1b6a0655d7719fa504792146fd5b9c9cd","original_commit_id":"d5169cc1b6a0655d7719fa504792146fd5b9c9cd","user":{"login":"duanders","id":5043077,"avatar_url":"https://avatars.githubusercontent.com/u/5043077?v=3","gravatar_id":"","url":"https://api.github.com/users/duanders","html_url":"https://github.com/duanders","followers_url":"https://api.github.com/users/duanders/followers","following_url":"https://api.github.com/users/duanders/following{/other_user}","gists_url":"https://api.github.com/users/duanders/gists{/gist_id}","starred_url":"https://api.github.com/users/duanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanders/subscriptions","organizations_url":"https://api.github.com/users/duanders/orgs","repos_url":"https://api.github.com/users/duanders/repos","events_url":"https://api.github.com/users/duanders/events{/privacy}","received_events_url":"https://api.github.com/users/duanders/received_events","type":"User","site_admin":false},"body":"@davidlange6 - sorry, I see that this could just be `*outMetPhi = metCollection->front().phi()`.  mistake on my part.  ","created_at":"2015-10-06T07:31:32Z","updated_at":"2015-10-06T07:31:32Z","html_url":"https://github.com/cms-sw/cmssw/pull/11633#discussion_r41232732","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/41232732"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/11633#discussion_r41232732"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633","id":46757619,"html_url":"https://github.com/cms-sw/cmssw/pull/11633","diff_url":"https://github.com/cms-sw/cmssw/pull/11633.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/11633.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11633","number":11633,"state":"closed","locked":false,"title":"Scouting producers now ignore missing input collections (76X)","user":{"login":"duanders","id":5043077,"avatar_url":"https://avatars.githubusercontent.com/u/5043077?v=3","gravatar_id":"","url":"https://api.github.com/users/duanders","html_url":"https://github.com/duanders","followers_url":"https://api.github.com/users/duanders/followers","following_url":"https://api.github.com/users/duanders/following{/other_user}","gists_url":"https://api.github.com/users/duanders/gists{/gist_id}","starred_url":"https://api.github.com/users/duanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanders/subscriptions","organizations_url":"https://api.github.com/users/duanders/orgs","repos_url":"https://api.github.com/users/duanders/repos","events_url":"https://api.github.com/users/duanders/events{/privacy}","received_events_url":"https://api.github.com/users/duanders/received_events","type":"User","site_admin":false},"body":"Port of https://github.com/cms-sw/cmssw/pull/11627 to 76X","created_at":"2015-10-05T09:08:01Z","updated_at":"2015-10-06T07:31:32Z","closed_at":"2015-10-06T06:16:21Z","merged_at":"2015-10-06T06:16:21Z","merge_commit_sha":"88c522f85b463733f4ec02297f1b1c9e56971936","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/55","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_7_6_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/55/labels","id":1176788,"number":55,"title":"Next CMSSW_7_6_X","description":"","creator":{"login":"smuzaffar","id":4115138,"avatar_url":"https://avatars.githubusercontent.com/u/4115138?v=3","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":70,"closed_issues":827,"state":"open","created_at":"2015-06-23T07:27:04Z","updated_at":"2015-10-06T07:01:08Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633/comments","review_comment_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/11633/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/d5169cc1b6a0655d7719fa504792146fd5b9c9cd","head":{"label":"duanders:scoutingproducerrevamp_76X","ref":"scoutingproducerrevamp_76X","sha":"d5169cc1b6a0655d7719fa504792146fd5b9c9cd","user":{"login":"duanders","id":5043077,"avatar_url":"https://avatars.githubusercontent.com/u/5043077?v=3","gravatar_id":"","url":"https://api.github.com/users/duanders","html_url":"https://github.com/duanders","followers_url":"https://api.github.com/users/duanders/followers","following_url":"https://api.github.com/users/duanders/following{/other_user}","gists_url":"https://api.github.com/users/duanders/gists{/gist_id}","starred_url":"https://api.github.com/users/duanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanders/subscriptions","organizations_url":"https://api.github.com/users/duanders/orgs","repos_url":"https://api.github.com/users/duanders/repos","events_url":"https://api.github.com/users/duanders/events{/privacy}","received_events_url":"https://api.github.com/users/duanders/received_events","type":"User","site_admin":false},"repo":{"id":32976247,"name":"cmssw","full_name":"duanders/cmssw","owner":{"login":"duanders","id":5043077,"avatar_url":"https://avatars.githubusercontent.com/u/5043077?v=3","gravatar_id":"","url":"https://api.github.com/users/duanders","html_url":"https://github.com/duanders","followers_url":"https://api.github.com/users/duanders/followers","following_url":"https://api.github.com/users/duanders/following{/other_user}","gists_url":"https://api.github.com/users/duanders/gists{/gist_id}","starred_url":"https://api.github.com/users/duanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanders/subscriptions","organizations_url":"https://api.github.com/users/duanders/orgs","repos_url":"https://api.github.com/users/duanders/repos","events_url":"https://api.github.com/users/duanders/events{/privacy}","received_events_url":"https://api.github.com/users/duanders/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/duanders/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/duanders/cmssw","forks_url":"https://api.github.com/repos/duanders/cmssw/forks","keys_url":"https://api.github.com/repos/duanders/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duanders/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duanders/cmssw/teams","hooks_url":"https://api.github.com/repos/duanders/cmssw/hooks","issue_events_url":"https://api.github.com/repos/duanders/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/duanders/cmssw/events","assignees_url":"https://api.github.com/repos/duanders/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/duanders/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/duanders/cmssw/tags","blobs_url":"https://api.github.com/repos/duanders/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duanders/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duanders/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/duanders/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duanders/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/duanders/cmssw/languages","stargazers_url":"https://api.github.com/repos/duanders/cmssw/stargazers","contributors_url":"https://api.github.com/repos/duanders/cmssw/contributors","subscribers_url":"https://api.github.com/repos/duanders/cmssw/subscribers","subscription_url":"https://api.github.com/repos/duanders/cmssw/subscription","commits_url":"https://api.github.com/repos/duanders/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/duanders/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/duanders/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/duanders/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/duanders/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/duanders/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duanders/cmssw/merges","archive_url":"https://api.github.com/repos/duanders/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duanders/cmssw/downloads","issues_url":"https://api.github.com/repos/duanders/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/duanders/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/duanders/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/duanders/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duanders/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/duanders/cmssw/releases{/id}","created_at":"2015-03-27T08:51:22Z","updated_at":"2015-07-10T23:06:05Z","pushed_at":"2015-10-05T09:06:58Z","git_url":"git://github.com/duanders/cmssw.git","ssh_url":"git@github.com:duanders/cmssw.git","clone_url":"https://github.com/duanders/cmssw.git","svn_url":"https://github.com/duanders/cmssw","homepage":"http://cms-sw.github.io/","size":821922,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"CMSSW_7_5_X"}},"base":{"label":"cms-sw:CMSSW_7_6_X","ref":"CMSSW_7_6_X","sha":"5e7f6c2991c4072799cb88978758b1ca6d9f0e72","user":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"repo":{"id":10969551,"name":"cmssw","full_name":"cms-sw/cmssw","owner":{"login":"cms-sw","id":3863500,"avatar_url":"https://avatars.githubusercontent.com/u/3863500?v=3","gravatar_id":"","url":"https://api.github.com/users/cms-sw","html_url":"https://github.com/cms-sw","followers_url":"https://api.github.com/users/cms-sw/followers","following_url":"https://api.github.com/users/cms-sw/following{/other_user}","gists_url":"https://api.github.com/users/cms-sw/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-sw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-sw/subscriptions","organizations_url":"https://api.github.com/users/cms-sw/orgs","repos_url":"https://api.github.com/users/cms-sw/repos","events_url":"https://api.github.com/users/cms-sw/events{/privacy}","received_events_url":"https://api.github.com/users/cms-sw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-sw/cmssw","description":"CMS Offline Software","fork":false,"url":"https://api.github.com/repos/cms-sw/cmssw","forks_url":"https://api.github.com/repos/cms-sw/cmssw/forks","keys_url":"https://api.github.com/repos/cms-sw/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-sw/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-sw/cmssw/teams","hooks_url":"https://api.github.com/repos/cms-sw/cmssw/hooks","issue_events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/cms-sw/cmssw/events","assignees_url":"https://api.github.com/repos/cms-sw/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/cms-sw/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/cms-sw/cmssw/tags","blobs_url":"https://api.github.com/repos/cms-sw/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-sw/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-sw/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-sw/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-sw/cmssw/languages","stargazers_url":"https://api.github.com/repos/cms-sw/cmssw/stargazers","contributors_url":"https://api.github.com/repos/cms-sw/cmssw/contributors","subscribers_url":"https://api.github.com/repos/cms-sw/cmssw/subscribers","subscription_url":"https://api.github.com/repos/cms-sw/cmssw/subscription","commits_url":"https://api.github.com/repos/cms-sw/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-sw/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-sw/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/cms-sw/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-sw/cmssw/merges","archive_url":"https://api.github.com/repos/cms-sw/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-sw/cmssw/downloads","issues_url":"https://api.github.com/repos/cms-sw/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/cms-sw/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-sw/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-sw/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-sw/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/cms-sw/cmssw/releases{/id}","created_at":"2013-06-26T14:09:07Z","updated_at":"2015-10-06T03:03:05Z","pushed_at":"2015-10-06T07:00:05Z","git_url":"git://github.com/cms-sw/cmssw.git","ssh_url":"git@github.com:cms-sw/cmssw.git","clone_url":"https://github.com/cms-sw/cmssw.git","svn_url":"https://github.com/cms-sw/cmssw","homepage":"http://cms-sw.github.io/","size":1298830,"stargazers_count":264,"watchers_count":264,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1580,"mirror_url":null,"open_issues_count":264,"forks":1580,"open_issues":264,"watchers":264,"default_branch":"CMSSW_7_6_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/11633"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/11633"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/11633/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/11633/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/d5169cc1b6a0655d7719fa504792146fd5b9c9cd"}}}}