File indexing completed on 2025-01-18 10:12:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TTreeReaderUtils
0013 #define ROOT_TTreeReaderUtils
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TBranchProxyDirector.h"
0026 #include "TBranchProxy.h"
0027 #include "TTreeReaderValue.h"
0028
0029 #include <string>
0030
0031 class TDictionary;
0032 class TTree;
0033
0034 namespace ROOT {
0035 namespace Detail {
0036 class TBranchProxy;
0037 }
0038
0039 namespace Internal {
0040 class TBranchProxyDirector;
0041 class TTreeReaderArrayBase;
0042
0043 class TNamedBranchProxy {
0044 public:
0045 TNamedBranchProxy(): fDict(nullptr), fContentDict(nullptr) {}
0046 TNamedBranchProxy(TBranchProxyDirector* boss, TBranch* branch, const char* fullname, const char* membername):
0047 fProxy(boss, fullname, branch, membername), fDict(nullptr), fContentDict(nullptr), fFullName(fullname) {}
0048
0049
0050
0051 TNamedBranchProxy(TBranchProxyDirector* boss, TBranch* branch, const char* fullname, const char* proxyname, const char* membername):
0052 fProxy(boss, proxyname, branch, membername), fDict(nullptr), fContentDict(nullptr), fFullName(fullname) {}
0053
0054 const char* GetName() const { return fFullName.c_str(); }
0055 const Detail::TBranchProxy* GetProxy() const { return &fProxy; }
0056 Detail::TBranchProxy* GetProxy() { return &fProxy; }
0057 TDictionary* GetDict() const { return fDict; }
0058 void SetDict(TDictionary* dict) { fDict = dict; }
0059 TDictionary* GetContentDict() const { return fContentDict; }
0060 void SetContentDict(TDictionary* dict) { fContentDict = dict; }
0061
0062 private:
0063 Detail::TBranchProxy fProxy;
0064 TDictionary* fDict;
0065 TDictionary* fContentDict;
0066 std::string fFullName;
0067 };
0068
0069
0070 class TVirtualCollectionReader {
0071 public:
0072 TTreeReaderValueBase::EReadStatus fReadStatus;
0073
0074 TVirtualCollectionReader() : fReadStatus(TTreeReaderValueBase::kReadNothingYet) {}
0075
0076 virtual ~TVirtualCollectionReader();
0077 virtual size_t GetSize(Detail::TBranchProxy*) = 0;
0078 virtual void* At(Detail::TBranchProxy*, size_t ) = 0;
0079 };
0080
0081 }
0082 }
0083
0084 #endif