Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMPWorkerTree.h File Reference
#include "ROOT/TypeTraits.hxx"
#include "TMPWorker.h"
#include "TFile.h"
#include "TEntryList.h"
#include "TEventList.h"
#include "TH1.h"
#include "TKey.h"
#include "TSelector.h"
#include "TTree.h"
#include "TTreeCache.h"
#include "TTreeReader.h"
#include <memory>
#include <string>
#include <sstream>
#include <type_traits>
#include <unistd.h>
#include <vector>
Include dependency graph for TMPWorkerTree.h:
This graph shows which files directly or indirectly include this file:

Classes

class  TMPWorkerTree
 This class works in conjunction with TTreeProcessorMP, reacting to messages received from it as specified by the Notify and HandleInput methods. More...
 
class  TMPWorkerTreeFunc< F >
 Templated derivation of TMPWorkerTree handlign generic function tree processing. More...
 
class  TMPWorkerTreeSel
 Templated derivation of TMPWorkerTree handlign selector tree processing. More...
 

Functions

template<class T , std::enable_if_t< std::is_pointer< T >::value &&std::is_constructible< TObject *, T >::value &&!std::is_constructible< TCollection *, T >::value > * = nullptr>
void DetachRes (T res)
 Auxiliary templated functions If the user lambda returns a TH1F*, TTree*, TEventList*, we incur in the problem of that object being automatically owned by the current open file.
 

Function Documentation

◆ DetachRes()

template<class T , std::enable_if_t< std::is_pointer< T >::value &&std::is_constructible< TObject *, T >::value &&!std::is_constructible< TCollection *, T >::value > * = nullptr>
void DetachRes ( res)

Auxiliary templated functions If the user lambda returns a TH1F*, TTree*, TEventList*, we incur in the problem of that object being automatically owned by the current open file.

For these three types, we call SetDirectory(nullptr) to detach the returned object from the file we are reading the TTree from. Note: the only sane case in which this should happen is when a TH1F* is returned.

Definition at line 139 of file TMPWorkerTree.h.