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

Public Member Functions

virtual bool add_row (impi &a_mpi, int a_dest, int a_tag)
 
virtual bool end_fill (impi &a_mpi, int a_dest, int a_tag)
 
 mpi_ntuple_row_wise (uint32 a_id, 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, uint32 a_basket_size, bool a_verbose)
 
 mpi_ntuple_row_wise (uint32 a_id, std::ostream &a_out, bool a_byte_swap, uint32 a_compression, seek a_seek_directory, uint32 a_basket_size, const ntuple_booking &a_bkg, bool a_verbose)
 
virtual ~mpi_ntuple_row_wise ()
 
- Public Member Functions inherited from tools::wroot::base_pntuple_row_wise
 base_pntuple_row_wise (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, uint32 a_basket_size, bool a_verbose)
 
 base_pntuple_row_wise (std::ostream &a_out, bool a_byte_swap, uint32 a_compression, seek a_seek_directory, uint32 a_basket_size, const ntuple_booking &a_bkg, bool a_verbose)
 
virtual ~base_pntuple_row_wise ()
 
template<class T >
column_ref< T > * create_column_ref (const std::string &a_name, const T &a_ref)
 
template<class T >
column< T > * create_column (const std::string &a_name, const T &a_def=T())
 
column_string_ref * create_column_string_ref (const std::string &a_name, const std::string &a_ref)
 
column_string * create_column_string (const std::string &a_name, const std::string &a_def=std::string())
 
column_vector_string_ref * create_column_vector_string_ref (const std::string &a_name, const std::vector< std::string > &a_ref, char a_sep)
 
column_vector_string * create_column_vector_string (const std::string &a_name, const std::vector< std::string > &a_def, char a_sep)
 
template<class T >
std_vector_column_ref< T > * create_column_vector_ref (const std::string &a_name, const std::vector< T > &a_ref)
 
template<class T >
std_vector_column< T > * create_column_vector (const std::string &a_name, const std::vector< T > &a_def=std::vector< T >())
 
- Public Member Functions inherited from tools::wroot::base_pntuple
 base_pntuple (std::ostream &a_out, seek a_seek_directory, const std::string &a_name, const std::string &a_title)
 
virtual ~base_pntuple ()
 
const std::vector< icol * > & columns () const
 
template<class T >
column_ref< T > * find_column_ref (const std::string &a_name)
 
template<class T >
column< T > * find_column (const std::string &a_name)
 
column_string_ref * find_column_string_ref (const std::string &a_name)
 
column_string * find_column_string (const std::string &a_name)
 
template<class T >
std_vector_column_ref< T > * find_column_vector_ref (const std::string &a_name)
 
template<class T >
std_vector_column< T > * find_column_vector (const std::string &a_name)
 
column_vector_string_ref * find_column_vector_string_ref (const std::string &a_name)
 
column_vector_string * find_column_vector_string (const std::string &a_name)
 
void print_columns (std::ostream &a_out)
 
- Public Member Functions inherited from tools::wroot::impi_ntuple
virtual ~impi_ntuple ()
 

Protected Member Functions

 mpi_ntuple_row_wise (const mpi_ntuple_row_wise &a_from)
 
mpi_ntuple_row_wiseoperator= (const mpi_ntuple_row_wise &a_from)
 
bool end_leaves (impi &a_mpi) const
 
- Protected Member Functions inherited from tools::wroot::base_pntuple_row_wise
 base_pntuple_row_wise (const base_pntuple_row_wise &a_from)
 
base_pntuple_row_wiseoperator= (const base_pntuple_row_wise &)
 
- Protected Member Functions inherited from tools::wroot::base_pntuple
 base_pntuple (const base_pntuple &a_from)
 
base_pntupleoperator= (const base_pntuple &)
 

Protected Attributes

uint32 m_id
 
- Protected Attributes inherited from tools::wroot::base_pntuple_row_wise
branch m_row_wise_branch
 
