{"action":"created","comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/31725821","id":31725821,"diff_hunk":"@@ -0,0 +1,131 @@\n+// -*- C++ -*-\n+//\n+// Package:    ProdTutorial/LumiRawToDigi\n+// Class:      LumiRawToDigi\n+// \n+/**\\class LumiRawToDigi LumiRawToDigi.cc ProdTutorial/LumiRawToDigi/plugins/LumiRawToDigi.cc\n+\n+ Description:  Producer to unpack lumi nibble from TCDS \n+\n+*/\n+//\n+// Original Author:  Chris Palmer\n+//         Created:  Thu, 28 May 2015 19:54:56 GMT\n+//\n+//\n+\n+\n+// system include files\n+#include <memory>\n+#include <iostream>\n+\n+// user include files\n+#include \"FWCore/Framework/interface/Frameworkfwd.h\"\n+#include \"FWCore/Framework/interface/EDProducer.h\"\n+\n+#include \"FWCore/Framework/interface/Event.h\"\n+#include \"FWCore/Framework/interface/MakerMacros.h\"\n+\n+#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n+\n+\n+#include \"DataFormats/FEDRawData/interface/FEDRawDataCollection.h\"\n+#include \"DataFormats/FEDRawData/interface/FEDHeader.h\"\n+#include \"DataFormats/FEDRawData/interface/FEDTrailer.h\"\n+#include \"DataFormats/FEDRawData/interface/FEDNumbering.h\"\n+\n+#include \"EventFilter/FEDInterface/interface/GlobalEventNumber.h\"\n+#include \"EventFilter/FEDInterface/interface/FED1024.h\"\n+\n+#include \"DataFormats/FEDRawData/interface/FEDRawData.h\"\n+\n+\n+using namespace std;\n+\n+//\n+// class declaration\n+//\n+\n+class LumiRawToDigi : public edm::EDProducer {\n+   public:\n+      explicit LumiRawToDigi(const edm::ParameterSet&);\n+      ~LumiRawToDigi();\n+\n+      static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);\n+\n+   private:\n+      virtual void beginJob() override;\n+      virtual void produce(edm::Event&, const edm::EventSetup&) override;\n+      virtual void endJob() override;\n+      \n+      int nibble;\n+      edm::EDGetTokenT<FEDRawDataCollection> dataToken_;\n+      \n+};\n+\n+LumiRawToDigi::LumiRawToDigi(const edm::ParameterSet& iConfig)\n+{\n+    edm::InputTag dataLabel = iConfig.getParameter<edm::InputTag>(\"InputLabel\");\n+    dataToken_=consumes<FEDRawDataCollection>(dataLabel);\n+    produces<int>( \"nibble\" ).setBranchAlias( \"nibble\");\n+}\n+\n+\n+LumiRawToDigi::~LumiRawToDigi()\n+{\n+}\n+\n+\n+//\n+// member functions\n+//\n+\n+// ------------ method called to produce the data  ------------\n+void LumiRawToDigi::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)\n+{\n+    using namespace edm;\n+\n+    edm::Handle<FEDRawDataCollection> rawdata;  \n+    iEvent.getByToken(dataToken_,rawdata);\n+\n+    if( rawdata.isValid() ) {\n+        const FEDRawData& tcdsData = rawdata->FEDData(FEDNumbering::MINTCDSuTCAFEDID);\n+        if(tcdsData.size()>0){\n+            evf::evtn::TCDSRecord tcdsRecord(tcdsData.data());\n+            nibble = (int)tcdsRecord.getHeader().getData().header.nibble;\n+        } else {\n+            nibble=-2;\n+        }\n+    } else {\n+        nibble=-1;\n+    }\n+    std::cout<<\"nibble is \"<<nibble<<std::endl;\n+\n+    std::unique_ptr<int> pOut(new int(nibble));\n+    iEvent.put( std::move(pOut), \"nibble\" );\n+}\n+\n+// ------------ method called once each job just before starting event loop  ------------\n+void ","path":"EventFilter/LumiRawToDigi/plugins/LumiRawToDigi.cc","position":109,"original_position":109,"commit_id":"13d2e0104191c03905a4d4ba339867bc794ddaed","original_commit_id":"13d2e0104191c03905a4d4ba339867bc794ddaed","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},"body":"remove these (beginJob and endJob)","created_at":"2015-06-04T14:35:19Z","updated_at":"2015-06-04T14:35:19Z","html_url":"https://github.com/cms-sw/cmssw/pull/9394#discussion_r31725821","pull_request_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394","_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/comments/31725821"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/9394#discussion_r31725821"},"pull_request":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394"}}},"pull_request":{"url":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394","id":36676780,"html_url":"https://github.com/cms-sw/cmssw/pull/9394","diff_url":"https://github.com/cms-sw/cmssw/pull/9394.diff","patch_url":"https://github.com/cms-sw/cmssw/pull/9394.patch","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/9394","number":9394,"state":"open","locked":false,"title":"Add luminibble unpacker","user":{"login":"capalmer85","id":5417607,"avatar_url":"https://avatars.githubusercontent.com/u/5417607?v=3","gravatar_id":"","url":"https://api.github.com/users/capalmer85","html_url":"https://github.com/capalmer85","followers_url":"https://api.github.com/users/capalmer85/followers","following_url":"https://api.github.com/users/capalmer85/following{/other_user}","gists_url":"https://api.github.com/users/capalmer85/gists{/gist_id}","starred_url":"https://api.github.com/users/capalmer85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capalmer85/subscriptions","organizations_url":"https://api.github.com/users/capalmer85/orgs","repos_url":"https://api.github.com/users/capalmer85/repos","events_url":"https://api.github.com/users/capalmer85/events{/privacy}","received_events_url":"https://api.github.com/users/capalmer85/received_events","type":"User","site_admin":false},"body":"This module works and is safe, but it does not get into the Events tree.  How should we go about that?","created_at":"2015-06-01T22:14:22Z","updated_at":"2015-06-04T14:35:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a0fe16303da48a36fe3fc655e920c3fdc53c67d","assignee":null,"milestone":{"url":"https://api.github.com/repos/cms-sw/cmssw/milestones/51","html_url":"https://github.com/cms-sw/cmssw/milestones/Next%20CMSSW_7_5_X","labels_url":"https://api.github.com/repos/cms-sw/cmssw/milestones/51/labels","id":982516,"number":51,"title":"Next CMSSW_7_5_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":81,"closed_issues":772,"state":"open","created_at":"2015-02-17T08:21:25Z","updated_at":"2015-06-04T13:41:10Z","due_on":"2015-05-31T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394/commits","review_comments_url":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394/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/9394/comments","statuses_url":"https://api.github.com/repos/cms-sw/cmssw/statuses/13d2e0104191c03905a4d4ba339867bc794ddaed","head":{"label":"capalmer85:add-luminibble-unpacker","ref":"add-luminibble-unpacker","sha":"13d2e0104191c03905a4d4ba339867bc794ddaed","user":{"login":"capalmer85","id":5417607,"avatar_url":"https://avatars.githubusercontent.com/u/5417607?v=3","gravatar_id":"","url":"https://api.github.com/users/capalmer85","html_url":"https://github.com/capalmer85","followers_url":"https://api.github.com/users/capalmer85/followers","following_url":"https://api.github.com/users/capalmer85/following{/other_user}","gists_url":"https://api.github.com/users/capalmer85/gists{/gist_id}","starred_url":"https://api.github.com/users/capalmer85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capalmer85/subscriptions","organizations_url":"https://api.github.com/users/capalmer85/orgs","repos_url":"https://api.github.com/users/capalmer85/repos","events_url":"https://api.github.com/users/capalmer85/events{/privacy}","received_events_url":"https://api.github.com/users/capalmer85/received_events","type":"User","site_admin":false},"repo":{"id":24766706,"name":"cmssw","full_name":"capalmer85/cmssw","owner":{"login":"capalmer85","id":5417607,"avatar_url":"https://avatars.githubusercontent.com/u/5417607?v=3","gravatar_id":"","url":"https://api.github.com/users/capalmer85","html_url":"https://github.com/capalmer85","followers_url":"https://api.github.com/users/capalmer85/followers","following_url":"https://api.github.com/users/capalmer85/following{/other_user}","gists_url":"https://api.github.com/users/capalmer85/gists{/gist_id}","starred_url":"https://api.github.com/users/capalmer85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capalmer85/subscriptions","organizations_url":"https://api.github.com/users/capalmer85/orgs","repos_url":"https://api.github.com/users/capalmer85/repos","events_url":"https://api.github.com/users/capalmer85/events{/privacy}","received_events_url":"https://api.github.com/users/capalmer85/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/capalmer85/cmssw","description":"CMS Offline Software","fork":true,"url":"https://api.github.com/repos/capalmer85/cmssw","forks_url":"https://api.github.com/repos/capalmer85/cmssw/forks","keys_url":"https://api.github.com/repos/capalmer85/cmssw/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capalmer85/cmssw/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capalmer85/cmssw/teams","hooks_url":"https://api.github.com/repos/capalmer85/cmssw/hooks","issue_events_url":"https://api.github.com/repos/capalmer85/cmssw/issues/events{/number}","events_url":"https://api.github.com/repos/capalmer85/cmssw/events","assignees_url":"https://api.github.com/repos/capalmer85/cmssw/assignees{/user}","branches_url":"https://api.github.com/repos/capalmer85/cmssw/branches{/branch}","tags_url":"https://api.github.com/repos/capalmer85/cmssw/tags","blobs_url":"https://api.github.com/repos/capalmer85/cmssw/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capalmer85/cmssw/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capalmer85/cmssw/git/refs{/sha}","trees_url":"https://api.github.com/repos/capalmer85/cmssw/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capalmer85/cmssw/statuses/{sha}","languages_url":"https://api.github.com/repos/capalmer85/cmssw/languages","stargazers_url":"https://api.github.com/repos/capalmer85/cmssw/stargazers","contributors_url":"https://api.github.com/repos/capalmer85/cmssw/contributors","subscribers_url":"https://api.github.com/repos/capalmer85/cmssw/subscribers","subscription_url":"https://api.github.com/repos/capalmer85/cmssw/subscription","commits_url":"https://api.github.com/repos/capalmer85/cmssw/commits{/sha}","git_commits_url":"https://api.github.com/repos/capalmer85/cmssw/git/commits{/sha}","comments_url":"https://api.github.com/repos/capalmer85/cmssw/comments{/number}","issue_comment_url":"https://api.github.com/repos/capalmer85/cmssw/issues/comments{/number}","contents_url":"https://api.github.com/repos/capalmer85/cmssw/contents/{+path}","compare_url":"https://api.github.com/repos/capalmer85/cmssw/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capalmer85/cmssw/merges","archive_url":"https://api.github.com/repos/capalmer85/cmssw/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capalmer85/cmssw/downloads","issues_url":"https://api.github.com/repos/capalmer85/cmssw/issues{/number}","pulls_url":"https://api.github.com/repos/capalmer85/cmssw/pulls{/number}","milestones_url":"https://api.github.com/repos/capalmer85/cmssw/milestones{/number}","notifications_url":"https://api.github.com/repos/capalmer85/cmssw/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capalmer85/cmssw/labels{/name}","releases_url":"https://api.github.com/repos/capalmer85/cmssw/releases{/id}","created_at":"2014-10-03T17:09:12Z","updated_at":"2014-10-02T08:13:36Z","pushed_at":"2015-06-02T22:11:39Z","git_url":"git://github.com/capalmer85/cmssw.git","ssh_url":"git@github.com:capalmer85/cmssw.git","clone_url":"https://github.com/capalmer85/cmssw.git","svn_url":"https://github.com/capalmer85/cmssw","homepage":"cms-sw.github.io/cmssw","size":745670,"stargazers_count":0,"watchers_count":0,"language":null,"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_3_X"}},"base":{"label":"cms-sw:CMSSW_7_5_X","ref":"CMSSW_7_5_X","sha":"3194756d38bc1da9e9855194654f47ac3b6ed882","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-06-04T06:13:02Z","pushed_at":"2015-06-04T13:52:57Z","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":1020862,"stargazers_count":239,"watchers_count":239,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1416,"mirror_url":null,"open_issues_count":171,"forks":1416,"open_issues":171,"watchers":239,"default_branch":"CMSSW_7_5_X"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394"},"html":{"href":"https://github.com/cms-sw/cmssw/pull/9394"},"issue":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/9394"},"comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/issues/9394/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-sw/cmssw/pulls/9394/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/9394/commits"},"statuses":{"href":"https://api.github.com/repos/cms-sw/cmssw/statuses/13d2e0104191c03905a4d4ba339867bc794ddaed"}}}}