g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
tools::aida::aida_col_ntu Class Reference

some special column that can't be done with aida_col<T> //// More...

Inheritance diagram for tools::aida::aida_col_ntu:
Inheritance graph
[legend]
Collaboration diagram for tools::aida::aida_col_ntu:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (const std::string &a_class) const
 
virtual base_colcopy () const
 
virtual bool add ()
 
virtual bool reset ()
 
virtual uint64 num_elems () const
 
base_ntuget_entry ()
 
virtual void set_user_variable (void *a_user_var)
 
virtual bool fetch_entry () const
 
virtual base_ntuget_to_fill ()
 
 aida_col_ntu (std::ostream &a_out, const std::string &a_name)
 
virtual ~aida_col_ntu ()
 
 aida_col_ntu (const aida_col_ntu &a_from)
 
aida_col_ntuoperator= (const aida_col_ntu &a_from)
 
- Public Member Functions inherited from tools::aida::base_col
virtual ~base_col ()
 
const std::string & name () const
 
void set_index (uint64 a_index)
 

Static Public Member Functions

static const std::string & s_class ()
 
- Static Public Member Functions inherited from tools::aida::base_col
static const std::string & s_class ()
 

Protected Attributes

std::vector< ntuplem_data
 
ntuple m_tmp
 
ntuplem_user_var
 
- Protected Attributes inherited from tools::aida::base_col
std::ostream & m_out
 
std::string m_name
 
uint64 m_index
 

Additional Inherited Members

- Protected Member Functions inherited from tools::aida::base_col
 base_col (std::ostream &a_out, const std::string &a_name)
 
 base_col (const base_col &a_from)
 
base_coloperator= (const base_col &a_from)
 

Detailed Description

some special column that can't be done with aida_col<T> ////

Definition at line 647 of file aida_ntuple.

Constructor & Destructor Documentation

◆ aida_col_ntu() [1/2]

tools::aida::aida_col_ntu::aida_col_ntu ( std::ostream &  a_out,
const std::string &  a_name 
)
inline

Definition at line 694 of file aida_ntuple.

695  :base_col(a_out,a_name)
696  ,m_tmp(a_out,"tmp")
697  ,m_user_var(0) //not owner
698  {}

◆ ~aida_col_ntu()

virtual tools::aida::aida_col_ntu::~aida_col_ntu ( )
inlinevirtual

Definition at line 700 of file aida_ntuple.

700 {}

◆ aida_col_ntu() [2/2]

tools::aida::aida_col_ntu::aida_col_ntu ( const aida_col_ntu a_from)
inline

Definition at line 702 of file aida_ntuple.

703  :base_col(a_from)
704  ,m_data(a_from.m_data)
705 
706  ,m_tmp(a_from.m_tmp)
707  ,m_user_var(a_from.m_user_var)
708  {}

Member Function Documentation

◆ add()

virtual bool tools::aida::aida_col_ntu::add ( )
inlinevirtual

Implements tools::aida::base_col.

Definition at line 659 of file aida_ntuple.

659 {m_data.push_back(m_tmp);m_tmp.reset();return true;}

◆ cast()

virtual void* tools::aida::aida_col_ntu::cast ( const std::string &  a_class) const
inlinevirtual

Reimplemented from tools::aida::base_col.

Definition at line 653 of file aida_ntuple.

653  {
654  if(void* p = cmp_cast<aida_col_ntu>(this,a_class)) {return p;}
655  return base_col::cast(a_class);
656  }

◆ copy()

virtual base_col* tools::aida::aida_col_ntu::copy ( ) const
inlinevirtual

Implements tools::aida::base_col.

Definition at line 658 of file aida_ntuple.

658 {return new aida_col_ntu(*this);}

◆ fetch_entry()

virtual bool tools::aida::aida_col_ntu::fetch_entry ( ) const
inlinevirtual

Implements tools::aida::base_col.

Definition at line 677 of file aida_ntuple.

677  {
678  if(m_index>=m_data.size()) {
679  m_out << s_class() << "::fetch_entry :"
680  << " bad index " << m_index
681  << ". Vec size is " << m_data.size() << "."
682  << "."
683  << std::endl;
684  if(m_user_var) *m_user_var = ntuple(m_out,"");
685  return false;
686  }
687  typedef std::vector<ntuple>::size_type sz_t;
688  if(m_user_var) *m_user_var = m_data[sz_t(m_index)];
689  return true;
690  }