- Protected Attributes inherited from tools::wroot::base_pntuple
std::ostream & m_out
 
seek m_seek_directory
 
std::string m_name
 
std::string m_title
 
std::vector< icol * > m_cols
 

Detailed Description

Definition at line 19 of file mpi_ntuple_row_wise.

Constructor & Destructor Documentation

◆ mpi_ntuple_row_wise() [1/3]

tools::wroot::mpi_ntuple_row_wise::mpi_ntuple_row_wise ( uint32  a_id,
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,
uint32  a_basket_size,
bool  a_verbose 
)
inline

Definition at line 45 of file mpi_ntuple_row_wise.

50  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_name,a_title,a_basket_size,a_verbose)
51  ,m_id(a_id)
52  {}

◆ mpi_ntuple_row_wise() [2/3]

tools::wroot::mpi_ntuple_row_wise::mpi_ntuple_row_wise ( uint32  a_id,
std::ostream &  a_out,
bool  a_byte_swap,
uint32  a_compression,
seek  a_seek_directory,
uint32  a_basket_size,
const ntuple_booking a_bkg,
bool  a_verbose 
)
inline

Definition at line 53 of file mpi_ntuple_row_wise.

57  :parent(a_out,a_byte_swap,a_compression,a_seek_directory,a_basket_size,a_bkg,a_verbose)
58  ,m_id(a_id)
59  {}

◆ ~mpi_ntuple_row_wise()

virtual tools::wroot::mpi_ntuple_row_wise::~mpi_ntuple_row_wise ( )
inlinevirtual

Definition at line 60 of file mpi_ntuple_row_wise.

60 {}

◆ mpi_ntuple_row_wise() [3/3]

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

Definition at line 62 of file mpi_ntuple_row_wise.

62 :impi_ntuple(a_from),parent(a_from){}

Member Function Documentation

◆ add_row()

virtual bool tools::wroot::mpi_ntuple_row_wise::add_row ( impi a_mpi,
int  a_dest,
int  a_tag 
)
inlinevirtual

Implements tools::wroot::impi_ntuple.

Definition at line 22 of file mpi_ntuple_row_wise.

22  {
23  if(m_cols.empty()) return false;
24  tools_vforit(icol*,m_cols,it) (*it)->add();
25  mpi_basket_add _badd(a_mpi,a_dest,a_tag,m_id,0);
26  if(!m_row_wise_branch.pfill(_badd,0)) return false;
27  tools_vforit(icol*,m_cols,it) (*it)->set_def();
28  return true;
29  }

◆ end_fill()

virtual bool tools::wroot::mpi_ntuple_row_wise::end_fill ( impi a_mpi,
int  a_dest,
int  a_tag 
)
inlinevirtual

Implements tools::wroot::impi_ntuple.

Definition at line 31 of file mpi_ntuple_row_wise.

31  {
32  mpi_basket_add _badd(a_mpi,a_dest,a_tag,m_id,0);
33  if(!m_row_wise_branch.end_pfill(_badd)) return false;
34 
35  a_mpi.pack_reset();
36  if(!a_mpi.pack(mpi_protocol_end_fill())) return false;
37  if(!a_mpi.pack(m_id)) return false;
38  if(!end_leaves(a_mpi)) return false;
39  if(!a_mpi.send_buffer(a_dest,a_tag)) return false;
40 
41  return true;
42  }

◆ end_leaves()

bool tools::wroot::mpi_ntuple_row_wise::end_leaves ( impi a_mpi) const
inlineprotected

Definition at line 65 of file mpi_ntuple_row_wise.

