g4tools  5.4.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tools::waxml::ntuple::std_vector_column< T > Class Template Reference
Inheritance diagram for tools::waxml::ntuple::std_vector_column< T >:
Inheritance graph
[legend]
Collaboration diagram for tools::waxml::ntuple::std_vector_column< T >:
Collaboration graph
[legend]

Public Member Functions

virtual void * cast (cid a_class) const
 
virtual cid id_cls () const
 
virtual const std::string & name () const
 
virtual const std::string & aida_type () const
 
virtual const std::string & s_def () const
 
virtual void s_value (std::string &a_s) const
 
 std_vector_column (const std::string &a_name, std::vector< T > &a_user_vec, const std::string &a_spaces)
 
virtual ~std_vector_column ()
 
- Public Member Functions inherited from tools::waxml::ntuple::leaf
 leaf ()
 
virtual ~leaf ()
 
 leaf (const leaf &a_from)
 
leafoperator= (const leaf &)
 
- Public Member Functions inherited from tools::waxml::ntuple::iobj
virtual ~iobj ()
 

Static Public Member Functions

static cid id_class ()
 
- Static Public Member Functions inherited from tools::waxml::ntuple::leaf
static cid id_class ()
 

Protected Member Functions

 std_vector_column (const std_vector_column &a_from)
 
std_vector_columnoperator= (const std_vector_column &a_from)
 

Protected Attributes

std::string m_name
 
std::string m_def
 
std::vector< T > & m_user_vec
 
std::string m_spaces
 

Detailed Description

template<class T>
class tools::waxml::ntuple::std_vector_column< T >

Definition at line 210 of file ntuple.

Constructor & Destructor Documentation

◆ std_vector_column() [1/2]

template<class T >
tools::waxml::ntuple::std_vector_column< T >::std_vector_column ( const std::string &  a_name,
std::vector< T > &  a_user_vec,
const std::string &  a_spaces 
)
inline

Definition at line 235 of file ntuple.

236  :m_name(a_name)
237  ,m_user_vec(a_user_vec)
238  ,m_spaces(a_spaces)
239  {}

◆ ~std_vector_column()

template<class T >
virtual tools::waxml::ntuple::std_vector_column< T >::~std_vector_column ( )
inlinevirtual

Definition at line 240 of file ntuple.

240 {}

◆ std_vector_column() [2/2]

template<class T >
tools::waxml::ntuple::std_vector_column< T >::std_vector_column ( const std_vector_column< T > &  a_from)
inlineprotected

Definition at line 242 of file ntuple.

243  :leaf(a_from)
244  ,m_name(a_from.m_name)
245  ,m_user_vec(a_from.m_user_vec)
246  ,m_spaces(a_from.m_spaces)
247  {}

Member Function Documentation

◆ aida_type()

template<class T >
virtual const std::string& tools::waxml::ntuple::std_vector_column< T >::aida_type ( ) const
inlinevirtual

Implements tools::waxml::ntuple::iobj.

Definition at line 221 of file ntuple.

221 {return s_aida_type(T());}

◆ cast()

template<class T >
virtual void* tools::waxml::ntuple::std_vector_column< T >::cast ( cid  a_class) const
inlinevirtual

Reimplemented from tools::waxml::ntuple::leaf.

Definition at line 214 of file ntuple.

214  {
215  if(void* p = cmp_cast<std_vector_column>(this,a_class)) {return p;}
216  return leaf::cast(a_class);
217  }

◆ id_class()

template<class T >
static cid tools::waxml::ntuple::std_vector_column< T >::id_class ( )
inlinestatic

Definition at line 212 of file ntuple.

212 {return 200+_cid_std_vector<T>();}

◆ id_cls()

template<class T >
virtual cid tools::waxml::ntuple::std_vector_column< T >::id_cls ( ) const
inlinevirtual

Reimplemented from tools::waxml::ntuple::leaf.

Definition at line 218 of file ntuple.

218 {return id_class();}

◆ name()

template<class T >
virtual const std::string& tools::waxml::ntuple::std_vector_column< T >::name ( ) const
inlinevirtual

Implements tools::waxml::ntuple::iobj.

Definition at line 220 of file ntuple.

220 {return m_name;}

◆ operator=()

template<class T >
std_vector_column& tools::waxml::ntuple::std_vector_column< T >::operator= ( const std_vector_column< T > &  a_from)
inlineprotected

Definition at line 248 of file ntuple.

248  {
249  m_name = a_from.m_name;
250  m_spaces = a_from.m_spaces;
251  return *this;
252  }

◆ s_def()

template<class T >
virtual const std::string& tools::waxml::ntuple::std_vector_column< T >::s_def ( ) const
inlinevirtual

Implements tools::waxml::ntuple::leaf.

Definition at line 223 of file ntuple.

223 {return m_def;} //not used.

◆ s_value()

template<class T >
virtual void tools::waxml::ntuple::std_vector_column< T >::s_value ( std::string &  a_s) const
inlinevirtual

Implements tools::waxml::ntuple::leaf.

Definition at line 224 of file ntuple.

224  {
225  std::ostringstream sout;
226  sout << m_spaces << "<entryITuple>" << std::endl;
227  typedef typename std::vector<T>::const_iterator it_t;
228  for(it_t it=m_user_vec.begin();it!=m_user_vec.end();++it) {
229  sout << m_spaces << " <row><entry" << " value=\"" << tos(*it) << "\"/></row>" << std::endl;
230  }
231  sout << m_spaces << "</entryITuple>" << std::endl;
232  a_s = sout.str();
233  }

Member Data Documentation

◆ m_def

template<class T >
std::string tools::waxml::ntuple::std_vector_column< T >::m_def
protected

Definition at line 255 of file ntuple.

◆ m_name

template<class T >
std::string tools::waxml::ntuple::std_vector_column< T >::m_name
protected

Definition at line 254 of file ntuple.

◆ m_spaces

template<class T >
std::string tools::waxml::ntuple::std_vector_column< T >::m_spaces
protected

Definition at line 257 of file ntuple.

◆ m_user_vec

template<class T >
std::vector<T>& tools::waxml::ntuple::std_vector_column< T >::m_user_vec
protected

Definition at line 256 of file ntuple.


The documentation for this class was generated from the following file:
tools::waxml::ntuple::leaf::cast
virtual void * cast(cid a_class) const
Definition: ntuple:46
tools::waxml::ntuple::s_aida_type
static const std::string & s_aida_type(int)
Definition: ntuple:61
tools::tos
bool tos(const rotf &a_v, std::string &a_s)
Definition: rotf:68
tools::waxml::ntuple::leaf::leaf
leaf()
Definition: ntuple:55
tools::waxml::ntuple::std_vector_column::id_class
static cid id_class()
Definition: ntuple:212
tools::waxml::ntuple::std_vector_column::m_name
std::string m_name
Definition: ntuple:254
tools::waxml::ntuple::std_vector_column::m_spaces
std::string m_spaces
Definition: ntuple:257
tools::waxml::ntuple::std_vector_column::m_user_vec
std::vector< T > & m_user_vec
Definition: ntuple:256
tools::waxml::ntuple::std_vector_column::m_def
std::string m_def
Definition: ntuple:255