{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/ctrl_events/pulls/comments/26059120","id":26059120,"diff_hunk":"@@ -97,27 +97,63 @@ Event::Event() {\n void Event::_init() {\n     _keywords.insert(TYPE);\n     _keywords.insert(EVENTTIME);\n-    _keywords.insert(HOSTID);\n-    _keywords.insert(RUNID);\n+//    _keywords.insert(RUNID);\n     _keywords.insert(STATUS);\n     _keywords.insert(TOPIC);\n     _keywords.insert(PUBTIME);\n }\n \n Event::Event(cms::TextMessage *msg) {\n-    _init();\n+    // _init();\n+\n+    vector<std::string>names = msg->getPropertyNames();\n+    unsigned int i;\n \n     _psp = processTextMessage(msg);\n \n-    _psp->set(TYPE, msg->getStringProperty(TYPE));\n-    _psp->set(HOSTID, msg->getStringProperty(HOSTID));\n-    _psp->set(RUNID, msg->getStringProperty(RUNID));\n-    _psp->set(STATUS, msg->getStringProperty(STATUS));\n-    _psp->set(TOPIC, msg->getStringProperty(TOPIC));\n-    _psp->set(EVENTTIME, msg->getLongProperty(EVENTTIME));\n-    _psp->set(PUBTIME, msg->getLongProperty(PUBTIME));\n-/*\n-*/\n+    for (i = 0; i < names.size(); i++)\n+            _keywords.insert(names[i]);\n+\n+    _psp->set(EVENTTIME, msg->getCMSTimestamp());\n+\n+    for (i = 0; i < names.size(); i++) {\n+        std::string name = names[i];\n+        cms::Message::ValueType vType = msg->getPropertyValueType(names[i]);\n+        switch(vType) {\n+            case cms::Message::NULL_TYPE:\n+                _psp->set(name, NULL);\n+                break;\n+            case cms::Message::BOOLEAN_TYPE:\n+                _psp->set(name, msg->getBooleanProperty(name));\n+                break;\n+            case cms::Message::BYTE_TYPE:\n+            case cms::Message::CHAR_TYPE:\n+                _psp->set(name, msg->getByteProperty(name));\n+                break;\n+            case cms::Message::SHORT_TYPE:\n+                _psp->set(name, msg->getShortProperty(name));\n+                break;\n+            case cms::Message::INTEGER_TYPE:\n+                _psp->set(name, msg->getIntProperty(name));\n+                break;\n+            case cms::Message::LONG_TYPE:\n+                _psp->set(name, msg->getLongProperty(name));\n+                break;\n+            case cms::Message::DOUBLE_TYPE:\n+                _psp->set(name, msg->getDoubleProperty(name));\n+                break;\n+            case cms::Message::FLOAT_TYPE:\n+                _psp->set(name, msg->getFloatProperty(name));\n+                break;\n+            case cms::Message::STRING_TYPE:\n+                _psp->set(name, msg->getStringProperty(name));\n+                break;\n+            case cms::Message::BYTE_ARRAY_TYPE:\n+            case cms::Message::UNKNOWN_TYPE:\n+                break;","path":"src/Event.cc","position":129,"original_position":129,"commit_id":"772942c2069c3043f3c6536f584a1290312ee56f","original_commit_id":"772942c2069c3043f3c6536f584a1290312ee56f","user":{"login":"PaulPrice","id":1334980,"avatar_url":"https://avatars.githubusercontent.com/u/1334980?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulPrice","html_url":"https://github.com/PaulPrice","followers_url":"https://api.github.com/users/PaulPrice/followers","following_url":"https://api.github.com/users/PaulPrice/following{/other_user}","gists_url":"https://api.github.com/users/PaulPrice/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulPrice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulPrice/subscriptions","organizations_url":"https://api.github.com/users/PaulPrice/orgs","repos_url":"https://api.github.com/users/PaulPrice/repos","events_url":"https://api.github.com/users/PaulPrice/events{/privacy}","received_events_url":"https://api.github.com/users/PaulPrice/received_events","type":"User","site_admin":false},"body":"Silently letting these drop on the floor.  You should at the least issue a warning.\r\nWhere's the `default` case?","created_at":"2015-03-09T18:00:43Z","updated_at":"2015-03-09T18:00:43Z","html_url":"https://github.com/lsst/ctrl_events/pull/1#discussion_r26059120","pull_request_url":"https://api.github.com/repos/lsst/ctrl_events/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/comments/26059120"},"html":{"href":"https://github.com/lsst/ctrl_events/pull/1#discussion_r26059120"},"pull_request":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/ctrl_events/pulls/1","id":29554159,"html_url":"https://github.com/lsst/ctrl_events/pull/1","diff_url":"https://github.com/lsst/ctrl_events/pull/1.diff","patch_url":"https://github.com/lsst/ctrl_events/pull/1.patch","issue_url":"https://api.github.com/repos/lsst/ctrl_events/issues/1","number":1,"state":"open","locked":false,"title":"DM-1350: General cleanup of Events package","user":{"login":"PaulPrice","id":1334980,"avatar_url":"https://avatars.githubusercontent.com/u/1334980?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulPrice","html_url":"https://github.com/PaulPrice","followers_url":"https://api.github.com/users/PaulPrice/followers","following_url":"https://api.github.com/users/PaulPrice/following{/other_user}","gists_url":"https://api.github.com/users/PaulPrice/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulPrice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulPrice/subscriptions","organizations_url":"https://api.github.com/users/PaulPrice/orgs","repos_url":"https://api.github.com/users/PaulPrice/repos","events_url":"https://api.github.com/users/PaulPrice/events{/privacy}","received_events_url":"https://api.github.com/users/PaulPrice/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-18T19:19:13Z","updated_at":"2015-03-09T18:00:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e55dfffc3d567b2dde872a5efc472f43d164306","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/ctrl_events/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lsst/ctrl_events/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lsst/ctrl_events/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/ctrl_events/issues/1/comments","statuses_url":"https://api.github.com/repos/lsst/ctrl_events/statuses/772942c2069c3043f3c6536f584a1290312ee56f","head":{"label":"lsst:tickets/DM-1350","ref":"tickets/DM-1350","sha":"772942c2069c3043f3c6536f584a1290312ee56f","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013228,"name":"ctrl_events","full_name":"lsst/ctrl_events","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/ctrl_events","description":"LSST Data Management events messaging","fork":false,"url":"https://api.github.com/repos/lsst/ctrl_events","forks_url":"https://api.github.com/repos/lsst/ctrl_events/forks","keys_url":"https://api.github.com/repos/lsst/ctrl_events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/ctrl_events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/ctrl_events/teams","hooks_url":"https://api.github.com/repos/lsst/ctrl_events/hooks","issue_events_url":"https://api.github.com/repos/lsst/ctrl_events/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/ctrl_events/events","assignees_url":"https://api.github.com/repos/lsst/ctrl_events/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/ctrl_events/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/ctrl_events/tags","blobs_url":"https://api.github.com/repos/lsst/ctrl_events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/ctrl_events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/ctrl_events/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/ctrl_events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/ctrl_events/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/ctrl_events/languages","stargazers_url":"https://api.github.com/repos/lsst/ctrl_events/stargazers","contributors_url":"https://api.github.com/repos/lsst/ctrl_events/contributors","subscribers_url":"https://api.github.com/repos/lsst/ctrl_events/subscribers","subscription_url":"https://api.github.com/repos/lsst/ctrl_events/subscription","commits_url":"https://api.github.com/repos/lsst/ctrl_events/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/ctrl_events/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/ctrl_events/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/ctrl_events/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/ctrl_events/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/ctrl_events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/ctrl_events/merges","archive_url":"https://api.github.com/repos/lsst/ctrl_events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/ctrl_events/downloads","issues_url":"https://api.github.com/repos/lsst/ctrl_events/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/ctrl_events/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/ctrl_events/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/ctrl_events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/ctrl_events/labels{/name}","releases_url":"https://api.github.com/repos/lsst/ctrl_events/releases{/id}","created_at":"2014-08-16T07:40:03Z","updated_at":"2015-02-13T00:18:08Z","pushed_at":"2015-03-02T21:20:23Z","git_url":"git://github.com/lsst/ctrl_events.git","ssh_url":"git@github.com:lsst/ctrl_events.git","clone_url":"https://github.com/lsst/ctrl_events.git","svn_url":"https://github.com/lsst/ctrl_events","homepage":"http://dm.lsst.org","size":1350,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"6f35c86b98231a851b69c79236eab6af8920daa5","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013228,"name":"ctrl_events","full_name":"lsst/ctrl_events","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/ctrl_events","description":"LSST Data Management events messaging","fork":false,"url":"https://api.github.com/repos/lsst/ctrl_events","forks_url":"https://api.github.com/repos/lsst/ctrl_events/forks","keys_url":"https://api.github.com/repos/lsst/ctrl_events/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/ctrl_events/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/ctrl_events/teams","hooks_url":"https://api.github.com/repos/lsst/ctrl_events/hooks","issue_events_url":"https://api.github.com/repos/lsst/ctrl_events/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/ctrl_events/events","assignees_url":"https://api.github.com/repos/lsst/ctrl_events/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/ctrl_events/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/ctrl_events/tags","blobs_url":"https://api.github.com/repos/lsst/ctrl_events/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/ctrl_events/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/ctrl_events/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/ctrl_events/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/ctrl_events/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/ctrl_events/languages","stargazers_url":"https://api.github.com/repos/lsst/ctrl_events/stargazers","contributors_url":"https://api.github.com/repos/lsst/ctrl_events/contributors","subscribers_url":"https://api.github.com/repos/lsst/ctrl_events/subscribers","subscription_url":"https://api.github.com/repos/lsst/ctrl_events/subscription","commits_url":"https://api.github.com/repos/lsst/ctrl_events/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/ctrl_events/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/ctrl_events/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/ctrl_events/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/ctrl_events/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/ctrl_events/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/ctrl_events/merges","archive_url":"https://api.github.com/repos/lsst/ctrl_events/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/ctrl_events/downloads","issues_url":"https://api.github.com/repos/lsst/ctrl_events/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/ctrl_events/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/ctrl_events/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/ctrl_events/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/ctrl_events/labels{/name}","releases_url":"https://api.github.com/repos/lsst/ctrl_events/releases{/id}","created_at":"2014-08-16T07:40:03Z","updated_at":"2015-02-13T00:18:08Z","pushed_at":"2015-03-02T21:20:23Z","git_url":"git://github.com/lsst/ctrl_events.git","ssh_url":"git@github.com:lsst/ctrl_events.git","clone_url":"https://github.com/lsst/ctrl_events.git","svn_url":"https://github.com/lsst/ctrl_events","homepage":"http://dm.lsst.org","size":1350,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/1"},"html":{"href":"https://github.com/lsst/ctrl_events/pull/1"},"issue":{"href":"https://api.github.com/repos/lsst/ctrl_events/issues/1"},"comments":{"href":"https://api.github.com/repos/lsst/ctrl_events/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/ctrl_events/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/ctrl_events/statuses/772942c2069c3043f3c6536f584a1290312ee56f"}}}}