DigiList< T > Class Template Reference

#include <DigiList.h>

List of all members.

Public Member Functions

 DigiList ()
 DigiList (int n)
 DigiList (const DigiList &dl)
virtual ~DigiList ()
 DigiList (const TObjArray &o)
TObjArray * CreateObjArray (const char *name) const

Detailed Description

template<class T>
class DigiList< T >

Definition at line 14 of file DigiList.h.


Constructor & Destructor Documentation

template<class T>
DigiList< T >::DigiList (  )  [inline]

Definition at line 17 of file DigiList.h.

00017 : std::vector<T>()   { this->reserve(4096);}

template<class T>
DigiList< T >::DigiList ( int  n  )  [inline]

Definition at line 18 of file DigiList.h.

00018 : std::vector<T>(n)  { }

template<class T>
DigiList< T >::DigiList ( const DigiList< T > &  dl  )  [inline]

Definition at line 19 of file DigiList.h.

00019 : std::vector<T>(dl) { }

template<class T>
virtual DigiList< T >::~DigiList (  )  [inline, virtual]

Definition at line 20 of file DigiList.h.

00020 { }

template<class T>
DigiList< T >::DigiList ( const TObjArray &  o  )  [inline]

Definition at line 24 of file DigiList.h.

00024                                {
00025     // Construct list from a TObject array
00026     register int j     = 0;
00027     register int i     = o.LowerBound();
00028     register int iLast = o.GetLast();
00029     this->reserve(o.GetEntries());
00030     for (; i<=iLast; ++i, ++j) {
00031       this->push_back(*dynamic_cast<T*>(o.At(i)));
00032     }
00033   }


Member Function Documentation

template<class T>
TObjArray* DigiList< T >::CreateObjArray ( const char *  name  )  const [inline]

Definition at line 37 of file DigiList.h.

Referenced by RerootFlsDigitToDigiPE::Get(), and main().

00037                                                     {
00038     unsigned int sz = this->size();
00039     TObjArray* o = new TObjArray(sz); // "Create": caller takes ownership
00040     o->SetName(name);
00041     for (register unsigned int i=0; i<sz; ++i) o->AddAt(new T((*this)[i]),i);    
00042     o->SetOwner(true);
00043     return o;
00044   }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1