All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ana::SpectrumLoaderBase::_VarOrMultiVar< T > Class Template Reference

#include <SpectrumLoaderBase.h>

Public Member Functions

 _VarOrMultiVar (const _Var< T > &v)
 
 _VarOrMultiVar (const _MultiVar< T > &v)
 
 ~_VarOrMultiVar ()
 
 _VarOrMultiVar (const _VarOrMultiVar &v)
 
 _VarOrMultiVar (_VarOrMultiVar &&v)
 
bool IsMulti () const
 
const _Var< T > & GetVar () const
 
const _MultiVar< T > & GetMultiVar () const
 
int ID () const
 

Protected Attributes

const _Var< T > * fVar
 
const _MultiVar< T > * fMultiVar
 

Detailed Description

template<class T>
class ana::SpectrumLoaderBase::_VarOrMultiVar< T >

Definition at line 176 of file SpectrumLoaderBase.h.

Constructor & Destructor Documentation

template<class T >
ana::SpectrumLoaderBase::_VarOrMultiVar< T >::_VarOrMultiVar ( const _Var< T > &  v)
inline

Definition at line 180 of file SpectrumLoaderBase.h.

180 : fVar(new _Var<T>(v)), fMultiVar(0) {}
template<class T >
ana::SpectrumLoaderBase::_VarOrMultiVar< T >::_VarOrMultiVar ( const _MultiVar< T > &  v)
inline

Definition at line 181 of file SpectrumLoaderBase.h.

181 : fVar(0), fMultiVar(new _MultiVar<T>(v)) {}
template<class T >
ana::SpectrumLoaderBase::_VarOrMultiVar< T >::~_VarOrMultiVar ( )
inline

Definition at line 182 of file SpectrumLoaderBase.h.

182 {delete fVar; delete fMultiVar;}
template<class T >
ana::SpectrumLoaderBase::_VarOrMultiVar< T >::_VarOrMultiVar ( const _VarOrMultiVar< T > &  v)
inline

Definition at line 184 of file SpectrumLoaderBase.h.

185  : fVar(v.fVar ? new _Var<T>(*v.fVar) : 0),
186  fMultiVar(v.fMultiVar ? new _MultiVar<T>(*v.fMultiVar) : 0)
187  {
188  }
template<class T >
ana::SpectrumLoaderBase::_VarOrMultiVar< T >::_VarOrMultiVar ( _VarOrMultiVar< T > &&  v)
inline

Definition at line 190 of file SpectrumLoaderBase.h.

191  {
192  fVar = v.fVar;
193  fMultiVar = v.fMultiVar;
194  v.fVar = 0;
195  v.fMultiVar = 0;
196  }

Member Function Documentation

template<class T >
const _MultiVar<T>& ana::SpectrumLoaderBase::_VarOrMultiVar< T >::GetMultiVar ( ) const
inline

Definition at line 200 of file SpectrumLoaderBase.h.

200 {assert(fMultiVar); return *fMultiVar;}
template<class T >
const _Var<T>& ana::SpectrumLoaderBase::_VarOrMultiVar< T >::GetVar ( ) const
inline

Definition at line 199 of file SpectrumLoaderBase.h.

199 {assert(fVar); return *fVar;}
template<class T >
int ana::SpectrumLoaderBase::_VarOrMultiVar< T >::ID ( ) const
inline

Definition at line 202 of file SpectrumLoaderBase.h.

202 {return fVar ? fVar->ID() : fMultiVar->ID();}
template<class T >
bool ana::SpectrumLoaderBase::_VarOrMultiVar< T >::IsMulti ( ) const
inline

Definition at line 198 of file SpectrumLoaderBase.h.

198 {return fMultiVar;}

Member Data Documentation

template<class T >
const _MultiVar<T>* ana::SpectrumLoaderBase::_VarOrMultiVar< T >::fMultiVar
protected

Definition at line 206 of file SpectrumLoaderBase.h.

template<class T >
const _Var<T>* ana::SpectrumLoaderBase::_VarOrMultiVar< T >::fVar
protected

Definition at line 205 of file SpectrumLoaderBase.h.


The documentation for this class was generated from the following file: