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

Public Member Functions

virtual bool add_basket (basket *a_basket)
 
 mt_basket_add (imutex &a_mutex, ifile &a_main_file, branch &a_main_branch)
 
- Public Member Functions inherited from tools::wroot::branch::iadd_basket
virtual ~iadd_basket ()
 

Protected Member Functions

 mt_basket_add (const mt_basket_add &a_from)
 
mt_basket_addoperator= (const mt_basket_add &)
 

Protected Attributes

imutexm_mutex
 
ifilem_main_file
 
branchm_main_branch
 

Detailed Description

Definition at line 14 of file mt_basket_add.

Constructor & Destructor Documentation

◆ mt_basket_add() [1/2]

tools::wroot::mt_basket_add::mt_basket_add ( imutex a_mutex,
ifile a_main_file,
branch a_main_branch 
)
inline

Definition at line 32 of file mt_basket_add.

33  :m_mutex(a_mutex),m_main_file(a_main_file),m_main_branch(a_main_branch)
34  {}

◆ mt_basket_add() [2/2]

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

Definition at line 36 of file mt_basket_add.

36  :parent()
37  ,m_mutex(a_from.m_mutex),m_main_file(a_from.m_main_file),m_main_branch(a_from.m_main_branch)
38  {}

Member Function Documentation

◆ add_basket()

virtual bool tools::wroot::mt_basket_add::add_basket ( basket a_basket)
inlinevirtual

Implements tools::wroot::branch::iadd_basket.

Reimplemented in tools::wroot::mt_ntuple_column_wise::basket_add.

Definition at line 17 of file mt_basket_add.

17  { //we take ownership of a_basket.
18  m_mutex.lock();
19  uint32 add_bytes,nout;
20  if(!m_main_branch.add_basket(m_main_file,*a_basket,add_bytes,nout)) {
21  m_mutex.unlock();
22  delete a_basket;
23  return false;
24  }
27  m_mutex.unlock();
28  delete a_basket;
29  return true;
30  }

◆ operator=()

mt_basket_add& tools::wroot::mt_basket_add::operator= ( const mt_basket_add )
inlineprotected

Definition at line 39 of file mt_basket_add.

39 {return *this;}

Member Data Documentation

◆ m_main_branch

branch& tools::wroot::mt_basket_add::m_main_branch
protected

Definition at line 43 of file mt_basket_add.

◆ m_main_file

ifile& tools::wroot::mt_basket_add::m_main_file
protected

Definition at line 42 of file mt_basket_add.

◆ m_mutex

imutex& tools::wroot::mt_basket_add::m_mutex
protected

Definition at line 41 of file mt_basket_add.


The documentation for this class was generated from the following file:
tools::wroot::branch::tot_bytes
uint64 tot_bytes() const
Definition: branch:187
tools::wroot::branch::zip_bytes
uint64 zip_bytes() const
Definition: branch:190
tools::wroot::mt_basket_add::m_main_file
ifile & m_main_file
Definition: mt_basket_add:42
tools::wroot::mt_basket_add::m_main_branch
branch & m_main_branch
Definition: mt_basket_add:43
tools::wroot::mt_basket_add::m_mutex
imutex & m_mutex
Definition: mt_basket_add:41
tools::wroot::imutex::unlock
virtual bool unlock()=0
tools::wroot::branch::add_basket
bool add_basket(ifile &a_file, basket &a_basket, uint32 &a_add_bytes, uint32 &a_nout)
for parallelization : /////////////////////////////////////////////////
Definition: branch:364
tools::wroot::branch::set_zip_bytes
void set_zip_bytes(uint64 a_value)
Definition: branch:191
tools::wroot::branch::set_tot_bytes
void set_tot_bytes(uint64 a_value)
Definition: branch:188
tools::uint32
unsigned int uint32
Definition: typedefs:71
tools::wroot::imutex::lock
virtual bool lock()=0