ATLAS Offline Software
|
Specialised class for browsing xAOD event interface objects in ROOT. More...
#include <xAODTEventBranch.h>
Public Member Functions | |
xAODTEventBranch (::TTree &parent, xAOD::TEvent &event, const std::type_info &ti, const char *brName, const char *brType) | |
Constructor with all the needed parameters. More... | |
virtual ::Int_t | GetEntry (::Long64_t entry, ::Int_t getall) |
Function getting the current entry for this branch. More... | |
virtual ::TClass * | IsA () const |
Function returning the type of ::TBranchObject. More... | |
Private Attributes | |
xAOD::TEvent * | m_event |
Pointer to the TEvent object reading the persistent tree. More... | |
const std::type_info * | m_ti |
The type of the object that needs to be read. More... | |
const void * | m_object |
Pointer to the object read in using TEvent. More... | |
Specialised class for browsing xAOD event interface objects in ROOT.
In order to read xAOD interface objects/containers correctly, one needs to use the xAOD::TEvent class. Since the regular ROOT classes can't be taught how to use an external object for reading information, we need to do it using inheritance.
The design was pretty much stolen from the AthenaROOTAccess code. Luckily in this case the code can be a lot easier. Here we just need to ask the TEvent object for the correct pointer, and we're done.
Definition at line 32 of file xAODTEventBranch.h.
xAODTEventBranch::xAODTEventBranch | ( | ::TTree & | parent, |
xAOD::TEvent & | event, | ||
const std::type_info & | ti, | ||
const char * | brName, | ||
const char * | brType | ||
) |
Constructor with all the needed parameters.
Int_t xAODTEventBranch::GetEntry | ( | ::Long64_t | entry, |
::Int_t | getall | ||
) |
Function getting the current entry for this branch.
This is the function doing the heavy lifting.
It loads the interface object for the current entry requested. Only doing some minimal overhead in the meanwhile.
entry | The entry to be read for this object |
getall | When set to 1, read all information about the branch (Not used.) |
Definition at line 32 of file xAODTEventBranch.cxx.
TClass * xAODTEventBranch::IsA | ( | ) | const |
Function returning the type of ::TBranchObject.
I took this from the ARA code directly.
Apparenly TTree would not know how to handle this object if it reported its actual type. So we pretend that this is a TBranchObject object. That way TBrowser shows its contents nicely.
Definition at line 73 of file xAODTEventBranch.cxx.
|
private |
Pointer to the TEvent object reading the persistent tree.
Definition at line 52 of file xAODTEventBranch.h.
|
private |
Pointer to the object read in using TEvent.
Definition at line 56 of file xAODTEventBranch.h.
|
private |
The type of the object that needs to be read.
Definition at line 54 of file xAODTEventBranch.h.