#include <TreeHandler.hpp>
Public Member Functions | |
| TreeHandler () | |
| TTree * | GetTree () |
| TBranch * | GetBranch (std::string BranchName) |
| TClonesArray * | GetBranchArray (std::string BranchName) |
| void | InitTree (std::string TreeName, TFile *input_file) |
| void | AddBranch (std::string BranchName, std::string BranchObjType) |
| void | AddBranch (std::string BranchName, int &intref, std::string BranchObjType) |
| void | AddBranch (std::string BranchName, float &floatref, std::string BranchObjType) |
| void | AddBranch (std::string BranchName, double &dbleref, std::string BranchObjType) |
| template<class T> void | AddBranch (std::string BranchName, std::string BranchObjType, T **obj) |
| template<class T> void | FillBranch (std::string BranchName, cafe::Collection< T > result) |
| void | ClearIt () |
| ClassDef (TreeHandler, 1) | |
Private Attributes | |
| TTree * | _tree |
| TTree * | _tmb_tree |
| std::map< std::string, TClonesArray * > | _BranchContent |
| std::map< std::string, TBranch * > | _Branches |
| std::string | _toTree |
If the tree doesn't already exist, a new one is created in memory and made friend with the input TMBTree. The tree can be written to file using the default Write processor in cafe.
Usage:
In your processor:
_treehandler = new TreeHandler();
_treehandler->InitTree("TreeName",file); _treehandler->AddBranch("Branch1",... _treehandler->AddBranch("Branch2",...
_treehandler->FillBranch("Branch1",myCollection1) _treehandler->FillBranch("Branch2",myCollection2)
_treehandler->ClearIt();
Definition at line 59 of file TreeHandler.hpp.
|
|
Definition at line 6 of file TreeHandler.cpp. |
|
||||||||||||||||||||
|
Definition at line 86 of file TreeHandler.hpp. |
|
||||||||||||||||
|
Definition at line 69 of file TreeHandler.cpp. |
|
||||||||||||||||
|
Definition at line 58 of file TreeHandler.cpp. |
|
||||||||||||||||
|
Definition at line 47 of file TreeHandler.cpp. |
|
||||||||||||
|
Definition at line 35 of file TreeHandler.cpp. References _BranchContent, _Branches, and _tree. |
|
||||||||||||
|
|
|
|
Definition at line 80 of file TreeHandler.cpp. References _BranchContent, _Branches, _tmb_tree, _toTree, and _tree. |
|
||||||||||||||||
|
Definition at line 96 of file TreeHandler.hpp. References cafe::Collection< T >::begin(), cafe::Collection< T >::end(), and GetBranchArray(). |
|
|
Definition at line 74 of file TreeHandler.hpp. References _Branches. |
|
|
Definition at line 75 of file TreeHandler.hpp. References _BranchContent. Referenced by FillBranch(). |
|
|
Definition at line 73 of file TreeHandler.hpp. References _tree. |
|
||||||||||||
|
Definition at line 13 of file TreeHandler.cpp. |
|
|
Definition at line 65 of file TreeHandler.hpp. Referenced by AddBranch(), ClearIt(), and GetBranchArray(). |
|
|
Definition at line 66 of file TreeHandler.hpp. Referenced by AddBranch(), ClearIt(), and GetBranch(). |
|
|
Definition at line 64 of file TreeHandler.hpp. Referenced by ClearIt(), and InitTree(). |
|
|
Definition at line 67 of file TreeHandler.hpp. Referenced by ClearIt(), and InitTree(). |
|
|
Definition at line 63 of file TreeHandler.hpp. Referenced by AddBranch(), ClearIt(), GetTree(), and InitTree(). |
1.3.4