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

Public Member Functions

 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)
 

Protected Member Functions

 base_pntuple (const base_pntuple &a_from)
 
base_pntupleoperator= (const base_pntuple &)
 

Protected Attributes

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 21 of file base_pntuple.

Constructor & Destructor Documentation

◆ base_pntuple() [1/2]

tools::wroot::base_pntuple::base_pntuple ( std::ostream &  a_out,
seek  a_seek_directory,
const std::string &  a_name,
const std::string &  a_title 
)
inline

Definition at line 33 of file base_pntuple.

34  :m_out(a_out)
35  ,m_seek_directory(a_seek_directory)
36  ,m_name(a_name)
37  ,m_title(a_title)
38  {
39 #ifdef TOOLS_MEM
40  mem::increment(s_class().c_str());
41 #endif
42  }

◆ ~base_pntuple()

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

Definition at line 44 of file base_pntuple.

44  {
45  safe_clear<icol>(m_cols);
46 #ifdef TOOLS_MEM
47  mem::decrement(s_class().c_str());
48 #endif
49  }

◆ base_pntuple() [2/2]

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

Definition at line 51 of file base_pntuple.

51  :m_out(a_from.m_out){
52 #ifdef TOOLS_MEM
53  mem::increment(s_class().c_str());
54 #endif
55  }

Member Function Documentation

◆ columns()

const std::vector<icol*>& tools::wroot::base_pntuple::columns ( ) const
inline

Definition at line 58 of file base_pntuple.

58 {return m_cols;}

◆ find_column()

template<class T >
column<T>* tools::wroot::base_pntuple::find_column ( const std::string &  a_name)
inline

Definition at line 68 of file base_pntuple.

68  {
69  icol* col = find_named<icol>(m_cols,a_name);
70  if(!col) return 0;
71  return id_cast<icol, column<T> >(*col);
72  }

◆ find_column_ref()

template<class T >
column_ref<T>* tools::wroot::base_pntuple::find_column_ref ( const std::string &  a_name)
inline

Definition at line 61 of file base_pntuple.

61  {
62  icol* col = find_named<icol>(m_cols,a_name);
63  if(!col) return 0;
64  return id_cast<icol, column_ref<T> >(*col);
65  }

◆ find_column_string()

column_string* tools::wroot::base_pntuple::find_column_string ( const std::string &  a_name)
inline

Definition at line 80 of file base_pntuple.

80  {
81  icol* col = find_named<icol>(m_cols,a_name);
82  if(!col) return 0;
83  return id_cast<icol, column_string >(*col);
84  }

◆ find_column_string_ref()

column_string_ref* tools::wroot::base_pntuple::find_column_string_ref ( const std::string &  a_name)
inline

Definition at line 74 of file base_pntuple.

74  {
75  icol* col = find_named<icol>(m_cols,a_name);
76  if(!col) return 0;
77  return id_cast<icol, column_string_ref >(*col);
78  }

◆ find_column_vector()

template<class T >
std_vector_column<T>* tools::wroot::base_pntuple::find_column_vector ( const std::string &  a_name)
inline

Definition at line 94 of file base_pntuple.

94  {
95  icol* col = find_named<icol>(m_cols,a_name);
96  if(!col) return 0;
97  return id_cast<icol, std_vector_column<T> >(*col);
98  }

◆ find_column_vector_ref()

template<class T >
std_vector_column_ref<T>* tools::wroot::base_pntuple::find_column_vector_ref ( const std::string &  a_name)
inline

Definition at line 87 of file base_pntuple.

87  {
88  icol* col = find_named<icol>(m_cols,a_name);
89  if(!col) return 0;
90  return id_cast<icol, std_vector_column_ref<T> >(*col);
91  }

◆ find_column_vector_string()

column_vector_string* tools::wroot::base_pntuple::find_column_vector_string ( const std::string &  a_name)
inline

Definition at line 106 of file base_pntuple.

106  {
107  icol* col = find_named<icol>(m_cols,a_name);
108  if(!col) return 0;
109  return id_cast<icol, column_vector_string >(*col);
110  }

◆ find_column_vector_string_ref()

column_vector_string_ref* tools::wroot::base_pntuple::find_column_vector_string_ref ( const std::string &  a_name)
inline

Definition at line 100 of file base_pntuple.

100  {
101  icol* col = find_named<icol>(m_cols,a_name);
102  if(!col) return 0;
103  return id_cast<icol, column_vector_string_ref >(*col);
104  }

◆ operator=()

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

Definition at line 56 of file base_pntuple.

56 {return *this;}

◆ print_columns()

void tools::wroot::base_pntuple::print_columns ( std::ostream &  a_out)
inline

Definition at line 112 of file base_pntuple.

112  {
113  a_out << "for ntuple named " << sout(m_name) << ", number of columns " << m_cols.size() << " :" << std::endl;
114  tools_vforit(icol*,m_cols,it) {
115  a_out << " " << (*it)->name() << std::endl;
116  }
117  }

Member Data Documentation

◆ m_cols

std::vector<icol*> tools::wroot::base_pntuple::m_cols
protected

Definition at line 126 of file base_pntuple.

◆ m_name

std::string tools::wroot::base_pntuple::m_name
protected

Definition at line 124 of file base_pntuple.

◆ m_out

std::ostream& tools::wroot::base_pntuple::m_out
protected

Definition at line 122 of file base_pntuple.

◆ m_seek_directory

seek tools::wroot::base_pntuple::m_seek_directory
protected

Definition at line 123 of file base_pntuple.

◆ m_title

std::string tools::wroot::base_pntuple::m_title
protected

Definition at line 125 of file base_pntuple.


The documentation for this class was generated from the following file:
tools::wroot::base_pntuple::m_title
std::string m_title
Definition: base_pntuple:125
tools::wroot::base_pntuple::m_name
std::string m_name
Definition: base_pntuple:124
tools::wroot::base_pntuple::m_out
std::ostream & m_out
Definition: base_pntuple:122
tools_vforit
#define tools_vforit(a__T, a__v, a__it)
Definition: forit:13
tools::wroot::base_pntuple::m_seek_directory
seek m_seek_directory
Definition: base_pntuple:123
tools::wroot::base_pntuple::m_cols
std::vector< icol * > m_cols
Definition: base_pntuple:126