ATLAS Offline Software
Loading...
Searching...
No Matches
TTreeMgr.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef XAODROOTACCESS_TTREEMGR_H
6#define XAODROOTACCESS_TTREEMGR_H
7
8// System include(s):
9#include <memory>
10#include <string>
11#include <vector>
12
13// Local include(s):
18
19// Forward declaration(s):
20class TTree;
21class TFile;
22
23namespace xAOD {
24
34 class TTreeMgr {
35
36 public:
39
42
44 StatusCode readFrom( ::TFile* file, ::Bool_t useTreeCache = kTRUE,
45 const char* treeName = "CollectionTree" );
46
48
51
53 StatusCode enableEventObj( const std::vector< std::string >& names );
55 StatusCode suppressEventObj( const std::vector< std::string >& names );
56
58 StatusCode enableMetaObj( const std::vector< std::string >& names );
60 StatusCode suppressMetaObj( const std::vector< std::string >& names );
61
63
66
68 ::TTree* eventTree();
69
71 ::TTree* metaTree();
72
74
76 TEvent& event();
77
78 private:
80 std::unique_ptr< xAODTEventTree > m_eventTree;
82 std::unique_ptr< xAODTMetaTree > m_metaTree;
83
86
88 std::string m_eventTreeName;
89
91 std::vector< std::string > m_enableEventObj;
93 std::vector< std::string > m_suppressEventObj;
94
96 std::vector< std::string > m_enableMetaObj;
98 std::vector< std::string > m_suppressMetaObj;
99
100 }; // class TTreeMgr
101
102} // namespace xAOD
103
104#endif // XAODROOTACCESS_TTREEMGR_H
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
std::unique_ptr< xAODTMetaTree > m_metaTree
The transient metadata tree.
Definition TTreeMgr.h:82
StatusCode enableMetaObj(const std::vector< std::string > &names)
Object/container names that should be used in the metadata tree.
Definition TTreeMgr.cxx:94
std::vector< std::string > m_enableEventObj
Names to select for the event tree.
Definition TTreeMgr.h:91
StatusCode enableEventObj(const std::vector< std::string > &names)
Object/container names that should be used in the event tree.
Definition TTreeMgr.cxx:58
TEvent m_event
The internal TEvent object.
Definition TTreeMgr.h:85
::TTree * eventTree()
Get a pointer to the transient event tree.
Definition TTreeMgr.cxx:129
std::vector< std::string > m_enableMetaObj
Names to select for the metatada tree.
Definition TTreeMgr.h:96
TTreeMgr(TEvent::EAuxMode mode=TEvent::kClassAccess)
Constructor, with an optional access mode selector.
Definition TTreeMgr.cxx:24
StatusCode readFrom(::TFile *file, ::Bool_t useTreeCache=kTRUE, const char *treeName="CollectionTree")
Read from the file given to the function.
Definition TTreeMgr.cxx:32
std::vector< std::string > m_suppressMetaObj
Names to suppress from the metadata tree.
Definition TTreeMgr.h:98
StatusCode suppressEventObj(const std::vector< std::string > &names)
Object/container names that should be vetoed from the event tree.
Definition TTreeMgr.cxx:76
StatusCode suppressMetaObj(const std::vector< std::string > &names)
Object/container names that should be suppressed in the metadata tree.
Definition TTreeMgr.cxx:112
std::string m_eventTreeName
The name of the event tree to create.
Definition TTreeMgr.h:88
std::unique_ptr< xAODTEventTree > m_eventTree
The transient event tree.
Definition TTreeMgr.h:80
std::vector< std::string > m_suppressEventObj
Names to suppress from the event tree.
Definition TTreeMgr.h:93
TEvent & event()
Get the TEvent object being used by the transient tree(s)
Definition TTreeMgr.cxx:345
::TTree * metaTree()
Get a pointer to the transient metadata tree.
Definition TTreeMgr.cxx:246
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
static const SG::AuxElement::Accessor< std::vector< std::string > > names("thrNames")
Accessor for the names of the passed thresholds.
TFile * file