g4tools  5.4.0
Classes | Namespaces | Macros
ntuple File Reference
#include "tree"
#include "icol"
#include "../vfind"
#include "../vmanip"
#include "../ntuple_booking"
#include "../sout"
#include "../scast"
#include "../forit"
#include "mpi_create_basket"
#include "columns.icc"
Include dependency graph for ntuple:

Go to the source code of this file.

Classes

class  tools::wroot::ntuple
 

Namespaces

 tools
 inlined C code : ///////////////////////////////////
 
 tools::wroot
 

Macros

#define tools_wroot_ntuple
 
#define TOOLS_WROOT_NTUPLE_CREATE_COL(a__type)
 
#define TOOLS_WROOT_NTUPLE_CREATE_VEC_COL(a__type)
 
#define TOOLS_WROOT_NTUPLE_SET_LEAF_LENGTH_MAX(a__type)
 
#define TOOLS_WROOT_NTUPLE_SET_LEAF_STD_VECTOR_LENGTH_MAX(a__type)
 
#define TOOLS_WROOT_NTUPLE_SET_LEAF_STRING_LENGTH_MAX
 

Macro Definition Documentation

◆ tools_wroot_ntuple

#define tools_wroot_ntuple

Definition at line 5 of file ntuple.

◆ TOOLS_WROOT_NTUPLE_CREATE_COL

#define TOOLS_WROOT_NTUPLE_CREATE_COL (   a__type)
Value:
if((*it).cls_id()==_cid(a__type())) {\
a__type* user = (a__type*)(*it).user_obj();\
if(user) {\
if(!create_column_ref<a__type>((*it).name(),*user)) {\
m_out << "tools::wroot::ntuple : create_column_ref(" << (*it).name() << ") failed." << std::endl;\
safe_clear<icol>(m_cols);\
safe_clear<branch>(m_branches);\
return;\
}\
} else {\
if(!create_column<a__type>((*it).name())) {\
m_out << "tools::wroot::ntuple : create_column(" << (*it).name() << ") failed." << std::endl;\
safe_clear<icol>(m_cols);\
safe_clear<branch>(m_branches);\
return;\
}\
}\
}

◆ TOOLS_WROOT_NTUPLE_CREATE_VEC_COL

#define TOOLS_WROOT_NTUPLE_CREATE_VEC_COL (   a__type)
Value:
if((*it).cls_id()==_cid_std_vector<a__type>()) {\
std::vector<a__type>* vec = (std::vector<a__type>*)(*it).user_obj();\
if(vec) {\
if(!create_column_vector_ref<a__type>((*it).name(),*vec)) {\
m_out << "tools::wroot::ntuple : create_column_vector_ref(" << (*it).name() << ") failed." << std::endl;\
safe_clear<icol>(m_cols);\
safe_clear<branch>(m_branches);\
return;\
}\
} else {\
if(!create_column_vector<a__type>((*it).name())) {\
m_out << "tools::wroot::ntuple : create_column_vector(" << (*it).name() << ") failed." << std::endl;\
safe_clear<icol>(m_cols);\
safe_clear<branch>(m_branches);\
return;\
}\
}\
}

◆ TOOLS_WROOT_NTUPLE_SET_LEAF_LENGTH_MAX

#define TOOLS_WROOT_NTUPLE_SET_LEAF_LENGTH_MAX (   a__type)
Value:
{leaf_ref<a__type>* _mleaf_ = _mleaf?id_cast<base_leaf, leaf_ref<a__type> >(*_mleaf):0;\
if(_mleaf_) {\
uint32 _len;\
if(!a_impi.unpack(_len)) return false;\
a__type _mx;\
if(!a_impi.unpack(_mx)) return false;\
_mleaf_->set_length(mx(_len,_mleaf_->length()));\
_mleaf_->set_max(mx(_mx,_mleaf_->get_max()));\
set_done = true;\
}}

◆ TOOLS_WROOT_NTUPLE_SET_LEAF_STD_VECTOR_LENGTH_MAX

#define TOOLS_WROOT_NTUPLE_SET_LEAF_STD_VECTOR_LENGTH_MAX (   a__type)
Value:
{leaf_std_vector_ref<a__type>* _mleaf_ = _mleaf?id_cast<base_leaf, leaf_std_vector_ref<a__type> >(*_mleaf):0;\
if(_mleaf_) {\
uint32 _len;\
if(!a_impi.unpack(_len)) return false;\
a__type _mx;\
if(!a_impi.unpack(_mx)) return false;\
_mleaf_->set_length(mx(_len,_mleaf_->length()));\
_mleaf_->set_max(mx(_mx,_mleaf_->get_max()));\
set_done = true;\
}}

◆ TOOLS_WROOT_NTUPLE_SET_LEAF_STRING_LENGTH_MAX

#define TOOLS_WROOT_NTUPLE_SET_LEAF_STRING_LENGTH_MAX
Value:
{leaf_string_ref* _mleaf_ = _mleaf?id_cast<base_leaf,leaf_string_ref>(*_mleaf):0;\
if(_mleaf_) {\
uint32 _len;\
if(!a_impi.unpack(_len)) return false;\
int _mx;\
if(!a_impi.unpack(_mx)) return false;\
_mleaf_->set_length(mx(_len,_mleaf_->length()));\
_mleaf_->set_max(mx(_mx,_mleaf_->get_max()));\
set_done = true;\
}}
tools::_cid
cid _cid(byte)
Definition: cids:14
tools::mx
T mx(const T &a, const T &b)
Definition: mnmx:13