ATLAS Offline Software
|
Transient TTree for interactive xAOD event data access. More...
#include <xAODTEventTree.h>
Public Member Functions | |
xAODTEventTree (xAOD::TEvent &event, const char *name="CollectionTree", const char *title="xAOD transient tree") | |
Constructor with all the necessary parameters. More... | |
virtual ::Int_t | GetEntry (::Long64_t entry, ::Int_t getall=0) |
Function overriding the base class's GetEntry(...) More... | |
void | AddBranch (std::unique_ptr< xAODTEventBranch > br) |
Function adding a new xAODTEventBranch to the tree. More... | |
Private Attributes | |
xAOD::TEvent * | m_event |
Pointer to the TEvent reading the persistent tree. More... | |
Transient TTree for interactive xAOD event data access.
This is pretty much the same sort of thing that ARA's TTreeTrans was designed for. In order to implement everything that we need from the transient tree, we need to override some functions within the class. But to the outside user we still want to present the usual TTree interface.
This class is only meant for interactive and PyROOT access to an xAOD file. It should not be used in compiled analysis code, or for writing information into a file. (The first one will be slow, the second one just impossible.)
Definition at line 37 of file xAODTEventTree.h.
xAODTEventTree::xAODTEventTree | ( | xAOD::TEvent & | event, |
const char * | name = "CollectionTree" , |
||
const char * | title = "xAOD transient tree" |
||
) |
Constructor with all the necessary parameters.
void xAODTEventTree::AddBranch | ( | std::unique_ptr< xAODTEventBranch > | br | ) |
Function adding a new xAODTEventBranch to the tree.
This is a simple convenience function for setting up the object with all of its branches.
br | The xAOD::TEventBranch object that should be added to the tree |
Definition at line 47 of file xAODTEventTree.cxx.
Int_t xAODTEventTree::GetEntry | ( | ::Long64_t | entry, |
::Int_t | getall = 0 |
||
) |
Function overriding the base class's GetEntry(...)
This function is not actually used when browsing the TTree, or when using TTree::Draw(...).
So in interactive usage there's little point to it. But it is very important for PyROOT usage.
entry | The entry from the TTree that should be read |
getall | When set to 1, read all the (active) branches |
Definition at line 29 of file xAODTEventTree.cxx.
|
private |
Pointer to the TEvent reading the persistent tree.
Definition at line 52 of file xAODTEventTree.h.