12 #ifndef ROOT_TTreeProcessor 13 #define ROOT_TTreeProcessor 27 #ifndef ROOT_TTreeReader 31 #ifndef ROOT_TThreadedObject 73 if (fTreeName.
empty()) {
76 const char *className = key->GetClassName();
77 if (strcmp(className,
"TTree") == 0) {
78 fTreeName = key->GetName();
82 if (fTreeName.
empty())
83 ::
Error(
"TreeView constructor",
"Cannot find any tree in file %s", fFileName.
data());
125 return std::unique_ptr<TTreeReader>(
new TTreeReader(fTree.get()));
157 #endif // defined TTreeProcessor _LIBCPP_CONSTEXPR bool _LIBCPP_INLINE_VISIBILITY empty() const _NOEXCEPT
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
std::unique_ptr< TFile > fFile
! File object of this view.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
std::string_view fTreeName
Name of the tree.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Helper class to iterate over cluster of baskets.
std::unique_ptr< TTree > fTree
! Tree object of this view.
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void Init()
Initialize the file and the tree for this view, first looking for a tree in the file if necessary...
TTreeView(const TTreeView &view)
Copy constructor.
TTree::TClusterIterator GetClusterIterator()
Get the cluster iterator for the tree of this view, starting from entry zero.
Long64_t GetEntries() const
Get the number of entries of the tree of this view.
double func(double *x, double *p)
TTreeProcessor(std::string_view filename, std::string_view treename="")
Regular constructor.
virtual Long64_t GetEntries() const
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_pointer data() const _NOEXCEPT
virtual TList * GetListOfKeys() const
A TTree object has a header with a name and a title.
ROOT::TThreadedObject< ROOT::Internal::TTreeView > treeView
! Threaded object with <file,tree> per thread
std::string_view fFileName
Name of the file.
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.
TTreeView(std::string_view fn, std::string_view tn)
Regular constructor.
std::unique_ptr< TTreeReader > GetTreeReader() const
Get a TTreeReader for the tree of this view.