ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
VKalVrtAthena::varHolder< T > Class Template Reference

#include <NtupleVars.h>

Inheritance diagram for VKalVrtAthena::varHolder< T >:
Collaboration diagram for VKalVrtAthena::varHolder< T >:

Public Member Functions

 varHolder ()
 
virtual ~varHolder ()
 
T & get ()
 
void * get_var ()
 
std::string & get_typename ()
 
void clear ()
 
void branch_tree (const std::string &name, TTree *tree)
 

Public Attributes

std::shared_ptr< T > m_var
 

Private Attributes

std::string m_typename
 

Detailed Description

template<class T>
class VKalVrtAthena::varHolder< T >

Definition at line 86 of file NtupleVars.h.

Constructor & Destructor Documentation

◆ varHolder()

template<class T >
VKalVrtAthena::varHolder< T >::varHolder ( )
inline

Definition at line 92 of file NtupleVars.h.

92  : m_var( new T ){
93  int stat(0);
94  char* name = abi::__cxa_demangle(typeid( T ).name(), 0, 0, &stat);
95  m_typename = name;
96  delete name;
97  }

◆ ~varHolder()

template<class T >
virtual VKalVrtAthena::varHolder< T >::~varHolder ( )
inlinevirtual

Definition at line 98 of file NtupleVars.h.

98 {}

Member Function Documentation

◆ branch_tree()

template<class T >
void VKalVrtAthena::varHolder< T >::branch_tree ( const std::string &  name,
TTree *  tree 
)
inlinevirtual

Implements VKalVrtAthena::BaseHolder.

Definition at line 107 of file NtupleVars.h.

107  {
109  //tree->Branch(name.c_str(), m_typename.c_str(), m_var.get() );
110  }

◆ clear()

template<class T >
void VKalVrtAthena::varHolder< T >::clear ( )
inlinevirtual

Implements VKalVrtAthena::BaseHolder.

Definition at line 105 of file NtupleVars.h.

105 { varHolder_detail::clear( this->get() ); }

◆ get()

template<class T >
T& VKalVrtAthena::varHolder< T >::get ( )
inline

Definition at line 99 of file NtupleVars.h.

99 { return (*m_var); }

◆ get_typename()

template<class T >
std::string& VKalVrtAthena::varHolder< T >::get_typename ( )
inlinevirtual

Implements VKalVrtAthena::BaseHolder.

Definition at line 101 of file NtupleVars.h.

101 { return m_typename; }

◆ get_var()

template<class T >
void* VKalVrtAthena::varHolder< T >::get_var ( )
inlinevirtual

Implements VKalVrtAthena::BaseHolder.

Definition at line 100 of file NtupleVars.h.

100 { return (void*)( m_var.get() ); }

Member Data Documentation

◆ m_typename

template<class T >
std::string VKalVrtAthena::varHolder< T >::m_typename
private

Definition at line 88 of file NtupleVars.h.

◆ m_var

template<class T >
std::shared_ptr<T> VKalVrtAthena::varHolder< T >::m_var

Definition at line 90 of file NtupleVars.h.


The documentation for this class was generated from the following file:
VKalVrtAthena::varHolder::m_var
std::shared_ptr< T > m_var
Definition: NtupleVars.h:90
VKalVrtAthena::varHolder::get
T & get()
Definition: NtupleVars.h:99
tree
TChain * tree
Definition: tile_monitor.h:30
VKalVrtAthena::varHolder::m_typename
std::string m_typename
Definition: NtupleVars.h:88
VKalVrtAthena::varHolder_detail::branch_tree
void branch_tree(const std::string &name, const std::string &type_name, TTree *tree, T *var)
Definition: NtupleVars.h:75
beamspotman.stat
stat
Definition: beamspotman.py:266
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48