◆ get_entry()

base_ntu* tools::aida::aida_col_ntu::get_entry ( )
inline

Definition at line 663 of file aida_ntuple.

663  {
664  if(m_index>=m_data.size()) {
665  m_out << s_class() << "::get_entry :"
666  << " bad index " << m_index
667  << ". Vec size is " << m_data.size() << "."
668  << "."
669  << std::endl;
670  return 0;
671  }
672  typedef std::vector<ntuple>::size_type sz_t;
673  return &(m_data[sz_t(m_index)]);
674  }

◆ get_to_fill()

virtual base_ntu* tools::aida::aida_col_ntu::get_to_fill ( )
inlinevirtual

Definition at line 692 of file aida_ntuple.

692 {return &m_tmp;}

◆ num_elems()

virtual uint64 tools::aida::aida_col_ntu::num_elems ( ) const
inlinevirtual

Implements tools::aida::base_col.

Definition at line 661 of file aida_ntuple.

661 {return m_data.size();}

◆ operator=()

aida_col_ntu& tools::aida::aida_col_ntu::operator= ( const aida_col_ntu a_from)
inline

Definition at line 709 of file aida_ntuple.

709  {
710  base_col::operator=(a_from);
711  if(&a_from==this) return *this;
712  m_data = a_from.m_data;
713 
714  m_tmp = a_from.m_tmp;
715  m_user_var = a_from.m_user_var;
716  return *this;
717  }

◆ reset()

virtual bool tools::aida::aida_col_ntu::reset ( )
inlinevirtual

Implements tools::aida::base_col.

Definition at line 660 of file aida_ntuple.

660 {m_data.clear();m_index = 0;return true;}

◆ s_class()

static const std::string& tools::aida::aida_col_ntu::s_class ( )
inlinestatic

Definition at line 649 of file aida_ntuple.

649  {
650  static const std::string s_v("tools::aida::aida_col_ntu");
651  return s_v;
652  }

◆ set_user_variable()

virtual void tools::aida::aida_col_ntu::set_user_variable ( void *  a_user_var)
inlinevirtual

Implements tools::aida::base_col.

Definition at line 676 of file aida_ntuple.

676 {m_user_var = (ntuple*)a_user_var;} //not owner.

Member Data Documentation

◆ m_data

std::vector<ntuple> tools::aida::aida_col_ntu::m_data
protected

Definition at line 719 of file aida_ntuple.

◆ m_tmp

ntuple tools::aida::aida_col_ntu::m_tmp
protected

Definition at line 720 of file aida_ntuple.

◆ m_user_var

ntuple* tools::aida::aida_col_ntu::m_user_var
protected

Definition at line 721 of file aida_ntuple.


The documentation for this class was generated from the following file:
tools::aida::aida_col_ntu::m_user_var
ntuple * m_user_var
Definition: aida_ntuple:721
tools::aida::aida_col_ntu::s_class
static const std::string & s_class()
Definition: aida_ntuple:649
tools::aida::aida_col_ntu::m_tmp
ntuple m_tmp
Definition: aida_ntuple:720
tools::aida::base_col::base_col
base_col(std::ostream &a_out, const std::string &a_name)
Definition: aida_ntuple:48
tools::aida::base_col::m_out
std::ostream & m_out
Definition: aida_ntuple:80
tools::aida::base_ntu::reset
bool reset()
Definition: aida_ntuple:183
tools::aida::aida_col_ntu::aida_col_ntu
aida_col_ntu(std::ostream &a_out, const std::string &a_name)
Definition: aida_ntuple:694
tools::aida::base_col::cast
virtual void * cast(const std::string &a_class) const
Definition: aida_ntuple:35
tools::aida::aida_col_ntu::m_data
std::vector< ntuple > m_data
Definition: aida_ntuple:719
tools::aida::base_col::m_index
uint64 m_index
Definition: aida_ntuple:82
tools::aida::base_col::operator=
base_col & operator=(const base_col &a_from)
Definition: aida_ntuple:70