{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/58881417","id":58881417,"diff_hunk":"@@ -146,6 +148,25 @@ namespace edm {\n                  \"configuration file were \" << initialSeedSet[0] << \" and \" << initialSeedSet[1]\n               << \"\\nThis was for the module with label \\\"\" << label << \"\\\".\\n\";\n           }\n+        } else if( engineName == std::string(\"XorShift128Plus\") ) {\n+          if( initialSeedSet.size() != 4U ) {\n+            throw Exception(errors::Configuration)\n+              << \"Random engines of type \\\"XorShift128Plus\\\" require 4 seeds\\n\"\n+              << \"be specified with the parameter named \\\"initialSeedSet\\\".\\n\"\n+              << \"Either \\\"initialSeedSet\\\" was not in the configuration\\n\"\n+              << \"or its size was not 4 for the module with label \\\"\" << label << \"\\\".\\n\" ;\n+          }\n+          if(initialSeedSet[0] > maxSeedXorShift128Plus ||\n+             initialSeedSet[1] > maxSeedXorShift128Plus || \n+             initialSeedSet[2] > maxSeedXorShift128Plus ||\n+             initialSeedSet[3] > maxSeedXorShift128Plus) {  // They need to fit in a 32 bit integer\n+            throw Exception(errors::Configuration)\n+              << \"The XorShift128Plus seeds should be in the range 0 to \" << maxSeedXorShift128Plus << \".\\n\"\n+              << \"The seeds passed to the RandomNumberGenerationService from the\\n\"\n+                 \"configuration file were \" << initialSeedSet[0] << \" , \" << initialSeedSet[1]\n+              << \" , \" << initialSeedSet[2] << \" , and \" << initialSeedSet[3]\n+              << \"\\nThis was for the module with label \\\"\" << label << \"\\\".\\n\";\n+          }","path":"IOMC/RandomEngine/src/RandomNumberGeneratorService.cc","position":38,"original_position":38,"commit_id":"f021188aa21685273abb3b11c301c52acc1e1859","original_commit_id":"d50f69739b893fbcc30681627e2cca91bb593879","user":{"login":"wddgit","id":4295891,"avatar_url":"https://avatars.githubusercontent.com/u/4295891?v=3","gravatar_id":"","url":"https://api.github.com/users/wddgit","html_url":"https://github.com/wddgit","followers_url":"https://api.github.com/users/wddgit/followers","following_url":"https://api.github.com/users/wddgit/following{/other_user}","gists_url":"https://api.github.com/users/wddgit/gists{/gist_id}","starred_url":"https://api.github.com/users/wddgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wddgit/subscriptions","organizations_url":"https://api.github.com/users/wddgit/orgs","repos_url":"https://api.github.com/users/wddgit/repos","events_url":"https://api.github.com/users/wddgit/events{/privacy}","received_events_url":"https://api.github.com/users/wddgit/received_events","type":"User","site_admin":false},"body":"It would probably be worth checking that all four seeds are not zero. Actually, given the offsets that might be applied to the first seed by incrementing it, if you check here you would need to check that the last 3 seeds are not all zero to be safe. And maybe a comment explaining that seed restrictions would be nice.\r\nAlso, it does not do much harm, but the check that the seeds are not too large seems unnecessary since they are stored in 32 bit integers and the max value is the max value of a 32 bit integer.\r\n","created_at":"2016-04-07T14:33:34Z","updated_at":"2016-04-07T14:33:34Z","html_url":"https://github.com/cms-sw/cmssw/pull/13921#discussion_r58881417","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/58881417"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/13921#discussion_r58881417"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921","id":65191538,"html_url":"https://github.com/cms-sw/cmssw/pull/13921","diff_url":"https://github.com/cms-sw/cmssw/pull/13921.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/13921.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/13921","number":13921,"state":"open","locked":false,"title":"XorShift128Plus Random Engine for RandomNumberGeneratorService","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"body":"Implement the \"xorshift128+\" engine, a very fast random number generator with period 2^128 -1 that passes the standard tests. This is necessary as part of trying to speed up HGCal digitization, where calling HepJamesRandom becomes very expensive. This achieves a factor of ~3 speed up in the RNG over HepJamesRandom.\r\n\r\nImplementation taken from:\r\nhttps://en.wikipedia.org/wiki/Xorshift#xorshift.2B\r\n\r\nPlease let me know if there are any unit tests or standard tests I should perform.","created_at":"2016-04-04T18:33:34Z","updated_at":"2016-04-07T14:33:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a603aab70ead5131f411a257e4bf83ffc98dca8","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_8_1_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/59/labels","id":1590252,"number":59,"title":"Next CMSSW_8_1_X","description":null,"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":71,"closed_issues":298,"state":"open","created_at":"2016-02-18T09:12:12Z","updated_at":"2016-04-07T14:19:30Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921/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/13921/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/f021188aa21685273abb3b11c301c52acc1e1859","head":{"label":"lgray:xorshift_engine","ref":"xorshift_engine","sha":"f021188aa21685273abb3b11c301c52acc1e1859","user":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"repo":{"id":11345764,"name":"cmssw","full_name":"lgray/cmssw","owner":{"login":"lgray","id":1068089,"avatar_url":"https://avatars.githubusercontent.com/u/1068089?v=3","gravatar_id":"","url":"https://api.github.com/users/lgray","html_url":"https://github.com/lgray","followers_url":"https://api.github.com/users/lgray/followers","following_url":"https://api.github.com/users/lgray/following{/other_user}","gists_url":"https://api.github.com/users/lgray/gists{/gist_id}","starred_url":"https://api.github.com/users/lgray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgray/subscriptions","organizations_url":"https://api.github.com/users/lgray/orgs","repos_url":"https://api.github.com/users/lgray/repos","events_url":"https://api.github.com/users/lgray/events{/privacy}","received_events_url":"https://api.github.com/users/lgray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lgray/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/lgray/cmssw","forks_url":"https://api.github.com/repos/lgray/cmssw/forks","keys_url":"https://api.github.com/repos/lgray/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lgray/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lgray/cmssw/teams","hooks_url":"https://api.github.com/repos/lgray/cmssw/hooks","issue_events_url":"https://api.github.com/repos/lgray/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/lgray/cmssw/events","assignees_url":"https://api.github.com/repos/lgray/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/lgray/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/lgray/cmssw/tags","blobs_url":"https://api.github.com/repos/lgray/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lgray/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lgray/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/lgray/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lgray/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/lgray/cmssw/languages","stargazers_url":"https://api.github.com/repos/lgray/cmssw/stargazers","contributors_url":"https://api.github.com/repos/lgray/cmssw/contributors","subscribers_url":"https://api.github.com/repos/lgray/cmssw/subscribers","subscription_url":"https://api.github.com/repos/lgray/cmssw/subscription","commits_url":"https://api.github.com/repos/lgray/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/lgray/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/lgray/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/lgray/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/lgray/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/lgray/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lgray/cmssw/merges","archive_url":"https://api.github.com/repos/lgray/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lgray/cmssw/downloads","issues_url":"https://api.github.com/repos/lgray/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/lgray/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/lgray/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/lgray/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lgray/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/lgray/cmssw/releases{/id}","deployments_url":"https://api.github.com/repos/lgray/cmssw/deployments","created_at":"2013-07-11T15:38:46Z","updated_at":"2014-06-25T06:00:50Z","pushed_at":"2016-04-07T12:57:17Z","git_url":"git://github.com/lgray/cmssw.git","ssh_url":"git@github.com:lgray/cmssw.git","clone_url":"https://github.com/lgray/cmssw.git","svn_url":"https://github.com/lgray/cmssw","homepage":"cms-sw.github.io/cmssw","size":863723,"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":"CMSSW_7_0_X"}},"base":{"label":"cms-sw:CMSSW_8_1_X","ref":"CMSSW_8_1_X","sha":"a1b87ee4f781310f105cd3ef37b67a81c801b9d5","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}","deployments_url":"https://api.github.com/repos/cms-sw/cmssw/deployments","created_at":"2013-06-26T14:09:07Z","updated_at":"2016-04-05T18:19:40Z","pushed_at":"2016-04-07T14:19:32Z","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":1043881,"stargazers_count":299,"watchers_count":299,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1779,"mirror_url":null,"open_issues_count":362,"forks":1779,"open_issues":362,"watchers":299,"default_branch":"CMSSW_8_1_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/13921"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/13921"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/13921/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/13921/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/13921/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/f021188aa21685273abb3b11c301c52acc1e1859"}}}}