|
virtual const std::string & | store_cls () const |
|
virtual bool | stream (buffer &a_buffer) const |
|
| branch (std::ostream &a_out, bool a_byte_swap, uint32 a_compression, seek a_seek_directory, const std::string &a_name, const std::string &a_title, bool a_verbose) |
|
virtual | ~branch () |
|
const std::string & | name () const |
|
const std::string & | title () const |
|
uint64 | entries () const |
|
uint64 | tot_bytes () const |
|
void | set_tot_bytes (uint64 a_value) |
|
uint64 | zip_bytes () const |
|
void | set_zip_bytes (uint64 a_value) |
|
void | set_basket_size (uint32 a_size) |
|
uint32 | basket_size () const |
|
template<class T > |
leaf_ref< T > * | create_leaf_ref (const std::string &a_name, const T &a_ref) |
|
leaf_string_ref * | create_leaf_string_ref (const std::string &a_name, const std::string &a_ref) |
|
template<class T > |
leaf< T > * | create_leaf (const std::string &a_name) |
|
leaf_string * | create_leaf_string (const std::string &a_name) |
|
leaf_element * | create_leaf_element (const std::string &a_name, int a_id, int a_type) |
|
template<class T > |
leaf_std_vector_ref< T > * | create_leaf_std_vector_ref (const std::string &a_name, base_leaf &a_leaf_count, const std::vector< T > &a_ref) |
|
const std::vector< base_leaf * > & | leaves () const |
|
void | reset () |
|
bool | fill (ifile &a_file, uint32 &a_nbytes, uint32 &a_add_bytes, uint32 &a_nout) |
|
bool | add_basket (ifile &a_file, basket &a_basket, uint32 &a_add_bytes, uint32 &a_nout) |
| for parallelization : ///////////////////////////////////////////////// More...
|
|
bool | pfill (iadd_basket &a_badd, uint32 a_nev) |
|
bool | end_pfill (iadd_basket &a_badd) |
|
virtual | ~ibo () |
|
Definition at line 16 of file branch.
◆ branch() [1/2]
tools::wroot::branch::branch |
( |
std::ostream & |
a_out, |
|
|
bool |
a_byte_swap, |
|
|
uint32 |
a_compression, |
|
|
seek |
a_seek_directory, |
|
|
const std::string & |
a_name, |
|
|
const std::string & |
a_title, |
|
|
bool |
a_verbose |
|
) |
| |
|
inline |
Definition at line 118 of file branch.
143 mem::increment(s_class().c_str());
◆ ~branch()
virtual tools::wroot::branch::~branch |
( |
| ) |
|
|
inlinevirtual |
Definition at line 158 of file branch.
171 mem::decrement(s_class().c_str());
◆ branch() [2/2]
tools::wroot::branch::branch |
( |
const branch & |
a_from | ) |
|
|
inlineprotected |
◆ add_basket()
for parallelization : /////////////////////////////////////////////////
Definition at line 364 of file branch.
368 m_out <<
"tools::wroot::branch::add_basket :"
369 <<
" potential overflow : m_write_basket (" <<
m_write_basket <<
")"
378 m_out <<
"tools::wroot::branch::add_basket :"
379 <<
" basket.write_on_file() failed."
391 uint32 add_bytes = a_basket.object_size() + a_basket.key_length();
404 a_add_bytes = add_bytes;
◆ basket_size()
uint32 tools::wroot::branch::basket_size |
( |
| ) |
const |
|
inline |
◆ check_alloc_fBasketXxx()
bool tools::wroot::branch::check_alloc_fBasketXxx |
( |
| ) |
|
|
inlineprotected |
Definition at line 512 of file branch.
519 m_out <<
"tools::wroot::branch::add_basket :"
520 <<
" new size for fBasket[Bytes,Entry,Seek] arrays"
521 <<
" is too close of 32 bits limit."
523 m_out <<
"tools::wroot::branch::add_basket :"
524 <<
" you have to work with larger basket size."
532 m_out <<
"tools::wroot::branch::add_basket : realloc failed." << std::endl;
536 m_out <<
"tools::wroot::branch::add_basket : realloc failed." << std::endl;
540 m_out <<
"tools::wroot::branch::add_basket : realloc failed." << std::endl;
◆ create_leaf()
template<class T >
leaf<T>* tools::wroot::branch::create_leaf |
( |
const std::string & |
a_name | ) |
|
|
inline |
Definition at line 216 of file branch.
217 leaf<T>* lf =
new leaf<T>(
m_out,a_name);
◆ create_leaf_element()
leaf_element* tools::wroot::branch::create_leaf_element |
( |
const std::string & |
a_name, |
|
|
int |
a_id, |
|
|
int |
a_type |
|
) |
| |
|
inline |
Definition at line 228 of file branch.
229 leaf_element* lf =
new leaf_element(
m_out,a_name,a_id,a_type);
◆ create_leaf_ref()
template<class T >
leaf_ref<T>* tools::wroot::branch::create_leaf_ref |
( |
const std::string & |
a_name, |
|
|
const T & |
a_ref |
|
) |
| |
|
inline |
Definition at line 200 of file branch.
201 leaf_ref<T>* lf =
new leaf_ref<T>(
m_out,a_name,a_ref);
◆ create_leaf_std_vector_ref()
template<class T >
leaf_std_vector_ref<T>* tools::wroot::branch::create_leaf_std_vector_ref |
( |
const std::string & |
a_name, |
|
|
base_leaf & |
a_leaf_count, |
|
|
const std::vector< T > & |
a_ref |
|
) |
| |
|
inline |
Definition at line 236 of file branch.
238 leaf_std_vector_ref<T>* lf =
new leaf_std_vector_ref<T>(
m_out,a_name,a_leaf_count,a_ref);
◆ create_leaf_string()
leaf_string* tools::wroot::branch::create_leaf_string |
( |
const std::string & |
a_name | ) |
|
|
inline |
Definition at line 222 of file branch.
223 leaf_string* lf =
new leaf_string(
m_out,a_name);
◆ create_leaf_string_ref()
leaf_string_ref* tools::wroot::branch::create_leaf_string_ref |
( |
const std::string & |
a_name, |
|
|
const std::string & |
a_ref |
|
) |
| |
|
inline |
Definition at line 206 of file branch.
207 leaf_string_ref* lf =
new leaf_string_ref(
m_out,a_name,a_ref);
◆ end_pfill()
bool tools::wroot::branch::end_pfill |
( |
iadd_basket & |
a_badd | ) |
|
|
inline |
Definition at line 478 of file branch.
483 m_out <<
"tools::wroot::branch::end_pfill :"
484 <<
" m_baskets[m_write_basket] should not be null."
489 buffer& buf = bk->datbuf();
490 uint32 lold = buf.length();
493 if(!a_badd.add_basket(bk)) {
494 m_out <<
"tools::wroot::branch::parallel_fill :"
495 <<
" main_branch.add_basket() failed."
◆ entries()
uint64 tools::wroot::branch::entries |
( |
| ) |
const |
|
inline |
◆ fill()
Definition at line 278 of file branch.
284 m_out <<
"tools::wroot::branch::fill :"
285 <<
" potential overflow : m_write_basket (" <<
m_write_basket <<
")"
295 m_out <<
"tools::wroot::branch::fill :"
296 <<
" m_baskets[m_write_basket] should not be null."
301 buffer& buf = bk->datbuf();
303 buf.reset_objs_map();
305 uint32 lold = buf.length();
307 bk->update(bk->key_length()+lold);
312 m_out <<
"tools::wroot::branch::fill :"
313 <<
" fill_leaves() failed."
318 uint32 lnew = buf.length();
319 uint32 nbytes = lnew - lold;
330 m_out <<
"tools::wroot::branch::fill :"
331 <<
" basket.write_on_file() failed."
339 add_bytes = bk->object_size() + bk->key_length();
356 a_add_bytes = add_bytes;
◆ fill_leaves()
virtual bool tools::wroot::branch::fill_leaves |
( |
buffer & |
a_buffer | ) |
|
|
inlineprotectedvirtual |
◆ leaves()
const std::vector<base_leaf*>& tools::wroot::branch::leaves |
( |
| ) |
const |
|
inline |
◆ name()
const std::string& tools::wroot::branch::name |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ pfill()
Definition at line 416 of file branch.
427 m_out <<
"tools::wroot::branch::parallel_fill :"
428 <<
" get_basket failed."
433 buffer& buf = bk->datbuf();
435 uint32 lold = buf.length();
437 bk->update(bk->key_length()+lold);
443 m_out <<
"tools::wroot::branch::parallel_fill :"
444 <<
" fill_leaves() failed."
449 uint32 lnew = buf.length();
450 uint32 nbytes = lnew - lold;
453 bool store_basket =
false;
455 store_basket = (bk->nev()>=a_nev);
461 if(!a_badd.add_basket(bk)) {
462 m_out <<
"tools::wroot::branch::parallel_fill :"
463 <<
" main_branch.add_basket() failed."
472 main_branch_verbose);
◆ reset()
void tools::wroot::branch::reset |
( |
| ) |
|
|
inline |
◆ set_basket_size()
void tools::wroot::branch::set_basket_size |
( |
uint32 |
a_size | ) |
|
|
inline |
◆ set_tot_bytes()
void tools::wroot::branch::set_tot_bytes |
( |
uint64 |
a_value | ) |
|
|
inline |
◆ set_zip_bytes()
void tools::wroot::branch::set_zip_bytes |
( |
uint64 |
a_value | ) |
|
|
inline |
◆ store_cls()
virtual const std::string& tools::wroot::branch::store_cls |
( |
| ) |
const |
|
inlinevirtual |
◆ stream()
virtual bool tools::wroot::branch::stream |
( |
buffer & |
a_buffer | ) |
const |
|
inlinevirtual |
Implements tools::wroot::ibo.
Reimplemented in tools::wroot::branch_object, and tools::wroot::branch_element.
Definition at line 29 of file branch.
31 if(!a_buffer.write_version(8,c))
return false;
36 int fEntryOffsetLen = 1000;
40 if(!a_buffer.write(
fCompress))
return false;
42 if(!a_buffer.write(fEntryOffsetLen))
return false;
45 if(!a_buffer.write(fEntryNumber))
return false;
46 if(!a_buffer.write(fOffset))
return false;
48 if(!a_buffer.write(fSplitLevel))
return false;
50 if(!a_buffer.write(fEntries))
return false;
53 if(!a_buffer.write(fTotBytes))
return false;
54 if(!a_buffer.write(fZipBytes))
return false;
56 if(!m_branches.stream(a_buffer))
return false;
57 if(!
m_leaves.stream(a_buffer))
return false;
58 if(!
m_baskets.stream(a_buffer))
return false;
77 if(!a_buffer.write((
char)1))
return false;
79 if(!a_buffer.write((
char)1))
return false;
93 if(!a_buffer.write(isBigFile))
return false;
99 m_out <<
"tools::wroot::branch::stream :"
100 <<
" attempt to write big Seek "
111 if(!a_buffer.write(std::string(
"")))
return false;
113 if(!a_buffer.set_byte_count(c))
return false;
◆ title()
const std::string& tools::wroot::branch::title |
( |
| ) |
const |
|
inline |
◆ tot_bytes()
uint64 tools::wroot::branch::tot_bytes |
( |
| ) |
const |
|
inline |
◆ zip_bytes()
uint64 tools::wroot::branch::zip_bytes |
( |
| ) |
const |
|
inline |
◆ fAutoDelete
bool tools::wroot::branch::fAutoDelete |
|
protected |
◆ fBasketBytes
uint32* tools::wroot::branch::fBasketBytes |
|
protected |
◆ fBasketEntry
uint32* tools::wroot::branch::fBasketEntry |
|
protected |
◆ fBasketSeek
seek* tools::wroot::branch::fBasketSeek |
|
protected |
◆ fCompress
uint32 tools::wroot::branch::fCompress |
|
protected |
◆ m_basket_size
uint32 tools::wroot::branch::m_basket_size |
|
protected |
◆ m_baskets
◆ m_byte_swap
bool tools::wroot::branch::m_byte_swap |
|
protected |
◆ m_entries
uint64 tools::wroot::branch::m_entries |
|
protected |
◆ m_entry_number
uint64 tools::wroot::branch::m_entry_number |
|
protected |
◆ m_leaves
◆ m_max_baskets
uint32 tools::wroot::branch::m_max_baskets |
|
protected |
◆ m_name
std::string tools::wroot::branch::m_name |
|
protected |
◆ m_out
std::ostream& tools::wroot::branch::m_out |
|
protected |
◆ m_parallel_baskets
std::vector<basket*> tools::wroot::branch::m_parallel_baskets |
for parallelization :
Definition at line 568 of file branch.
◆ m_seek_directory
seek tools::wroot::branch::m_seek_directory |
|
protected |
◆ m_title
std::string tools::wroot::branch::m_title |
|
protected |
◆ m_tot_bytes
uint64 tools::wroot::branch::m_tot_bytes |
|
protected |
◆ m_verbose
bool tools::wroot::branch::m_verbose |
|
protected |
◆ m_write_basket
uint32 tools::wroot::branch::m_write_basket |
|
protected |
◆ m_zip_bytes
uint64 tools::wroot::branch::m_zip_bytes |
|
protected |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/wroot/branch