00001
00002
00003 #ifndef XAODROOTACCESS_TTREEMGR_H
00004 #define XAODROOTACCESS_TTREEMGR_H
00005
00006
00007 #include <memory>
00008 #include <string>
00009 #include <vector>
00010
00011
00012 #include "xAODRootAccess/TEvent.h"
00013 #include "xAODRootAccess/tools/TReturnCode.h"
00014 #include "xAODRootAccess/tools/TEventTree.h"
00015 #include "xAODRootAccess/tools/TMetaTree.h"
00016
00017
00018 class TTree;
00019 class TFile;
00020
00021 namespace xAOD {
00022
00035 class TTreeMgr {
00036
00037 public:
00039 TTreeMgr( TEvent::EAuxMode mode = TEvent::kUndefinedAccess );
00040
00043
00045 TReturnCode readFrom( ::TFile* file, ::Bool_t useTreeCache = kTRUE,
00046 const char* treeName = "CollectionTree" );
00047
00049
00052
00054 TReturnCode enableEventObj( const std::vector< std::string >& names );
00056 TReturnCode suppressEventObj( const std::vector< std::string >& names );
00057
00059 TReturnCode enableMetaObj( const std::vector< std::string >& names );
00061 TReturnCode suppressMetaObj( const std::vector< std::string >& names );
00062
00064
00067
00069 ::TTree* eventTree();
00070
00072 ::TTree* metaTree();
00073
00075
00077 TEvent& event();
00078
00079 private:
00081 std::unique_ptr< TEventTree > m_eventTree;
00083 std::unique_ptr< TMetaTree > m_metaTree;
00084
00086 TEvent m_event;
00087
00089 std::string m_eventTreeName;
00090
00092 std::vector< std::string > m_enableEventObj;
00094 std::vector< std::string > m_suppressEventObj;
00095
00097 std::vector< std::string > m_enableMetaObj;
00099 std::vector< std::string > m_suppressMetaObj;
00100
00101 };
00102
00103 }
00104
00105 #endif // XAODROOTACCESS_TTREEMGR_H