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

Public Member Functions

virtual bool add_basket (basket *a_basket)
 
 basket_add (imutex &a_mutex, ifile &a_main_file, branch &a_main_branch, branch &a_parallel_branch, std::vector< icol * > &a_cols, std::vector< branch * > &a_main_branches, bool a_row_mode)
 
- Public Member Functions inherited from tools::wroot::mt_basket_add
 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

 basket_add (const basket_add &a_from)
 
basket_addoperator= (const basket_add &)
 
- Protected Member Functions inherited from tools::wroot::mt_basket_add
 mt_basket_add (const mt_basket_add &a_from)
 
mt_basket_addoperator= (const mt_basket_add &)
 

Protected Attributes

branchm_parallel_branch
 
std::vector< icol * > & m_cols
 
std::vector< branch * > & m_main_branches
 
bool m_row_mode
 
- Protected Attributes inherited from tools::wroot::mt_basket_add
imutexm_mutex
 
ifilem_main_file
 
branchm_main_branch
 

Detailed Description

Definition at line 19 of file mt_ntuple_column_wise.

Constructor & Destructor Documentation

◆ basket_add() [1/2]

tools::wroot::mt_ntuple_column_wise::basket_add::basket_add ( imutex a_mutex,
ifile a_main_file,
branch a_main_branch,
branch a_parallel_branch,
std::vector< icol * > &  a_cols,
std::vector< branch * > &  a_main_branches,
bool  a_row_mode 
)
inline

Definition at line 44 of file mt_ntuple_column_wise.

49  :parent(a_mutex,a_main_file,a_main_branch)
50  ,m_parallel_branch(a_parallel_branch)
51  ,m_cols(a_cols)
52  ,m_main_branches(a_main_branches)
53  ,m_row_mode(a_row_mode)
54  {}

◆ basket_add() [2/2]

tools::wroot::mt_ntuple_column_wise::basket_add::basket_add ( const basket_add a_from)
inlineprotected

Definition at line 56 of file mt_ntuple_column_wise.

57  :branch::iadd_basket(a_from)
58  ,parent(a_from)
59  ,m_parallel_branch(a_from.m_parallel_branch)
60  ,m_cols(a_from.m_cols)
61  ,m_main_branches(a_from.m_main_branches)
62  ,m_row_mode(a_from.m_row_mode)
63  {}

Member Function Documentation

◆ add_basket()

virtual bool tools::wroot::mt_ntuple_column_wise::basket_add::add_basket ( basket a_basket)
inlinevirtual

Reimplemented from tools::wroot::mt_basket_add.

Definition at line 22 of file mt_ntuple_column_wise.

22  { // we get ownership of a_basket.
23  if(m_row_mode) {
24  //m_ntuple.m_out << "debug : add_basket in parallel branch name " << m_parallel_branch.name()
25  // << ", num existing baskets " << m_parallel_branch.m_parallel_baskets.size() << "." << std::endl;
26  m_parallel_branch.m_parallel_baskets.push_back(a_basket);
28  return true;
29  } else {
30  m_mutex.lock();
31  uint32 add_bytes,nout;
32  bool status = false;
33  if(m_main_branch.add_basket(m_main_file,*a_basket,add_bytes,nout)) {
36  status = true;
37  }
38  m_mutex.unlock();
39  delete a_basket;
40  return status;
41  }
42  }

◆ operator=()

basket_add& tools::wroot::mt_ntuple_column_wise::basket_add::operator= ( const basket_add )
inlineprotected

Definition at line 64 of file mt_ntuple_column_wise.

64 {return *this;}

Member Data Documentation

◆ m_cols

std::vector<icol*>& tools::wroot::mt_ntuple_column_wise::basket_add::m_cols
protected

Definition at line 67 of file mt_ntuple_column_wise.

◆ m_main_branches

std::vector<branch*>& tools::wroot::mt_ntuple_column_wise::basket_add::m_main_branches
protected

Definition at line 68 of file mt_ntuple_column_wise.

◆ m_parallel_branch

branch& tools::wroot::mt_ntuple_column_wise::basket_add::m_parallel_branch
protected

Definition at line 66 of file mt_ntuple_column_wise.

◆ m_row_mode

bool tools::wroot::mt_ntuple_column_wise::basket_add::m_row_mode
protected

Definition at line 69 of file mt_ntuple_column_wise.


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_ntuple_column_wise::basket_add::m_parallel_branch
branch & m_parallel_branch
Definition: mt_ntuple_column_wise:66
tools::wroot::mt_ntuple_column_wise::basket_add::m_main_branches
std::vector< branch * > & m_main_branches
Definition: mt_ntuple_column_wise:68
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_ntuple_column_wise::flush_baskets
static bool flush_baskets(imutex &a_mutex, ifile &a_main_file, std::vector< icol * > &a_cols, std::vector< branch * > &a_main_branches)
Definition: mt_ntuple_column_wise:191
tools::wroot::branch::m_parallel_baskets
std::vector< basket * > m_parallel_baskets
for parallelization :
Definition: branch:568
tools::wroot::mt_ntuple_column_wise::basket_add::m_row_mode
bool m_row_mode
Definition: mt_ntuple_column_wise:69
tools::wroot::mt_basket_add::m_mutex
imutex & m_mutex
Definition: mt_basket_add:41
tools::wroot::mt_ntuple_column_wise::ready_to_flush_baskets
static bool ready_to_flush_baskets(std::vector< icol * > &a_cols)
Definition: mt_ntuple_column_wise:182
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::mt_ntuple_column_wise::basket_add::m_cols
std::vector< icol * > & m_cols
Definition: mt_ntuple_column_wise:67
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