ATLAS Offline Software
|
Transient TTree for interactive xAOD metadata access. More...
#include <xAODTMetaTree.h>
Public Member Functions | |
xAODTMetaTree (xAOD::TEvent &event, const char *name="MetaData", const char *title="xAOD metadata 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< xAODTMetaBranch > br) |
Function adding a new xAOD::TBranch to the tree. More... | |
Private Attributes | |
xAOD::TEvent * | m_event |
Pointer to the TEvent reading the persistent metadata tree. More... | |
Transient TTree for interactive xAOD metadata 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 xAODTMetaTree.h.
xAODTMetaTree::xAODTMetaTree | ( | xAOD::TEvent & | event, |
const char * | name = "MetaData" , |
||
const char * | title = "xAOD metadata transient tree" |
||
) |
Constructor with all the necessary parameters.
void xAODTMetaTree::AddBranch | ( | std::unique_ptr< xAODTMetaBranch > | br | ) |
Function adding a new xAOD::TBranch to the tree.
This is a simple convenience function for setting up the object with all of its branches.
br | The xAOD::TMetaBranch object that should be added to the tree |
Definition at line 48 of file xAODTMetaTree.cxx.
Int_t xAODTMetaTree::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 (the file number) that should be read |
getall | When set to 1, read all the (active) branches |
Definition at line 30 of file xAODTMetaTree.cxx.
|
private |
Pointer to the TEvent reading the persistent metadata tree.
Definition at line 52 of file xAODTMetaTree.h.