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

Public Member Functions

 std_vector_be_pointer (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, std::vector< T > *a_pointer, bool a_verbose)
 
virtual ~std_vector_be_pointer ()
 
void set_pointer (std::vector< T > *a_pointer)
 
const std::vector< T > * get_pointer () const
 
std::vector< T > * get_pointer ()
 
- 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_pointer (const std_vector_be_pointer &a_from)
 
std_vector_be_pointeroperator= (const std_vector_be_pointer &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

std::vector< T > * m_pointer
 
- 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_pointer< T >

Definition at line 183 of file branch_element.

Constructor & Destructor Documentation

◆ std_vector_be_pointer() [1/2]

template<class T >
tools::wroot::std_vector_be_pointer< T >::std_vector_be_pointer ( 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,
std::vector< T > *  a_pointer,
bool  a_verbose 
)
inline

Definition at line 192 of file branch_element.

195  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_verbose)
196  ,m_pointer(a_pointer)
197  {
198 #ifdef TOOLS_MEM
199  mem::increment(s_class().c_str());
200 #endif
201  fClassName = "vector<"+stype(T())+">";
202  fClassVersion = 0;
203  fID = -1;
204  fType = 0;
205  fStreamerType = -1; // TStreamerInfo::kSTLp;
206  }

◆ ~std_vector_be_pointer()

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

Definition at line 207 of file branch_element.

207  {
208 #ifdef TOOLS_MEM
209  mem::decrement(s_class().c_str());
210 #endif
211  }

◆ std_vector_be_pointer() [2/2]

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

Definition at line 213 of file branch_element.

214  :ibo(a_from)
215  ,parent(a_from)
216  ,m_pointer(a_from.m_pointer)
217  {}

Member Function Documentation

◆ fill_leaves()

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

Reimplemented from tools::wroot::branch_element.

Definition at line 223 of file branch_element.

223  {
224  if(!m_pointer) return false;
225  unsigned int c;
226  if(!a_buffer.write_version(4,c)) return false;
227  if(!a_buffer.write((int)m_pointer->size())) return false;
228  if(m_pointer->size()) {
229  // The awfull below is to pass T=bool :
230  T& vr = (*m_pointer)[0];
231  if(!a_buffer.write_fast_array(&vr,(int)m_pointer->size())) return false;
232  }
233  if(!a_buffer.set_byte_count(c)) return false;
234  return true;
235  }

◆ get_pointer() [1/2]

template<class T >
std::vector<T>* tools::wroot::std_vector_be_pointer< T >::get_pointer ( )
inline

Definition at line 239 of file branch_element.

239 {return m_pointer;}

◆ get_pointer() [2/2]

template<class T >
const std::vector<T>* tools::wroot::std_vector_be_pointer< T >::get_pointer ( ) const
inline

Definition at line 238 of file branch_element.

238 {return m_pointer;}

◆ operator=()

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

Definition at line 218 of file branch_element.

218  {
219  parent::operator=(a_from);
220  return *this;
221  }

◆ set_pointer()

template<class T >
void tools::wroot::std_vector_be_pointer< T >::set_pointer ( std::vector< T > *  a_pointer)
inline

Definition at line 237 of file branch_element.

237 {m_pointer = a_pointer;}

Member Data Documentation

◆ m_pointer

template<class T >
std::vector<T>* tools::wroot::std_vector_be_pointer< T >::m_pointer
protected

Definition at line 241 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::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
tools::wroot::std_vector_be_pointer::m_pointer
std::vector< T > * m_pointer
Definition: branch_element:241