12 #ifndef ROOT_TTreeProcessor
13 #define ROOT_TTreeProcessor
27 #ifndef ROOT_TTreeReader
31 #ifndef ROOT_TThreadedObject
76 const char *className = key->GetClassName();
77 if (strcmp(className,
"TTree") == 0) {
118 return fTree->GetClusterIterator(0);
132 return fTree->GetEntries();
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...
std::unique_ptr< TFile > fFile
! File object of this view.
void Process(std::function< void(TTreeReader &)> func)
Process the entries of a TTree in parallel.
A wrapper to make object instances thread private, lazily.
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.
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...
std::unique_ptr< TTreeReader > GetTreeReader() const
Get a TTreeReader for the tree of this view.
TTreeView(const TTreeView &view)
Copy constructor.
Long64_t GetEntries() const
Get the number of entries of the tree of this view.
TTree::TClusterIterator GetClusterIterator()
Get the cluster iterator for the tree of this view, starting from entry zero.
double func(double *x, double *p)
TTreeProcessor(std::string_view filename, std::string_view treename="")
Regular constructor.
_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY const_pointer data() const _NOEXCEPT
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.