{"action":"created","comment":{"url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/comments/25337151","id":25337151,"diff_hunk":"@@ -0,0 +1,78 @@\n+/*\n+ * TTreeManager.h\n+ *\n+ *  Created on: 5 Feb 2015\n+ *      Author: ejclemen\n+ */\n+\n+#ifndef TTreeManager_H_\n+#define TTreeManager_H_\n+#include \"TTreeCollection.h\"\n+#include \"TTree.h\"\n+#include \"TBranch.h\"\n+#include \"../../interface/DataTypes.h\"\n+#include <boost/shared_ptr.hpp>\n+#include <boost/array.hpp>\n+#include <boost/multi_array.hpp>\n+#include \"TFile.h\"\n+#include <string>\n+#include <vector>\n+ \n+namespace BAT {\n+typedef boost::array<TBranchCollectionRef, DataType::NUMBER_OF_DATA_TYPES> TBranchArray;\n+typedef boost::shared_ptr<TBranch> TBranchPtr;\n+\n+struct BranchAccessException: public std::exception {\n+\tTString msg;\n+\tBranchAccessException(TString message) :\n+\t\t\tmsg(message) {\n+\t}\n+\t~BranchAccessException() throw () {\n+\t}\n+\n+\tconst char* what() const throw () {\n+\t\treturn msg;\n+\t}\n+};\n+\n+typedef unsigned short ushort;\n+class TTreeManager {\n+public:\n+\tTTreeManager();\n+\tvirtual ~TTreeManager();\n+\tvoid addBranch(std::string branchName, std::string branchLabel, std::string treeName);\n+\n+\tvoid Fill(std::string branchLabel, float fillValue);\n+\tvoid FillTrees();\n+\n+\tvoid setCurrentDataType(DataType::value type);\n+\tvoid prepareForSeenDataTypes(const boost::array<bool, DataType::NUMBER_OF_DATA_TYPES>& seenDataTypes);\n+\n+\tvoid addFolder(std::string folder);\n+\tvoid addTreeToFolder(std::string folder, unsigned int dataType, std::string treeName);\n+\n+\tvoid setCurrentTreeFolder(std::string folder);","path":"interface/TTreeHelpers/TTreeManager.h","position":54,"original_position":54,"commit_id":"d78fb0e2bd0de9d652812ee89ee6cc782bd72852","original_commit_id":"d78fb0e2bd0de9d652812ee89ee6cc782bd72852","user":{"login":"kreczko","id":1213276,"avatar_url":"https://avatars.githubusercontent.com/u/1213276?v=3","gravatar_id":"","url":"https://api.github.com/users/kreczko","html_url":"https://github.com/kreczko","followers_url":"https://api.github.com/users/kreczko/followers","following_url":"https://api.github.com/users/kreczko/following{/other_user}","gists_url":"https://api.github.com/users/kreczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kreczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreczko/subscriptions","organizations_url":"https://api.github.com/users/kreczko/orgs","repos_url":"https://api.github.com/users/kreczko/repos","events_url":"https://api.github.com/users/kreczko/events{/privacy}","received_events_url":"https://api.github.com/users/kreczko/received_events","type":"User","site_admin":false},"body":"Too much Tree. I will have a look at the implementation, but just here I would stick to ```setCurrentFolder```.","created_at":"2015-02-25T12:54:23Z","updated_at":"2015-02-25T12:54:23Z","html_url":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137#discussion_r25337151","pull_request_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137","_links":{"self":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/comments/25337151"},"html":{"href":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137#discussion_r25337151"},"pull_request":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137"}}},"pull_request":{"url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137","id":29906033,"html_url":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137","diff_url":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137.diff","patch_url":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137.patch","issue_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/137","number":137,"state":"open","locked":false,"title":"Implement ntuple output in AT","user":{"login":"EmyrClement","id":4438699,"avatar_url":"https://avatars.githubusercontent.com/u/4438699?v=3","gravatar_id":"","url":"https://api.github.com/users/EmyrClement","html_url":"https://github.com/EmyrClement","followers_url":"https://api.github.com/users/EmyrClement/followers","following_url":"https://api.github.com/users/EmyrClement/following{/other_user}","gists_url":"https://api.github.com/users/EmyrClement/gists{/gist_id}","starred_url":"https://api.github.com/users/EmyrClement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmyrClement/subscriptions","organizations_url":"https://api.github.com/users/EmyrClement/orgs","repos_url":"https://api.github.com/users/EmyrClement/repos","events_url":"https://api.github.com/users/EmyrClement/events{/privacy}","received_events_url":"https://api.github.com/users/EmyrClement/received_events","type":"User","site_admin":false},"body":"This is a first implementation of getting an ntuple output from Analysis Tools.\r\n\r\nI expect it's not perfect, but it seems to work.","created_at":"2015-02-24T15:23:16Z","updated_at":"2015-02-25T12:54:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5ce0351691e1efa45282030be7455dfabc7f25b","assignee":{"login":"kreczko","id":1213276,"avatar_url":"https://avatars.githubusercontent.com/u/1213276?v=3","gravatar_id":"","url":"https://api.github.com/users/kreczko","html_url":"https://github.com/kreczko","followers_url":"https://api.github.com/users/kreczko/followers","following_url":"https://api.github.com/users/kreczko/following{/other_user}","gists_url":"https://api.github.com/users/kreczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kreczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreczko/subscriptions","organizations_url":"https://api.github.com/users/kreczko/orgs","repos_url":"https://api.github.com/users/kreczko/repos","events_url":"https://api.github.com/users/kreczko/events{/privacy}","received_events_url":"https://api.github.com/users/kreczko/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/milestones/4","html_url":"https://github.com/BristolTopGroup/AnalysisSoftware/milestones/13%20TeV%20HPA","labels_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/milestones/4/labels","id":893193,"number":4,"title":"13 TeV HPA","description":"HPA of the first 13 TeV data","creator":{"login":"kreczko","id":1213276,"avatar_url":"https://avatars.githubusercontent.com/u/1213276?v=3","gravatar_id":"","url":"https://api.github.com/users/kreczko","html_url":"https://github.com/kreczko","followers_url":"https://api.github.com/users/kreczko/followers","following_url":"https://api.github.com/users/kreczko/following{/other_user}","gists_url":"https://api.github.com/users/kreczko/gists{/gist_id}","starred_url":"https://api.github.com/users/kreczko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreczko/subscriptions","organizations_url":"https://api.github.com/users/kreczko/orgs","repos_url":"https://api.github.com/users/kreczko/repos","events_url":"https://api.github.com/users/kreczko/events{/privacy}","received_events_url":"https://api.github.com/users/kreczko/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":2,"state":"open","created_at":"2014-12-05T17:12:22Z","updated_at":"2015-02-24T15:23:40Z","due_on":"2015-08-31T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137/commits","review_comments_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137/comments","review_comment_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/137/comments","statuses_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/statuses/d78fb0e2bd0de9d652812ee89ee6cc782bd72852","head":{"label":"EmyrClement:CMSSW_7_4_X_ntupleOutput","ref":"CMSSW_7_4_X_ntupleOutput","sha":"d78fb0e2bd0de9d652812ee89ee6cc782bd72852","user":{"login":"EmyrClement","id":4438699,"avatar_url":"https://avatars.githubusercontent.com/u/4438699?v=3","gravatar_id":"","url":"https://api.github.com/users/EmyrClement","html_url":"https://github.com/EmyrClement","followers_url":"https://api.github.com/users/EmyrClement/followers","following_url":"https://api.github.com/users/EmyrClement/following{/other_user}","gists_url":"https://api.github.com/users/EmyrClement/gists{/gist_id}","starred_url":"https://api.github.com/users/EmyrClement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmyrClement/subscriptions","organizations_url":"https://api.github.com/users/EmyrClement/orgs","repos_url":"https://api.github.com/users/EmyrClement/repos","events_url":"https://api.github.com/users/EmyrClement/events{/privacy}","received_events_url":"https://api.github.com/users/EmyrClement/received_events","type":"User","site_admin":false},"repo":{"id":20265539,"name":"AnalysisSoftware","full_name":"EmyrClement/AnalysisSoftware","owner":{"login":"EmyrClement","id":4438699,"avatar_url":"https://avatars.githubusercontent.com/u/4438699?v=3","gravatar_id":"","url":"https://api.github.com/users/EmyrClement","html_url":"https://github.com/EmyrClement","followers_url":"https://api.github.com/users/EmyrClement/followers","following_url":"https://api.github.com/users/EmyrClement/following{/other_user}","gists_url":"https://api.github.com/users/EmyrClement/gists{/gist_id}","starred_url":"https://api.github.com/users/EmyrClement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmyrClement/subscriptions","organizations_url":"https://api.github.com/users/EmyrClement/orgs","repos_url":"https://api.github.com/users/EmyrClement/repos","events_url":"https://api.github.com/users/EmyrClement/events{/privacy}","received_events_url":"https://api.github.com/users/EmyrClement/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EmyrClement/AnalysisSoftware","description":"Analysis software for particle physics analysis","fork":true,"url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware","forks_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/forks","keys_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/teams","hooks_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/hooks","issue_events_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/issues/events{/number}","events_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/events","assignees_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/assignees{/user}","branches_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/branches{/branch}","tags_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/tags","blobs_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/git/refs{/sha}","trees_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/statuses/{sha}","languages_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/languages","stargazers_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/stargazers","contributors_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/contributors","subscribers_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/subscribers","subscription_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/subscription","commits_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/commits{/sha}","git_commits_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/git/commits{/sha}","comments_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/comments{/number}","issue_comment_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/issues/comments{/number}","contents_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/contents/{+path}","compare_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/merges","archive_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/downloads","issues_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/issues{/number}","pulls_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/pulls{/number}","milestones_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/milestones{/number}","notifications_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/labels{/name}","releases_url":"https://api.github.com/repos/EmyrClement/AnalysisSoftware/releases{/id}","created_at":"2014-05-28T17:01:51Z","updated_at":"2014-12-03T20:23:54Z","pushed_at":"2015-02-25T10:58:37Z","git_url":"git://github.com/EmyrClement/AnalysisSoftware.git","ssh_url":"git@github.com:EmyrClement/AnalysisSoftware.git","clone_url":"https://github.com/EmyrClement/AnalysisSoftware.git","svn_url":"https://github.com/EmyrClement/AnalysisSoftware","homepage":null,"size":77277,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BristolTopGroup:run2-preparations","ref":"run2-preparations","sha":"5418ea37743fa8109c81d20f52dbf56d4938602a","user":{"login":"BristolTopGroup","id":2865412,"avatar_url":"https://avatars.githubusercontent.com/u/2865412?v=3","gravatar_id":"","url":"https://api.github.com/users/BristolTopGroup","html_url":"https://github.com/BristolTopGroup","followers_url":"https://api.github.com/users/BristolTopGroup/followers","following_url":"https://api.github.com/users/BristolTopGroup/following{/other_user}","gists_url":"https://api.github.com/users/BristolTopGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/BristolTopGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristolTopGroup/subscriptions","organizations_url":"https://api.github.com/users/BristolTopGroup/orgs","repos_url":"https://api.github.com/users/BristolTopGroup/repos","events_url":"https://api.github.com/users/BristolTopGroup/events{/privacy}","received_events_url":"https://api.github.com/users/BristolTopGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":5964642,"name":"AnalysisSoftware","full_name":"BristolTopGroup/AnalysisSoftware","owner":{"login":"BristolTopGroup","id":2865412,"avatar_url":"https://avatars.githubusercontent.com/u/2865412?v=3","gravatar_id":"","url":"https://api.github.com/users/BristolTopGroup","html_url":"https://github.com/BristolTopGroup","followers_url":"https://api.github.com/users/BristolTopGroup/followers","following_url":"https://api.github.com/users/BristolTopGroup/following{/other_user}","gists_url":"https://api.github.com/users/BristolTopGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/BristolTopGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BristolTopGroup/subscriptions","organizations_url":"https://api.github.com/users/BristolTopGroup/orgs","repos_url":"https://api.github.com/users/BristolTopGroup/repos","events_url":"https://api.github.com/users/BristolTopGroup/events{/privacy}","received_events_url":"https://api.github.com/users/BristolTopGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BristolTopGroup/AnalysisSoftware","description":"Analysis software for particle physics analysis","fork":false,"url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware","forks_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/forks","keys_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/teams","hooks_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/hooks","issue_events_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/events{/number}","events_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/events","assignees_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/assignees{/user}","branches_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/branches{/branch}","tags_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/tags","blobs_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/git/refs{/sha}","trees_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/statuses/{sha}","languages_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/languages","stargazers_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/stargazers","contributors_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/contributors","subscribers_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/subscribers","subscription_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/subscription","commits_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/commits{/sha}","git_commits_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/git/commits{/sha}","comments_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/comments{/number}","issue_comment_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/comments{/number}","contents_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/contents/{+path}","compare_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/merges","archive_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/downloads","issues_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues{/number}","pulls_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls{/number}","milestones_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/milestones{/number}","notifications_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/labels{/name}","releases_url":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/releases{/id}","created_at":"2012-09-26T11:13:57Z","updated_at":"2015-02-23T15:44:04Z","pushed_at":"2015-02-24T10:50:18Z","git_url":"git://github.com/BristolTopGroup/AnalysisSoftware.git","ssh_url":"git@github.com:BristolTopGroup/AnalysisSoftware.git","clone_url":"https://github.com/BristolTopGroup/AnalysisSoftware.git","svn_url":"https://github.com/BristolTopGroup/AnalysisSoftware","homepage":null,"size":142394,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":13,"forks":7,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137"},"html":{"href":"https://github.com/BristolTopGroup/AnalysisSoftware/pull/137"},"issue":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/137"},"comments":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137/comments"},"review_comment":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/pulls/137/commits"},"statuses":{"href":"https://api.github.com/repos/BristolTopGroup/AnalysisSoftware/statuses/d78fb0e2bd0de9d652812ee89ee6cc782bd72852"}}}}