{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/8304","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/8304/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/8304/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/8304/events","html_url":"https://github.com/cms-sw/cmssw/pull/8304","id":61770708,"number":8304,"title":"Make MuonTagger thread safe","user":{"login":"Dr15Jones","id":3757616,"avatar_url":"https://avatars.githubusercontent.com/u/3757616?v=3","gravatar_id":"","url":"https://api.github.com/users/Dr15Jones","html_url":"https://github.com/Dr15Jones","followers_url":"https://api.github.com/users/Dr15Jones/followers","following_url":"https://api.github.com/users/Dr15Jones/following{/other_user}","gists_url":"https://api.github.com/users/Dr15Jones/gists{/gist_id}","starred_url":"https://api.github.com/users/Dr15Jones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dr15Jones/subscriptions","organizations_url":"https://api.github.com/users/Dr15Jones/orgs","repos_url":"https://api.github.com/users/Dr15Jones/repos","events_url":"https://api.github.com/users/Dr15Jones/events{/privacy}","received_events_url":"https://api.github.com/users/Dr15Jones/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/comparison-pending","name":"comparison-pending","color":"fef2c0"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/orp-pending","name":"orp-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-signatures","name":"pending-signatures","color":"eb6420"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/reconstruction-pending","name":"reconstruction-pending","color":"fbca04"},{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/tests-approved","name":"tests-approved","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_7_4_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/50/labels","id":875803,"number":50,"title":"Next CMSSW_7_4_X","description":"","creator":{"login":"nclopezo","id":1944922,"avatar_url":"https://avatars.githubusercontent.com/u/1944922?v=3","gravatar_id":"","url":"https://api.github.com/users/nclopezo","html_url":"https://github.com/nclopezo","followers_url":"https://api.github.com/users/nclopezo/followers","following_url":"https://api.github.com/users/nclopezo/following{/other_user}","gists_url":"https://api.github.com/users/nclopezo/gists{/gist_id}","starred_url":"https://api.github.com/users/nclopezo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nclopezo/subscriptions","organizations_url":"https://api.github.com/users/nclopezo/orgs","repos_url":"https://api.github.com/users/nclopezo/repos","events_url":"https://api.github.com/users/nclopezo/events{/privacy}","received_events_url":"https://api.github.com/users/nclopezo/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":878,"state":"open","created_at":"2014-11-21T15:23:58Z","updated_at":"2015-03-16T09:26:47Z","due_on":"2015-01-26T08:00:00Z","closed_at":null},"comments":5,"created_at":"2015-03-15T07:51:13Z","updated_at":"2015-03-16T10:29:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/8304","html_url":"https://github.com/cms-sw/cmssw/pull/8304","diff_url":"https://github.com/cms-sw/cmssw/pull/8304.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/8304.patch"},"body":"Since the MuonTagger can be obtained via the EventSetup, the\r\nconst methods of the class must be thread safe. This required replacing\r\nTRandom3 with C++11 random facility (since TRandom3 uses a global seed)\r\nand using an std::mutex to protect MvaSoftMuonEstimator since the\r\nway it interacts with TMVA::Reader is thread-unsafe."},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/81566966","html_url":"https://github.com/cms-sw/cmssw/pull/8304#issuecomment-81566966","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/8304","id":81566966,"user":{"login":"slava77","id":4676718,"avatar_url":"https://avatars.githubusercontent.com/u/4676718?v=3","gravatar_id":"","url":"https://api.github.com/users/slava77","html_url":"https://github.com/slava77","followers_url":"https://api.github.com/users/slava77/followers","following_url":"https://api.github.com/users/slava77/following{/other_user}","gists_url":"https://api.github.com/users/slava77/gists{/gist_id}","starred_url":"https://api.github.com/users/slava77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slava77/subscriptions","organizations_url":"https://api.github.com/users/slava77/orgs","repos_url":"https://api.github.com/users/slava77/repos","events_url":"https://api.github.com/users/slava77/events{/privacy}","received_events_url":"https://api.github.com/users/slava77/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T10:29:39Z","updated_at":"2015-03-16T10:29:39Z","body":"+1\r\n\r\nfor https://github.com/cms-sw/cmssw/pull/8304\t 6346525\r\n\r\nin addition to jenkins, tested locally with higher stats in CMSSW_7_4_X_2015-03-14-1400 /test area sign529/\r\n\r\nthere are no changes in monitored quantities, which suggests that the code affected by the random number selection/generation is actually not triggered (requires multiple candidates).\r\n\r\nI ran igprof on ttbar with pu35@25ns and observed some minor increase in CPU in the two affected modules (by this and #8284  PR) \r\n```\r\n        softPFMuonBJetTags       0.65958 ms/ev -> 0.853296 ms/ev\r\n        softPFElectronBJetTags   2.2377 ms/ev -> 2.42587 ms/ev\r\n```\r\nthe increase is, unconvincingly, matching the igprof cost in MvaSoftEleEstimator::mvaValue, but maybe a jitter. The random engine-related elements are not showing up in igprof."}}