Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTreeReaderUtils.h
Go to the documentation of this file.
1// @(#)root/tree:$Id$
2// Author: Axel Naumann, 2010-10-12
3
4/*************************************************************************
5 * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TTreeReaderUtils
13#define ROOT_TTreeReaderUtils
14
15
16////////////////////////////////////////////////////////////////////////////
17// //
18// TTreeReaderUtils //
19// //
20// TTreeReader's helpers. //
21// //
22// //
23////////////////////////////////////////////////////////////////////////////
24
26#include "TBranchProxy.h"
27#include "TTreeReaderValue.h"
28
29#include <string>
30
31class TDictionary;
32class TTree;
33
34namespace ROOT {
35 namespace Detail {
36 class TBranchProxy;
37 }
38
39namespace Internal {
40 class TBranchProxyDirector;
41 class TTreeReaderArrayBase;
42
44 public:
46 TNamedBranchProxy(TBranchProxyDirector* boss, TBranch* branch, const char* fullname, const char* membername):
47 fProxy(boss, fullname, branch, membername), fDict(0), fContentDict(0), fFullName(fullname) {}
48
49 // Constructor for friend case, the fullname (containing the name of the friend tree) may be different
50 // from the lookup name (without the name of the friend)
51 TNamedBranchProxy(TBranchProxyDirector* boss, TBranch* branch, const char* fullname, const char* proxyname, const char* membername):
52 fProxy(boss, proxyname, branch, membername), fDict(0), fContentDict(0), fFullName(fullname) {}
53
54 const char* GetName() const { return fFullName.c_str(); }
55 const Detail::TBranchProxy* GetProxy() const { return &fProxy; }
57 TDictionary* GetDict() const { return fDict; }
58 void SetDict(TDictionary* dict) { fDict = dict; }
60 void SetContentDict(TDictionary* dict) { fContentDict = dict; }
61
62 private:
65 TDictionary* fContentDict; // type of content, if a collection
66 std::string fFullName;
67 };
68
69 // Used by TTreeReaderArray
71 public:
73
75
77 virtual size_t GetSize(Detail::TBranchProxy*) = 0;
78 virtual void* At(Detail::TBranchProxy*, size_t /*idx*/) = 0;
79 };
80
81}
82}
83
84#endif // defined TTreeReaderUtils
Base class for all the proxy object.
void SetDict(TDictionary *dict)
const Detail::TBranchProxy * GetProxy() const
Detail::TBranchProxy * GetProxy()
TDictionary * GetContentDict() const
void SetContentDict(TDictionary *dict)
TNamedBranchProxy(TBranchProxyDirector *boss, TBranch *branch, const char *fullname, const char *membername)
TNamedBranchProxy(TBranchProxyDirector *boss, TBranch *branch, const char *fullname, const char *proxyname, const char *membername)
Base class of TTreeReaderValue.
TTreeReaderValueBase::EReadStatus fReadStatus
virtual size_t GetSize(Detail::TBranchProxy *)=0
virtual void * At(Detail::TBranchProxy *, size_t)=0
A TTree is a list of TBranches.
Definition TBranch.h:89
This class defines an abstract interface that must be implemented by all classes that contain diction...
A TTree represents a columnar dataset.
Definition TTree.h:79
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...