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

Public Member Functions

 std_vector_be_ref (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, const std::vector< T > &a_ref, bool a_verbose)
 
virtual ~std_vector_be_ref ()
 
const std::vector< T > & variable () const
 
std::vector< T > & variable ()
 
- Public Member Functions inherited from tools::wroot::branch_element
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

 std_vector_be_ref (const std_vector_be_ref &a_from)
 
std_vector_be_refoperator= (const std_vector_be_ref &a_from)
 
virtual bool fill_leaves (buffer &a_buffer)
 
- Protected Member Functions inherited from tools::wroot::branch_element
 branch_element (const branch_element &a_from)
 
branch_elementoperator= (const branch_element &a_from)
 
- Protected Member Functions inherited from tools::wroot::branch
 branch (const branch &a_from)
 
branchoperator= (const branch &)
 
bool check_alloc_fBasketXxx ()
 

Protected Attributes

const std::vector< T > & m_ref
 
- Protected Attributes inherited from tools::wroot::branch_element
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

template<class T>
class tools::wroot::std_vector_be_ref< T >

Definition at line 80 of file branch_element.

Constructor & Destructor Documentation

◆ std_vector_be_ref() [1/2]

template<class T >
tools::wroot::std_vector_be_ref< T >::std_vector_be_ref ( 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,
const std::vector< T > &  a_ref,
bool  a_verbose 
)
inline

Definition at line 89 of file branch_element.

92  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_verbose)
93  ,m_ref(a_ref)
94  {
95 #ifdef TOOLS_MEM
96  mem::increment(s_class().c_str());
97 #endif
98  fClassName = "vector<"+stype(T())+">";
99  fClassVersion = 0;
100  fID = -1;
101  fType = 0;
102  fStreamerType = -1; // TStreamerInfo::kSTLp;
103  }

◆ ~std_vector_be_ref()

template<class T >
virtual tools::wroot::std_vector_be_ref< T >::~std_vector_be_ref ( )
inlinevirtual

Definition at line 104 of file branch_element.

104  {
105 #ifdef TOOLS_MEM
106  mem::decrement(s_class().c_str());
107 #endif
108  }

◆ std_vector_be_ref() [2/2]

template<class T >
tools::wroot::std_vector_be_ref< T >::std_vector_be_ref ( const std_vector_be_ref< T > &  a_from)
inlineprotected

Definition at line 110 of file branch_element.

111  :ibo(a_from)
112  ,parent(a_from)
113  ,m_ref(a_from.m_ref)
114  {}

Member Function Documentation

◆ fill_leaves()

template<class T >
virtual bool tools::wroot::std_vector_be_ref< T >::fill_leaves ( buffer a_buffer)
inlineprotectedvirtual

Reimplemented from tools::wroot::branch_element.

Definition at line 120 of file branch_element.

120  {
121  unsigned int c;
122  if(!a_buffer.write_version(4,c)) return false;
123  if(!a_buffer.write((int)m_ref.size())) return false;
124  if(m_ref.size()) {
125  // The awfull below is to pass T=bool :
126  const T& vr = m_ref[0];
127  if(!a_buffer.write_fast_array(&vr,(int)m_ref.size())) return false;
128  }
129  if(!a_buffer.set_byte_count(c)) return false;
130  return true;
131  }

◆ operator=()

template<class T >
std_vector_be_ref& tools::wroot::std_vector_be_ref< T >::operator= ( const std_vector_be_ref< T > &  a_from)
inlineprotected

Definition at line 115 of file branch_element.

115  {
116  parent::operator=(a_from);
117  return *this;
118  }

◆ variable() [1/2]

template<class T >
std::vector<T>& tools::wroot::std_vector_be_ref< T >::variable ( )
inline

Definition at line 134 of file branch_element.

134 {return const_cast< std::vector<T>& >(m_ref);}

◆ variable() [2/2]

template<class T >
const std::vector<T>& tools::wroot::std_vector_be_ref< T >::variable ( ) const
inline

Definition at line 133 of file branch_element.

133 {return m_ref;}

Member Data Documentation

◆ m_ref

template<class T >
const std::vector<T>& tools::wroot::std_vector_be_ref< T >::m_ref
protected

Definition at line 136 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::fStreamerType
int fStreamerType
Definition: branch_element:76
tools::wroot::std_vector_be_ref::m_ref
const std::vector< T > & m_ref
Definition: branch_element:136
tools::wroot::branch_element::fID
int fID
Definition: branch_element:74
tools::wroot::branch_element::operator=
branch_element & operator=(const branch_element &a_from)
Definition: branch_element:62
tools::wroot::branch_element::fClassName
std::string fClassName
Definition: branch_element:72
tools::stype
const std::string & stype(const mat4f &)
Definition: mat4f:73
tools::wroot::branch_element::fType
int fType
Definition: branch_element:75