ATLAS Offline Software
xAODTMetaTree.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 variable(s):
17  fEntries = m_event->getFiles();
18 }
19 
30 ::Int_t xAODTMetaTree::GetEntry( ::Long64_t entry, ::Int_t getall ) {
31 
32  // Forward the call to the TEvent object:
33  if( m_event->getFile( entry, getall ) < 0 ) {
34  Error( "GetEntry",
35  XAOD_MESSAGE( "Problems with loading entry/file %lld" ), entry );
36  return -1;
37  }
38 
39  // Let the base class know what happened:
40  return ::TTree::GetEntry( entry, getall );
41 }
42 
48 void xAODTMetaTree::AddBranch( std::unique_ptr< xAODTMetaBranch > br ) {
49 
50  // Add the branch:
51  fBranches.Add( br.release() );
52  return;
53 }
xAODTMetaTree::AddBranch
void AddBranch(std::unique_ptr< xAODTMetaBranch > br)
Function adding a new xAOD::TBranch to the tree.
Definition: xAODTMetaTree.cxx:48
ClassImp
ClassImp(xAODTMetaTree) xAODTMetaTree
Definition: xAODTMetaTree.cxx:10
xAOD::TEvent::getFile
::Int_t getFile(::Long64_t file, ::Int_t getall=0)
Load the first event for a given file from the input TChain.
Definition: Control/xAODRootAccess/Root/TEvent.cxx:1473
XAOD_MESSAGE
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Definition: Control/xAODRootAccess/xAODRootAccess/tools/Message.h:19
xAODTMetaTree
Transient TTree for interactive xAOD metadata access.
Definition: xAODTMetaTree.h:37
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
Message.h
covarianceTool.title
title
Definition: covarianceTool.py:542
TEvent.h
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAODTMetaTree::GetEntry
virtual ::Int_t GetEntry(::Long64_t entry, ::Int_t getall=0)
Function overriding the base class's GetEntry(...)
Definition: xAODTMetaTree.cxx:30
xAODTMetaTree::m_event
xAOD::TEvent * m_event
Pointer to the TEvent reading the persistent metadata tree.
Definition: xAODTMetaTree.h:52
L1Topo::Error
Error
The different types of error that can be flagged in the L1TopoRDO.
Definition: Error.h:16
xAODTMetaTree.h
xAODTMetaTree::xAODTMetaTree
xAODTMetaTree(xAOD::TEvent &event, const char *name="MetaData", const char *title="xAOD metadata transient tree")
Constructor with all the necessary parameters.
xAOD::TEvent
Tool for accessing xAOD files outside of Athena.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:84
PlotCalibFromCool.br
br
Definition: PlotCalibFromCool.py:355