{"action":"created","comment":{"url":"https://api.github.com/repos/cbernet/heppy/pulls/comments/85710477","pull_request_review_id":6409426,"id":85710477,"diff_hunk":"@@ -49,54 +50,133 @@ def save(self, outdir, filetype='png'):\n         os.mkdir(outdir)\n         for view in self.views.values():\n             view.save(outdir, filetype)\n-        \n \n class ViewPane(object):\n     nviews = 0\n     def __init__(self, name, projection, nx, xmin, xmax, ny, ymin, ymax,\n-                 dx=600, dy=600):\n+                 dx=600, dy=600, pads=[\"\"]):\n         self.projection = projection\n-        tx = 50 + self.__class__.nviews * (dx+10) \n+        self.hists = dict()\n+        self.registered = dict()\n+        self.locked = dict()\n+        tx = 50 + self.__class__.nviews * (dx+10)\n         ty = 50\n-        self.canvas = TCanvas(name, name, tx, ty, dx, dy)\n+        width = 1\n+        height = 1\n+        self.npads = 1\n+        self.pads = dict()\n+ \n+        if not pads is None:\n+            self.npads = len(pads)\n+            if self.npads%8 == 0 and self.npads >= 8:\n+                width = width*4\n+                height = height *self.npads/4\n+                dx = dx/2\n+                dy = dy/2\n+                xmax = 2\n+                ymin = -xmax\n+                xmin = -xmax\n+                ymax = xmax\n+\n+            else:\n+                width = width * self.npads\n+        else:\n+            pads = [\"\"]\n+            \n+        self.canvas = TCanvas(name, name, tx, ty, width *dx, height*dy)\n+        self.canvas.SetRightMargin(0.)\n+        self.canvas.SetLeftMargin(0.)\n+        self.canvas.SetTopMargin(0.) \n+        self.canvas.SetBottomMargin(0.) \n+                   \n+        self.canvas.Divide(width, height)\n+            \n+        for x in range(0, self.npads):\n+            c1 = self.canvas.cd(x+1)\n+            c1.SetLeftMargin(0.0015)\n+            c1.SetRightMargin(0.0015)  \n+            c1.SetTopMargin(0.0015)  \n+            c1.SetBottomMargin(0.0015)  \n+            panename = name + \": \" + pads[x]\n+            self.pads[x] = ViewPad(panename, name, nx, xmin, xmax, ny, ymin, ymax, side=x)\n+            \n+        self.__class__.nviews += 1 \n+        \n+    def register(self, obj, layer, clearable=True, sides=None):\n+        if sides is None:\n+            sides = range(0, len(self.pads))\n+        \n+        for x in sides:\n+            self.pads[x].register(obj, layer, clearable)\n+\n+    def clear(self):\n+        for p in self.pads.itervalues():\n+            p.clear()\n+        \n+    def draw(self):\n+        for x in range(0, self.npads):\n+            if self.canvas is None:\n+                pass\n+            else:\n+                self.canvas.cd(x+1)\n+                self.pads[x].draw()\n+                self.canvas.Update()\n+\n+    def zoom(self, xmin, xmax, ymin, ymax):\n+        for p in self.pads.itervalues():\n+            p.zoom(xmin, xmax, ymin, ymax)\n+        self.draw()    \n+\n+    def unzoom(self):\n+        for p in self.pads.itervalues():\n+            p.unzoom()\n+            \n+        #self.canvas.Modified()\n+        self.draw()   \n+\n+    def save(self, outdir, filetype):\n+        fname = '{outdir}/{name}.{filetype}'.format(outdir=outdir,\n+                                                    name=self.canvas.GetName(),\n+                                                    filetype=filetype)\n+        self.canvas.SaveAs(fname)\n+\n+  \n+class ViewPad(object):\n+    \n+    def __init__(self, name, projection, nx, xmin, xmax, ny, ymin, ymax, side=0):\n+        self.side = side\n+        self.projection = projection\n+        ","path":"display/core.py","position":157,"original_position":157,"commit_id":"422aefa735e1ff08d10dcc44b7c0dd183790d028","original_commit_id":"422aefa735e1ff08d10dcc44b7c0dd183790d028","user":{"login":"alicerobson","id":14326746,"avatar_url":"https://avatars.githubusercontent.com/u/14326746?v=3","gravatar_id":"","url":"https://api.github.com/users/alicerobson","html_url":"https://github.com/alicerobson","followers_url":"https://api.github.com/users/alicerobson/followers","following_url":"https://api.github.com/users/alicerobson/following{/other_user}","gists_url":"https://api.github.com/users/alicerobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alicerobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicerobson/subscriptions","organizations_url":"https://api.github.com/users/alicerobson/orgs","repos_url":"https://api.github.com/users/alicerobson/repos","events_url":"https://api.github.com/users/alicerobson/events{/privacy}","received_events_url":"https://api.github.com/users/alicerobson/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2016-10-31T10:04:26Z","updated_at":"2016-10-31T10:04:26Z","html_url":"https://github.com/cbernet/heppy/pull/29#discussion_r85710477","pull_request_url":"https://api.github.com/repos/cbernet/heppy/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/comments/85710477"},"html":{"href":"https://github.com/cbernet/heppy/pull/29#discussion_r85710477"},"pull_request":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/cbernet/heppy/pulls/29","id":89798649,"html_url":"https://github.com/cbernet/heppy/pull/29","diff_url":"https://github.com/cbernet/heppy/pull/29.diff","patch_url":"https://github.com/cbernet/heppy/pull/29.patch","issue_url":"https://api.github.com/repos/cbernet/heppy/issues/29","number":29,"state":"open","locked":false,"title":"Papasevent","user":{"login":"alicerobson","id":14326746,"avatar_url":"https://avatars.githubusercontent.com/u/14326746?v=3","gravatar_id":"","url":"https://api.github.com/users/alicerobson","html_url":"https://github.com/alicerobson","followers_url":"https://api.github.com/users/alicerobson/followers","following_url":"https://api.github.com/users/alicerobson/following{/other_user}","gists_url":"https://api.github.com/users/alicerobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alicerobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicerobson/subscriptions","organizations_url":"https://api.github.com/users/alicerobson/orgs","repos_url":"https://api.github.com/users/alicerobson/repos","events_url":"https://api.github.com/users/alicerobson/events{/privacy}","received_events_url":"https://api.github.com/users/alicerobson/received_events","type":"User","site_admin":false},"body":"Hi Colin\n\nPull request now OK to examine.\nOne thing I know is not OK yet (would like to discuss) is the use of \"if display\" in the configuration files. My new \"plotting\" analyzers  mean this probably requires some adaptation. \n\nThanks\nAlice\n","created_at":"2016-10-18T11:46:03Z","updated_at":"2016-10-31T10:04:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cbernet/heppy/pulls/29/commits","review_comments_url":"https://api.github.com/repos/cbernet/heppy/pulls/29/comments","review_comment_url":"https://api.github.com/repos/cbernet/heppy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbernet/heppy/issues/29/comments","statuses_url":"https://api.github.com/repos/cbernet/heppy/statuses/422aefa735e1ff08d10dcc44b7c0dd183790d028","head":{"label":"alicerobson:papasevent","ref":"papasevent","sha":"422aefa735e1ff08d10dcc44b7c0dd183790d028","user":{"login":"alicerobson","id":14326746,"avatar_url":"https://avatars.githubusercontent.com/u/14326746?v=3","gravatar_id":"","url":"https://api.github.com/users/alicerobson","html_url":"https://github.com/alicerobson","followers_url":"https://api.github.com/users/alicerobson/followers","following_url":"https://api.github.com/users/alicerobson/following{/other_user}","gists_url":"https://api.github.com/users/alicerobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alicerobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicerobson/subscriptions","organizations_url":"https://api.github.com/users/alicerobson/orgs","repos_url":"https://api.github.com/users/alicerobson/repos","events_url":"https://api.github.com/users/alicerobson/events{/privacy}","received_events_url":"https://api.github.com/users/alicerobson/received_events","type":"User","site_admin":false},"repo":{"id":42855691,"name":"heppy","full_name":"alicerobson/heppy","owner":{"login":"alicerobson","id":14326746,"avatar_url":"https://avatars.githubusercontent.com/u/14326746?v=3","gravatar_id":"","url":"https://api.github.com/users/alicerobson","html_url":"https://github.com/alicerobson","followers_url":"https://api.github.com/users/alicerobson/followers","following_url":"https://api.github.com/users/alicerobson/following{/other_user}","gists_url":"https://api.github.com/users/alicerobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alicerobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alicerobson/subscriptions","organizations_url":"https://api.github.com/users/alicerobson/orgs","repos_url":"https://api.github.com/users/alicerobson/repos","events_url":"https://api.github.com/users/alicerobson/events{/privacy}","received_events_url":"https://api.github.com/users/alicerobson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alicerobson/heppy","description":"A python event processing framework for high energy physics based on ROOT","fork":true,"url":"https://api.github.com/repos/alicerobson/heppy","forks_url":"https://api.github.com/repos/alicerobson/heppy/forks","keys_url":"https://api.github.com/repos/alicerobson/heppy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alicerobson/heppy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alicerobson/heppy/teams","hooks_url":"https://api.github.com/repos/alicerobson/heppy/hooks","issue_events_url":"https://api.github.com/repos/alicerobson/heppy/issues/events{/number}","events_url":"https://api.github.com/repos/alicerobson/heppy/events","assignees_url":"https://api.github.com/repos/alicerobson/heppy/assignees{/user}","branches_url":"https://api.github.com/repos/alicerobson/heppy/branches{/branch}","tags_url":"https://api.github.com/repos/alicerobson/heppy/tags","blobs_url":"https://api.github.com/repos/alicerobson/heppy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alicerobson/heppy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alicerobson/heppy/git/refs{/sha}","trees_url":"https://api.github.com/repos/alicerobson/heppy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alicerobson/heppy/statuses/{sha}","languages_url":"https://api.github.com/repos/alicerobson/heppy/languages","stargazers_url":"https://api.github.com/repos/alicerobson/heppy/stargazers","contributors_url":"https://api.github.com/repos/alicerobson/heppy/contributors","subscribers_url":"https://api.github.com/repos/alicerobson/heppy/subscribers","subscription_url":"https://api.github.com/repos/alicerobson/heppy/subscription","commits_url":"https://api.github.com/repos/alicerobson/heppy/commits{/sha}","git_commits_url":"https://api.github.com/repos/alicerobson/heppy/git/commits{/sha}","comments_url":"https://api.github.com/repos/alicerobson/heppy/comments{/number}","issue_comment_url":"https://api.github.com/repos/alicerobson/heppy/issues/comments{/number}","contents_url":"https://api.github.com/repos/alicerobson/heppy/contents/{+path}","compare_url":"https://api.github.com/repos/alicerobson/heppy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alicerobson/heppy/merges","archive_url":"https://api.github.com/repos/alicerobson/heppy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alicerobson/heppy/downloads","issues_url":"https://api.github.com/repos/alicerobson/heppy/issues{/number}","pulls_url":"https://api.github.com/repos/alicerobson/heppy/pulls{/number}","milestones_url":"https://api.github.com/repos/alicerobson/heppy/milestones{/number}","notifications_url":"https://api.github.com/repos/alicerobson/heppy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alicerobson/heppy/labels{/name}","releases_url":"https://api.github.com/repos/alicerobson/heppy/releases{/id}","deployments_url":"https://api.github.com/repos/alicerobson/heppy/deployments","created_at":"2015-09-21T09:09:16Z","updated_at":"2015-09-21T09:09:16Z","pushed_at":"2016-10-18T13:56:27Z","git_url":"git://github.com/alicerobson/heppy.git","ssh_url":"git@github.com:alicerobson/heppy.git","clone_url":"https://github.com/alicerobson/heppy.git","svn_url":"https://github.com/alicerobson/heppy","homepage":"","size":24607,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"master"}},"base":{"label":"cbernet:master","ref":"master","sha":"cdd458703d8dc7de560cb75e4e35ed3e1299dc19","user":{"login":"cbernet","id":4138171,"avatar_url":"https://avatars.githubusercontent.com/u/4138171?v=3","gravatar_id":"","url":"https://api.github.com/users/cbernet","html_url":"https://github.com/cbernet","followers_url":"https://api.github.com/users/cbernet/followers","following_url":"https://api.github.com/users/cbernet/following{/other_user}","gists_url":"https://api.github.com/users/cbernet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbernet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbernet/subscriptions","organizations_url":"https://api.github.com/users/cbernet/orgs","repos_url":"https://api.github.com/users/cbernet/repos","events_url":"https://api.github.com/users/cbernet/events{/privacy}","received_events_url":"https://api.github.com/users/cbernet/received_events","type":"User","site_admin":false},"repo":{"id":20684927,"name":"heppy","full_name":"cbernet/heppy","owner":{"login":"cbernet","id":4138171,"avatar_url":"https://avatars.githubusercontent.com/u/4138171?v=3","gravatar_id":"","url":"https://api.github.com/users/cbernet","html_url":"https://github.com/cbernet","followers_url":"https://api.github.com/users/cbernet/followers","following_url":"https://api.github.com/users/cbernet/following{/other_user}","gists_url":"https://api.github.com/users/cbernet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbernet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbernet/subscriptions","organizations_url":"https://api.github.com/users/cbernet/orgs","repos_url":"https://api.github.com/users/cbernet/repos","events_url":"https://api.github.com/users/cbernet/events{/privacy}","received_events_url":"https://api.github.com/users/cbernet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbernet/heppy","description":"A python event processing framework for high energy physics based on ROOT","fork":false,"url":"https://api.github.com/repos/cbernet/heppy","forks_url":"https://api.github.com/repos/cbernet/heppy/forks","keys_url":"https://api.github.com/repos/cbernet/heppy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbernet/heppy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbernet/heppy/teams","hooks_url":"https://api.github.com/repos/cbernet/heppy/hooks","issue_events_url":"https://api.github.com/repos/cbernet/heppy/issues/events{/number}","events_url":"https://api.github.com/repos/cbernet/heppy/events","assignees_url":"https://api.github.com/repos/cbernet/heppy/assignees{/user}","branches_url":"https://api.github.com/repos/cbernet/heppy/branches{/branch}","tags_url":"https://api.github.com/repos/cbernet/heppy/tags","blobs_url":"https://api.github.com/repos/cbernet/heppy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbernet/heppy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbernet/heppy/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbernet/heppy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbernet/heppy/statuses/{sha}","languages_url":"https://api.github.com/repos/cbernet/heppy/languages","stargazers_url":"https://api.github.com/repos/cbernet/heppy/stargazers","contributors_url":"https://api.github.com/repos/cbernet/heppy/contributors","subscribers_url":"https://api.github.com/repos/cbernet/heppy/subscribers","subscription_url":"https://api.github.com/repos/cbernet/heppy/subscription","commits_url":"https://api.github.com/repos/cbernet/heppy/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbernet/heppy/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbernet/heppy/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbernet/heppy/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbernet/heppy/contents/{+path}","compare_url":"https://api.github.com/repos/cbernet/heppy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbernet/heppy/merges","archive_url":"https://api.github.com/repos/cbernet/heppy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbernet/heppy/downloads","issues_url":"https://api.github.com/repos/cbernet/heppy/issues{/number}","pulls_url":"https://api.github.com/repos/cbernet/heppy/pulls{/number}","milestones_url":"https://api.github.com/repos/cbernet/heppy/milestones{/number}","notifications_url":"https://api.github.com/repos/cbernet/heppy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbernet/heppy/labels{/name}","releases_url":"https://api.github.com/repos/cbernet/heppy/releases{/id}","deployments_url":"https://api.github.com/repos/cbernet/heppy/deployments","created_at":"2014-06-10T12:51:12Z","updated_at":"2016-10-29T10:32:39Z","pushed_at":"2016-10-29T10:36:09Z","git_url":"git://github.com/cbernet/heppy.git","ssh_url":"git@github.com:cbernet/heppy.git","clone_url":"https://github.com/cbernet/heppy.git","svn_url":"https://github.com/cbernet/heppy","homepage":"","size":33015,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":11,"forks":19,"open_issues":11,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/29"},"html":{"href":"https://github.com/cbernet/heppy/pull/29"},"issue":{"href":"https://api.github.com/repos/cbernet/heppy/issues/29"},"comments":{"href":"https://api.github.com/repos/cbernet/heppy/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbernet/heppy/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/cbernet/heppy/statuses/422aefa735e1ff08d10dcc44b7c0dd183790d028"}}}}
{"actor":{"display_login":"alicerobson"}}