65  {
66 
67 #include "MPI_SET_MAX.icc"
68 
69  tools_vforcit(base_leaf*,m_row_wise_branch.leaves(),pit) {
70  base_leaf* _pleaf = *pit;
71 
72  bool set_done = false;
73 
74  TOOLS_WROOT_MPI_NTUPLE_LEAF_SET_LENGTH_MAX(char)
75  TOOLS_WROOT_MPI_NTUPLE_LEAF_SET_LENGTH_MAX(short)
76  TOOLS_WROOT_MPI_NTUPLE_LEAF_SET_LENGTH_MAX(int)
77  TOOLS_WROOT_MPI_NTUPLE_LEAF_SET_LENGTH_MAX(float)
78  TOOLS_WROOT_MPI_NTUPLE_LEAF_SET_LENGTH_MAX(double)
79 
80  TOOLS_WROOT_MPI_NTUPLE_LEAF_STD_VECTOR_SET_LENGTH_MAX(char)
81  TOOLS_WROOT_MPI_NTUPLE_LEAF_STD_VECTOR_SET_LENGTH_MAX(short)
82  TOOLS_WROOT_MPI_NTUPLE_LEAF_STD_VECTOR_SET_LENGTH_MAX(int)
83  TOOLS_WROOT_MPI_NTUPLE_LEAF_STD_VECTOR_SET_LENGTH_MAX(float)
84  TOOLS_WROOT_MPI_NTUPLE_LEAF_STD_VECTOR_SET_LENGTH_MAX(double)
85 
86  TOOLS_WROOT_MPI_NTUPLE_LEAF_STRING_SET_LENGTH_MAX
87 
88  if(!set_done) {
89  m_out << "tools::wroot::mpi_ntuple_column_wise::end_leaves :"
90  << " leaf " << _pleaf->name() << " with cid " << _pleaf->id_cls() << " not treated." << std::endl;
91  return false;
92  }
93  }
94 
95 #undef TOOLS_WROOT_MPI_NTUPLE_SET_MAX
96 #undef TOOLS_WROOT_MPI_NTUPLE_STRING_SET_MAX
97 
98  return true;
99  }

◆ operator=()

mpi_ntuple_row_wise& tools::wroot::mpi_ntuple_row_wise::operator= ( const mpi_ntuple_row_wise a_from)
inlineprotected

Definition at line 63 of file mpi_ntuple_row_wise.

63 {parent::operator=(a_from);return *this;}

Member Data Documentation

◆ m_id

uint32 tools::wroot::mpi_ntuple_row_wise::m_id
protected

Definition at line 101 of file mpi_ntuple_row_wise.


The documentation for this class was generated from the following file:
tools::wroot::base_pntuple_row_wise::operator=
base_pntuple_row_wise & operator=(const base_pntuple_row_wise &)
Definition: base_pntuple_row_wise:156
tools::wroot::base_pntuple::m_out
std::ostream & m_out
Definition: base_pntuple:122
tools::wroot::branch::pfill
bool pfill(iadd_basket &a_badd, uint32 a_nev)
Definition: branch:416
tools::wroot::branch::leaves
const std::vector< base_leaf * > & leaves() const
Definition: branch:243
tools::wroot::mpi_ntuple_row_wise::end_leaves
bool end_leaves(impi &a_mpi) const
Definition: mpi_ntuple_row_wise:65
tools::wroot::branch::end_pfill
bool end_pfill(iadd_basket &a_badd)
Definition: branch:478
MPI_SET_MAX.icc
tools_vforit
#define tools_vforit(a__T, a__v, a__it)
Definition: forit:13
tools::wroot::base_pntuple_row_wise::m_row_wise_branch
branch m_row_wise_branch
Definition: base_pntuple_row_wise:228
tools::wroot::mpi_protocol_end_fill
uint32 mpi_protocol_end_fill()
Definition: mpi_protocol:14
tools::wroot::base_pntuple::m_cols
std::vector< icol * > m_cols
Definition: base_pntuple:126
tools_vforcit
#define tools_vforcit(a__T, a__v, a__it)
Definition: forit:7
tools::wroot::mpi_ntuple_row_wise::m_id
uint32 m_id
Definition: mpi_ntuple_row_wise:101