Project
Loading...
Searching...
No Matches
o2::utils::TreeStream Class Reference

#include <TreeStream.h>

Classes

struct  TreeDataElement
 

Public Member Functions

 TreeStream (const char *treename)
 
 TreeStream ()=default
 
virtual ~TreeStream ()=default
 
void Close ()
 
Int_t CheckIn (Char_t type, const void *pointer)
 
void BuildTree ()
 
void Fill ()
 
Double_t getSize ()
 
TreeStreamEndl ()
 
TTree & getTree ()
 
const chargetName () const
 
void setID (int id)
 
int getID () const
 
TreeStreamoperator<< (const Bool_t &b)
 
TreeStreamoperator<< (const Char_t &c)
 
TreeStreamoperator<< (const int8_t &i)
 
TreeStreamoperator<< (const UChar_t &c)
 
TreeStreamoperator<< (const Short_t &h)
 
TreeStreamoperator<< (const UShort_t &h)
 
TreeStreamoperator<< (const Int_t &i)
 
TreeStreamoperator<< (const UInt_t &i)
 
TreeStreamoperator<< (const Long_t &l)
 
TreeStreamoperator<< (const ULong_t &l)
 
TreeStreamoperator<< (const Long64_t &l)
 
TreeStreamoperator<< (const ULong64_t &l)
 
TreeStreamoperator<< (const Float_t &f)
 
TreeStreamoperator<< (const Double_t &d)
 
TreeStreamoperator<< (const Char_t *name)
 
template<class T >
TreeStreamoperator<< (const T *obj)
 
template<class T , typename std::enable_if<!std::is_pointer< GPUgeneric() T >::value, bool >::type * = nullptr>
TreeStreamoperator<< (const T &obj)
 
template<class T >
Int_t CheckIn (const T *obj)
 

Detailed Description

The TreeStream class allows creating a root tree of any objects having root dictionary, using operator<< interface, and w/o prior tree declaration. The format is: treeStream << "branchName0="<<objPtr <<"branchName1="<<objRed <<"branchName2=" <<elementaryTypeVar<<"\n"

See testTreeStream.cxx for functional example

Definition at line 42 of file TreeStream.h.

Constructor & Destructor Documentation

◆ TreeStream() [1/2]

TreeStream::TreeStream ( const char treename)

Definition at line 20 of file TreeStream.cxx.

◆ TreeStream() [2/2]

o2::utils::TreeStream::TreeStream ( )
default

◆ ~TreeStream()

virtual o2::utils::TreeStream::~TreeStream ( )
virtualdefault

Member Function Documentation

◆ BuildTree()

void TreeStream::BuildTree ( )

Definition at line 58 of file TreeStream.cxx.

◆ CheckIn() [1/2]

int TreeStream::CheckIn ( Char_t  type,
const void pointer 
)

Definition at line 27 of file TreeStream.cxx.

◆ CheckIn() [2/2]

template<class T >
Int_t o2::utils::TreeStream::CheckIn ( const T *  obj)

Definition at line 185 of file TreeStream.h.

◆ Close()

void o2::utils::TreeStream::Close ( )
inline

Definition at line 55 of file TreeStream.h.

◆ Endl()

TreeStream & TreeStream::Endl ( )

Definition at line 134 of file TreeStream.cxx.

◆ Fill()

void TreeStream::Fill ( )

Definition at line 107 of file TreeStream.cxx.

◆ getID()

int o2::utils::TreeStream::getID ( ) const
inline

Definition at line 65 of file TreeStream.h.

◆ getName()

const char * o2::utils::TreeStream::getName ( ) const
inline

Definition at line 63 of file TreeStream.h.

◆ getSize()

Double_t o2::utils::TreeStream::getSize ( )
inline

Definition at line 59 of file TreeStream.h.

◆ getTree()

TTree & o2::utils::TreeStream::getTree ( )
inline

Definition at line 62 of file TreeStream.h.

◆ operator<<() [1/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Bool_t &  b)
inline

Definition at line 67 of file TreeStream.h.

◆ operator<<() [2/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Char_t &  c)
inline

Definition at line 73 of file TreeStream.h.

◆ operator<<() [3/17]

TreeStream & TreeStream::operator<< ( const Char_t *  name)

Definition at line 148 of file TreeStream.cxx.

◆ operator<<() [4/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Double_t &  d)
inline

Definition at line 145 of file TreeStream.h.

◆ operator<<() [5/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Float_t f)
inline

Definition at line 139 of file TreeStream.h.

◆ operator<<() [6/17]

TreeStream & o2::utils::TreeStream::operator<< ( const int8_t &  i)
inline

Definition at line 79 of file TreeStream.h.

◆ operator<<() [7/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Int_t &  i)
inline

Definition at line 103 of file TreeStream.h.

◆ operator<<() [8/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Long64_t &  l)
inline

Definition at line 127 of file TreeStream.h.

◆ operator<<() [9/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Long_t &  l)
inline

Definition at line 115 of file TreeStream.h.

◆ operator<<() [10/17]

TreeStream & o2::utils::TreeStream::operator<< ( const Short_t &  h)
inline

Definition at line 91 of file TreeStream.h.

◆ operator<<() [11/17]

template<class T , typename std::enable_if<!std::is_pointer< GPUgeneric() T >::value, bool >::type * = nullptr>
TreeStream & o2::utils::TreeStream::operator<< ( const T &  obj)
inline

Definition at line 161 of file TreeStream.h.

◆ operator<<() [12/17]

template<class T >
TreeStream & o2::utils::TreeStream::operator<< ( const T *  obj)
inline

Definition at line 154 of file TreeStream.h.

◆ operator<<() [13/17]

TreeStream & o2::utils::TreeStream::operator<< ( const UChar_t &  c)
inline

Definition at line 85 of file TreeStream.h.

◆ operator<<() [14/17]

TreeStream & o2::utils::TreeStream::operator<< ( const UInt_t &  i)
inline

Definition at line 109 of file TreeStream.h.

◆ operator<<() [15/17]

TreeStream & o2::utils::TreeStream::operator<< ( const ULong64_t &  l)
inline

Definition at line 133 of file TreeStream.h.

◆ operator<<() [16/17]

TreeStream & o2::utils::TreeStream::operator<< ( const ULong_t &  l)
inline

Definition at line 121 of file TreeStream.h.

◆ operator<<() [17/17]

TreeStream & o2::utils::TreeStream::operator<< ( const UShort_t &  h)
inline

Definition at line 97 of file TreeStream.h.

◆ setID()

void o2::utils::TreeStream::setID ( int  id)
inline

Definition at line 64 of file TreeStream.h.


The documentation for this class was generated from the following files: