ATLAS Offline Software
Loading...
Searching...
No Matches
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
12xAODTMetaTree::xAODTMetaTree( xAOD::TEvent& event, const char* name,
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
48void xAODTMetaTree::AddBranch( std::unique_ptr< xAODTMetaBranch > br ) {
49
50 // Add the branch:
51 fBranches.Add( br.release() );
52 return;
53}
#define XAOD_MESSAGE(MESSAGE)
Simple macro for printing error/verbose messages.
Transient TTree for interactive xAOD metadata access.
void AddBranch(std::unique_ptr< xAODTMetaBranch > br)
Function adding a new xAOD::TBranch to the tree.
xAODTMetaTree(xAOD::TEvent &event, const char *name="MetaData", const char *title="xAOD metadata transient tree")
Constructor with all the necessary parameters.
xAOD::TEvent * m_event
Pointer to the TEvent reading the persistent metadata tree.
virtual::Int_t GetEntry(::Long64_t entry, ::Int_t getall=0)
Function overriding the base class's GetEntry(...)
Tool for accessing xAOD files outside of Athena.
ClassImp(xAODTMetaTree) xAODTMetaTree