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

Public Member Functions

virtual const std::string & store_cls () const
 
virtual bool stream (buffer &a_buffer) const
 
 branch_element (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_element ()
 
leaf_elementcreate_leaf_element (const std::string &a_name)
 
- 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_element (const branch_element &a_from)
 
branch_elementoperator= (const branch_element &a_from)
 
virtual bool fill_leaves (buffer &)
 
- Protected Member Functions inherited from tools::wroot::branch
 branch (const branch &a_from)
 
branchoperator= (const branch &)
 
bool check_alloc_fBasketXxx ()
 

Protected Attributes

std::string fClassName
 
int fClassVersion
 
int fID
 
int fType
 
int fStreamerType
 
- 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 17 of file branch_element.

Constructor & Destructor Documentation

◆ branch_element() [1/2]

tools::wroot::branch_element::branch_element ( 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 43 of file branch_element.

45  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_verbose)
46  ,fClassVersion(0)
47  ,fID(0)
48  ,fType(0)
49  ,fStreamerType(-1)
50  {
51 #ifdef TOOLS_MEM
52  mem::increment(s_class().c_str());
53 #endif
54  }

◆ ~branch_element()

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

Definition at line 55 of file branch_element.

55  {
56 #ifdef TOOLS_MEM
57  mem::decrement(s_class().c_str());
58 #endif
59  }

◆ branch_element() [2/2]

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

Definition at line 61 of file branch_element.

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

Member Function Documentation

◆ create_leaf_element()

leaf_element* tools::wroot::branch_element::create_leaf_element ( const std::string &  a_name)
inline

Definition at line 64 of file branch_element.

64  {
65  leaf_element* lf = new leaf_element(m_out,a_name,fID,fType);
66  m_leaves.push_back(lf);
67  return lf;
68  }

◆ fill_leaves()

virtual bool tools::wroot::branch_element::fill_leaves ( buffer )
inlineprotectedvirtual

Reimplemented from tools::wroot::branch.

Reimplemented in tools::wroot::std_vector_be_pointer< T >, and tools::wroot::std_vector_be_ref< T >.

Definition at line 70 of file branch_element.

70 {return false;} //must be derived.

◆ operator=()

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

Definition at line 62 of file branch_element.

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

◆ store_cls()

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

Reimplemented from tools::wroot::branch.

Definition at line 26 of file branch_element.

◆ stream()

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

Reimplemented from tools::wroot::branch.

Definition at line 27 of file branch_element.

27  {
28  unsigned int c;
29  if(!a_buffer.write_version(1,c)) return false;
30  if(!parent::stream(a_buffer)) return false;
31 
32  if(!a_buffer.write(fClassName)) return false;
33  if(!a_buffer.write(fClassVersion)) return false;
34  if(!a_buffer.write(fID)) return false;
35  if(!a_buffer.write(fType)) return false;
36  if(!a_buffer.write(fStreamerType)) return false;
37 
38  if(!a_buffer.set_byte_count(c)) return false;
39  return true;
40  }

Member Data Documentation

◆ fClassName

std::string tools::wroot::branch_element::fClassName
protected

Definition at line 72 of file branch_element.

◆ fClassVersion

int tools::wroot::branch_element::fClassVersion
protected

Definition at line 73 of file branch_element.

◆ fID

int tools::wroot::branch_element::fID
protected

Definition at line 74 of file branch_element.

◆ fStreamerType

int tools::wroot::branch_element::fStreamerType
protected

Definition at line 76 of file branch_element.

◆ fType

int tools::wroot::branch_element::fType
protected

Definition at line 75 of file branch_element.


The documentation for this class was generated from the following file:
tools::wroot::branch_element::fClassVersion
int fClassVersion
Definition: branch_element:73
tools::wroot::branch_element_store_class
const std::string & branch_element_store_class()
Definition: branch_element:12
tools::wroot::branch_element::fStreamerType
int fStreamerType
Definition: branch_element:76
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_element::fID
int fID
Definition: branch_element:74
tools::wroot::branch_element::fClassName
std::string fClassName
Definition: branch_element:72
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
tools::wroot::branch_element::fType
int fType
Definition: branch_element:75