QwAnalysis
VQwTrackingElementContainer< T > Class Template Reference

#include <VQwTrackingElement.h>

Inherits std::vector< T >.

Public Member Functions

 VQwTrackingElementContainer ()
 Constructor. More...
 
T * CreateNew ()
 Create a new tree line. More...
 
void Add (T *element)
 Add an existing element as a copy. More...
 
void AddList (T *list)
 Add a list of existing tree lines as a copy. More...
 
void Clear (Option_t *option="")
 Clear the list of tree lines. More...
 
void Reset (Option_t *option="")
 Reset the list of tree lines. More...
 
void Print (Option_t *option="") const
 Print the list of tree lines. More...
 
Int_t GetNumberOfElements () const
 Get the number of tree lines. More...
 

Private Attributes

std::vector< T * > fList
 Array of pointers to elements. More...
 

Additional Inherited Members

- Data Fields inherited from std::vector< T >
elements
 STL member. More...
 

Detailed Description

template<class T>
class VQwTrackingElementContainer< T >

Definition at line 159 of file VQwTrackingElement.h.

Constructor & Destructor Documentation

template<class T >
VQwTrackingElementContainer< T >::VQwTrackingElementContainer ( )
inline

Constructor.

Definition at line 164 of file VQwTrackingElement.h.

164 { }

Member Function Documentation

template<class T >
void VQwTrackingElementContainer< T >::Add ( T *  element)
inline

Add an existing element as a copy.

Definition at line 174 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::fList, and Qw::T.

Referenced by VQwTrackingElementContainer< T >::AddList(), and VQwTrackingElementContainer< T >::CreateNew().

174  {
175  fList.push_back(new T(element));
176  }
std::vector< T * > fList
Array of pointers to elements.
static const double T
Magnetic field: base unit is T.
Definition: QwUnits.h:111

+ Here is the caller graph for this function:

template<class T >
void VQwTrackingElementContainer< T >::AddList ( T *  list)
inline

Add a list of existing tree lines as a copy.

Definition at line 179 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::Add(), and Qw::T.

179  {
180  for (T *element = list; element; element = element->next)
181  Add(element);
182  }
void Add(T *element)
Add an existing element as a copy.
static const double T
Magnetic field: base unit is T.
Definition: QwUnits.h:111

+ Here is the call graph for this function:

template<class T >
void VQwTrackingElementContainer< T >::Clear ( Option_t *  option = "")
inline

Clear the list of tree lines.

Definition at line 185 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::fList.

Referenced by VQwTrackingElementContainer< T >::Reset().

185  {
186  for (typename std::vector<T*>::iterator element = fList.begin();
187  element != fList.end(); element++)
188  delete *element;
189  fList.clear();
190  }
std::vector< T * > fList
Array of pointers to elements.

+ Here is the caller graph for this function:

template<class T >
T* VQwTrackingElementContainer< T >::CreateNew ( )
inline

Create a new tree line.

Definition at line 167 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::Add(), and Qw::T.

167  {
168  T* element = new T();
169  Add(element);
170  return element;
171  }
void Add(T *element)
Add an existing element as a copy.
static const double T
Magnetic field: base unit is T.
Definition: QwUnits.h:111

+ Here is the call graph for this function:

template<class T >
Int_t VQwTrackingElementContainer< T >::GetNumberOfElements ( ) const
inline

Get the number of tree lines.

Definition at line 205 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::fList.

205  {
206  return fList.size();
207  };
std::vector< T * > fList
Array of pointers to elements.
template<class T >
void VQwTrackingElementContainer< T >::Print ( Option_t *  option = "") const
inline

Print the list of tree lines.

Definition at line 198 of file VQwTrackingElement.h.

References QwLog::endl(), VQwTrackingElementContainer< T >::fList, and QwMessage.

198  {
199  for (typename std::vector<T*>::const_iterator element = fList.begin();
200  element != fList.end(); element++)
201  QwMessage << **element << QwLog::endl;
202  }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
std::vector< T * > fList
Array of pointers to elements.
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299

+ Here is the call graph for this function:

template<class T >
void VQwTrackingElementContainer< T >::Reset ( Option_t *  option = "")
inline

Reset the list of tree lines.

Definition at line 193 of file VQwTrackingElement.h.

References VQwTrackingElementContainer< T >::Clear().

193  {
194  Clear(option);
195  }
void Clear(Option_t *option="")
Clear the list of tree lines.

+ Here is the call graph for this function:

Field Documentation


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