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

Public Member Functions

virtual void * cast (tools::cid a_class) const
 
virtual tools::cid id_cls () const
 
 column (store &a_store, pages &a_pages, bool a_write, const std::string &a_name, size_t a_basket_size)
 
virtual ~column ()
 
bool fill (const T &a_value)
 
bool get_entry (T &a_v) const
 
- Public Member Functions inherited from tools::hdf5::ntuple::column_ref< T >
virtual bool add ()
 
virtual bool fetch_entry ()
 
virtual void reset ()
 
virtual const std::string & name () const
 
virtual bool set_basket_size (size_t a_size)
 
 column_ref (store &a_store, pages &a_pages, bool a_write, const std::string &a_name, size_t a_basket_size, T &a_ref)
 
virtual ~column_ref ()
 
- Public Member Functions inherited from tools::hdf5::ntuple::icol
virtual ~icol ()
 

Static Public Member Functions

static tools::cid id_class ()
 
- Static Public Member Functions inherited from tools::hdf5::ntuple::column_ref< T >
static tools::cid id_class ()
 

Protected Member Functions

 column (const column &a_from)
 
columnoperator= (const column &a_from)
 
- Protected Member Functions inherited from tools::hdf5::ntuple::column_ref< T >
 column_ref (const column_ref &a_from)
 
column_refoperator= (const column_ref &a_from)
 

Protected Attributes

m_tmp
 
- Protected Attributes inherited from tools::hdf5::ntuple::column_ref< T >
storem_store
 
pagesm_branch
 
bool m_write
 
std::string m_name
 
T & m_ref
 
size_t m_basket_size
 
size_t m_basket_pos
 
size_t m_basket_end
 
T * m_basket
 
size_t m_want_new_basket_size
 

Detailed Description

template<class T>
class tools::hdf5::ntuple::column< T >

Definition at line 204 of file ntuple.

Constructor & Destructor Documentation

◆ column() [1/2]

template<class T >
tools::hdf5::ntuple::column< T >::column ( store a_store,
pages a_pages,
bool  a_write,
const std::string &  a_name,
size_t  a_basket_size 
)
inline

Definition at line 223 of file ntuple.

224  :parent(a_store,a_pages,a_write,a_name,a_basket_size,m_tmp)
225  ,m_tmp(T())
226  {
227 #ifdef TOOLS_MEM
228  tools::mem::increment(s_class().c_str());
229 #endif
230  }

◆ ~column()

template<class T >
virtual tools::hdf5::ntuple::column< T >::~column ( )
inlinevirtual

Definition at line 231 of file ntuple.

231  {
232 #ifdef TOOLS_MEM
233  tools::mem::decrement(s_class().c_str());
234 #endif
235  }

◆ column() [2/2]

template<class T >
tools::hdf5::ntuple::column< T >::column ( const column< T > &  a_from)
inlineprotected

Definition at line 237 of file ntuple.

238  :icol(a_from)
239  ,parent(a_from)
240  ,m_tmp(a_from.m_tmp)
241  {}

Member Function Documentation

◆ cast()

template<class T >
virtual void* tools::hdf5::ntuple::column< T >::cast ( tools::cid  a_class) const
inlinevirtual

Reimplemented from tools::hdf5::ntuple::column_ref< T >.

Definition at line 217 of file ntuple.

217  {
218  if(void* p = tools::cmp_cast<column>(this,a_class)) {return p;}
219  else return 0;
220  }

◆ fill()

template<class T >
bool tools::hdf5::ntuple::column< T >::fill ( const T &  a_value)
inline

Definition at line 249 of file ntuple.

249 {m_tmp = a_value;return true;} //write.

◆ get_entry()

template<class T >
bool tools::hdf5::ntuple::column< T >::get_entry ( T &  a_v) const
inline

Definition at line 250 of file ntuple.

250 {a_v = m_tmp;return true;} //read.

◆ id_class()

template<class T >
static tools::cid tools::hdf5::ntuple::column< T >::id_class ( )
inlinestatic

Definition at line 213 of file ntuple.

213  {
214  static const T s_v = T(); //do that for T = std::string.
215  return tools::_cid(s_v);
216  }

◆ id_cls()

template<class T >
virtual tools::cid tools::hdf5::ntuple::column< T >::id_cls ( ) const
inlinevirtual

Reimplemented from tools::hdf5::ntuple::column_ref< T >.

Definition at line 221 of file ntuple.

221 {return id_class();}

◆ operator=()

template<class T >
column& tools::hdf5::ntuple::column< T >::operator= ( const column< T > &  a_from)
inlineprotected

Definition at line 242 of file ntuple.

242  {
243  if(&a_from==this) return *this;
244  parent::operator=(a_from);
245  m_tmp = a_from.m_tmp;
246  return *this;
247  }

Member Data Documentation

◆ m_tmp

template<class T >
T tools::hdf5::ntuple::column< T >::m_tmp
protected

Definition at line 252 of file ntuple.


The documentation for this class was generated from the following file:
tools::_cid
cid _cid(byte)
Definition: cids:14
tools::hdf5::ntuple::column_ref::operator=
column_ref & operator=(const column_ref &a_from)
Definition: ntuple:181
tools::hdf5::ntuple::column::id_class
static tools::cid id_class()
Definition: ntuple:213
tools::hdf5::ntuple::column::m_tmp
T m_tmp
Definition: ntuple:252