ATLAS Offline Software
xAODTEventTree.cxx
Go to the documentation of this file.
1 //
2 // Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 //
4 
5 // Local include(s):
9 
11 
13  const char* title )
14  : ::TTree( name, title ), m_event( &event ) {
15 
16  // Set up the base class's variables:
17  fEntries = m_event->getEntries();
18 }
19 
29 ::Int_t xAODTEventTree::GetEntry( ::Long64_t entry, ::Int_t getall ) {
30 
31  // Forward the call to the TEvent object:
32  if( m_event->getEntry( entry, getall ) < 0 ) {
33  Error( "GetEntry",
34  XAOD_MESSAGE( "Problems with loading entry %lld" ), entry );
35  return -1;
36  }
37 
38  // Let the base class know what happened:
39  return ::TTree::GetEntry( entry, getall );
40 }
41 
47 void xAODTEventTree::AddBranch( std::unique_ptr< xAODTEventBranch > br ) {
48 
49  // Add the branch:
50  fBranches.Add( br.release() );
51  return;
52 }
xAODTEventTree::m_event
xAOD::TEvent * m_event
Pointer to the TEvent reading the persistent tree.
Definition: xAODTEventTree.h:52
xAODTEventTree::xAODTEventTree
xAODTEventTree(xAOD::TEvent &event, const char *name="CollectionTree", const char *title="xAOD transient tree")
Constructor with all the necessary parameters.
xAODTEventTree
Transient TTree for interactive xAOD event data access.
Definition: xAODTEventTree.h:37
xAODTEventTree::AddBranch
void AddBranch(std::unique_ptr< xAODTEventBranch > br)
Function adding a new xAODTEventBranch to the tree.
Definition: xAODTEventTree.cxx:47
XAOD_MESSAGE
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Definition: Control/xAODRootAccess/xAODRootAccess/tools/Message.h:19
ClassImp
ClassImp(xAODTEventTree) xAODTEventTree
Definition: xAODTEventTree.cxx:10
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
xAOD::TEvent::getEntry
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1324
Message.h
covarianceTool.title
title
Definition: covarianceTool.py:542
TEvent.h
xAODTEventTree::GetEntry
virtual ::Int_t GetEntry(::Long64_t entry, ::Int_t getall=0)
Function overriding the base class's GetEntry(...)
Definition: xAODTEventTree.cxx:29
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAODTEventTree.h
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:84
PlotCalibFromCool.br
br
Definition: PlotCalibFromCool.py:355