g4tools  5.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::wroot::branch_object Class Reference
Inheritance diagram for tools::wroot::branch_object:
Inheritance graph
[legend]
Collaboration diagram for tools::wroot::branch_object:
Collaboration graph
[legend]

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool stream (buffer &a_buffer) const
 
 branch_object (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_object ()
 
leaf_objectcreate_leaf (const std::string &a_name, const iobject &a_obj)
 
- Public Member Functions inherited from 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)
 
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_refcreate_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_stringcreate_leaf_string (const std::string &a_name)
 
leaf_elementcreate_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)
 
- Public Member Functions inherited from tools::wroot::ibo
virtual ~ibo ()
 

Protected Member Functions

 branch_object (const branch_object &a_from)
 
branch_objectoperator= (const branch_object &a_from)
 
- Protected Member Functions inherited from tools::wroot::branch
 branch (const branch &a_from)
 
branchoperator= (const branch &)
 
bool check_alloc_fBasketXxx ()
 
virtual bool fill_leaves (buffer &a_buffer)
 

Protected Attributes

std::string fClassName
 
- Protected Attributes inherited from tools::wroot::branch
std::ostream & m_out
 
bool m_byte_swap
 
bool m_verbose
 
seek m_seek_directory
 
obj_array< basketm_baskets
 
std::string m_name
 
std::string m_title
 
bool fAutoDelete
 
obj_array< base_leafm_leaves
 
uint32 fCompress
 
uint32 m_basket_size
 
uint32 m_write_basket
 
uint64 m_entry_number
 
uint64 m_entries
 
uint64 m_tot_bytes
 
uint64 m_zip_bytes
 
uint32 m_max_baskets
 
uint32fBasketBytes
 
uint32fBasketEntry
 
seekfBasketSeek
 

Additional Inherited Members

- Public Attributes inherited from tools::wroot::branch
std::vector< basket * > m_parallel_baskets
 for parallelization : More...
 

Detailed Description

Definition at line 12 of file branch_object.

Constructor & Destructor Documentation

◆ branch_object() [1/2]

tools::wroot::branch_object::branch_object ( 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 39 of file branch_object.

42  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_verbose)
43  ,fClassName()
44  {
45 #ifdef TOOLS_MEM
46  mem::increment(s_class().c_str());
47 #endif
48  }

◆ ~branch_object()

virtual tools::wroot::branch_object::~branch_object ( )
inlinevirtual

Definition at line 49 of file branch_object.

49  {
50 #ifdef TOOLS_MEM
51  mem::decrement(s_class().c_str());
52 #endif
53  }

◆ branch_object() [2/2]

tools::wroot::branch_object::branch_object ( const branch_object a_from)
inlineprotected

Definition at line 55 of file branch_object.

55 :ibo(a_from),parent(a_from) {}

Member Function Documentation

◆ create_leaf()

leaf_object* tools::wroot::branch_object::create_leaf ( const std::string &  a_name,
const iobject a_obj 
)
inline

Definition at line 58 of file branch_object.

58  {
59  fClassName = a_obj.store_class_name();
60  leaf_object* lf = new leaf_object(m_out,a_name,a_obj);
61  m_leaves.push_back(lf);
62  return lf;
63  }

◆ operator=()

branch_object& tools::wroot::branch_object::operator= ( const branch_object a_from)
inlineprotected

Definition at line 56 of file branch_object.

56 {parent::operator=(a_from);return *this;}

◆ store_cls()

virtual const std::string& tools::wroot::branch_object::store_cls ( ) const
inlinevirtual

Reimplemented from tools::wroot::branch.

Definition at line 21 of file branch_object.

21  {
22  static const std::string s_v("TBranchObject");
23  return s_v;
24  }

◆ stream()

virtual bool tools::wroot::branch_object::stream ( buffer a_buffer) const
inlinevirtual

Reimplemented from tools::wroot::branch.

Definition at line 25 of file branch_object.

25  {
26  if(fClassName.empty()) {
27  m_out << "tools::wroot::branch_object::stream : fClassName is empty." << std::endl;
28  return false;
29  }
30  unsigned int c;
31  if(!a_buffer.write_version(1,c)) return false;
32  if(!parent::stream(a_buffer)) return false;
33  if(!a_buffer.write(fClassName)) return false;
34  if(!a_buffer.set_byte_count(c)) return false;
35  return true;
36  }

Member Data Documentation

◆ fClassName

std::string tools::wroot::branch_object::fClassName
protected

Definition at line 65 of file branch_object.


The documentation for this class was generated from the following file:
tools::wroot::branch_object::fClassName
std::string fClassName
Definition: branch_object:65
tools::wroot::branch::operator=
branch & operator=(const branch &)
Definition: branch:180
tools::wroot::branch::m_out
std::ostream & m_out
Definition: branch:561
tools::wroot::branch::m_leaves
obj_array< base_leaf > m_leaves
Definition: branch:580
tools::wroot::branch::stream
virtual bool stream(buffer &a_buffer) const
Definition: branch:29