4 #ifndef tools_wroot_mt_ntuple_column_wise
5 #define tools_wroot_mt_ntuple_column_wise
46 std::vector<icol*>& a_cols,
47 std::vector<branch*>& a_main_branches,
49 :
parent(a_mutex,a_main_file,a_main_branch)
57 :
branch::iadd_basket(a_from)
73 if(
m_cols.empty())
return false;
76 m_out <<
"tools::wroot::mt_ntuple_column_wise::add_row :"
78 <<
"m_cols.size() (" <<
m_cols.size() <<
")."
84 branch* main_branch = (*itb);itb++;
86 if(!(*it)->get_branch().pfill(_badd,
m_nev))
return false;
93 m_out <<
"tools::wroot::mt_ntuple_column_wise::end_fill :"
95 <<
"m_cols.size() (" <<
m_cols.size() <<
")."
101 branch* main_branch = (*itb);itb++;
103 if(!(*it)->get_branch().end_pfill(_badd))
return false;
109 m_out <<
"tools::wroot::mt_ntuple_column_wise::end_fill : it remained " << number <<
" baskets not written on file." << std::endl;
112 if(!status)
return false;
118 std::vector<branch*>& a_main_branches,
119 const std::string& a_name,
const std::string& a_title,
120 bool a_row_mode,
uint32 a_nev,
122 :
parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_verbose)
135 std::vector<branch*>& a_main_branches,
136 const std::vector<uint32>& a_basket_sizes,
138 bool a_row_mode,
uint32 a_nev,
140 :
parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_basket_sizes,a_bkg,a_verbose)
152 #ifdef tools_wroot_mt_ntuple_column_wise //g4tools backcomp :
154 std::vector<branch*>& a_main_branches,
155 const std::vector<uint32>& a_basket_sizes,
158 :
parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_basket_sizes,a_bkg,a_verbose)
184 if(a_cols.empty())
return false;
186 branch& _branch = (*it)->get_branch();
194 std::vector<branch*>::const_iterator itb = a_main_branches.begin();
196 branch& _branch = (*it)->get_branch();
198 branch* main_branch = (*itb);itb++;
201 if(main_branch->
add_basket(a_main_file,*_front_basket,add_bytes,nout)) {
209 delete _front_basket;
218 if(!
flush_baskets(a_mutex,a_main_file,a_cols,a_main_branches))
return false;
222 branch& _branch = (*it)->get_branch();
226 branch& _branch = (*it)->get_branch();
236 std::vector<icol*>::const_iterator pit =
m_cols.begin();
238 if((*mit)->leaves().empty()) {
239 m_out <<
"tools::wroot::mt_ntuple_column_wise::end_leaves :"
240 <<
" branch " << (*mit)->name() <<
" without leaf." << std::endl;
244 base_leaf* _mleaf = *((*mit)->leaves().begin());
245 base_leaf* _pleaf = (*pit)->get_leaf(); pit++;
247 TOOLS_WROOT_MT_NTUPLE_STRING_SET_MAX
250 #undef TOOLS_WROOT_MT_NTUPLE_STRING_SET_MAX