MINT2
Public Member Functions | List of all members
MINT::EventPtrList< EVENT_TYPE > Class Template Reference

#include <EventPtrList.h>

Inheritance diagram for MINT::EventPtrList< EVENT_TYPE >:
MINT::IMinimalEventList< EVENT_TYPE > MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > >

Public Member Functions

 EventPtrList ()
 
 EventPtrList (const EVENT_TYPE &evt)
 
virtual ~EventPtrList ()
 
virtual counted_ptr< EVENT_TYPE > getPtr (unsigned int i) const
 
virtual EVENT_TYPE getEvent (unsigned int i) const
 
virtual const EVENT_TYPE & getEventRef (unsigned int i) const
 
virtual EVENT_TYPE & getEventRef (unsigned int i)
 
 EventPtrList (const EventPtrList< EVENT_TYPE > &other)
 
EventPtrList< EVENT_TYPE > & operator= (const EventPtrList< EVENT_TYPE > &other)
 
virtual unsigned int size () const
 
virtual MINT::counted_ptr< EVENT_TYPE > popLastEventPtr ()
 
virtual bool Add (const EVENT_TYPE &evt)
 
virtual bool Add (const MINT::counted_ptr< EVENT_TYPE > &evt)
 
virtual bool Add (const EventPtrList< EVENT_TYPE > &otherList)
 
- Public Member Functions inherited from MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const MINT::counted_ptr< EVENT_TYPE > &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< MINT::counted_ptr< EVENT_TYPE > > &other)
 
virtual ~PolymorphVector ()
 
std::vector< MINT::counted_ptr< EVENT_TYPE > > & theVector ()
 
const std::vector< MINT::counted_ptr< EVENT_TYPE > > & theVector () const
 
MINT::counted_ptr< EVENT_TYPE > & operator[] (unsigned int i)
 
const MINT::counted_ptr< EVENT_TYPE > & operator[] (unsigned int i) const
 
MINT::counted_ptr< EVENT_TYPE > & at (unsigned int i)
 
const MINT::counted_ptr< EVENT_TYPE > & at (unsigned int i) const
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator begin ()
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::const_iterator begin () const
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator end ()
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::const_iterator end () const
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator find (const MINT::counted_ptr< EVENT_TYPE > &c)
 
std::vector< MINT::counted_ptr< EVENT_TYPE > >::const_iterator find (const MINT::counted_ptr< EVENT_TYPE > &c) const
 
MINT::counted_ptr< EVENT_TYPE > & front ()
 
const MINT::counted_ptr< EVENT_TYPE > & front () const
 
MINT::counted_ptr< EVENT_TYPE > & back ()
 
const MINT::counted_ptr< EVENT_TYPE > & back () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const MINT::counted_ptr< EVENT_TYPE > &c)
 
void pop_back ()
 
void erase (typename std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator pos)
 
void erase (typename std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator first, typename std::vector< MINT::counted_ptr< EVENT_TYPE > >::iterator last)
 
PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > & operator= (const PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const MINT::counted_ptr< EVENT_TYPE > &c)
 
 operator const typename std::vector< MINT::counted_ptr< EVENT_TYPE > > & () const
 
 operator typename std::vector< MINT::counted_ptr< EVENT_TYPE > > & ()
 
bool operator== (const MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > &v2) const
 
bool operator!= (const MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > &v2) const
 
bool operator< (const MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > &v2) const
 
bool operator> (const MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > > &v2) const
 

Additional Inherited Members

- Protected Member Functions inherited from MINT::IMinimalEventList< EVENT_TYPE >
 IMinimalEventList ()
 
- Protected Attributes inherited from MINT::PolymorphVector< MINT::counted_ptr< EVENT_TYPE > >
std::vector< MINT::counted_ptr< EVENT_TYPE > > _vec
 

Detailed Description

template<typename EVENT_TYPE>
class MINT::EventPtrList< EVENT_TYPE >

Definition at line 26 of file EventPtrList.h.

Constructor & Destructor Documentation

◆ EventPtrList() [1/3]

template<typename EVENT_TYPE>
MINT::EventPtrList< EVENT_TYPE >::EventPtrList ( )
inline

Definition at line 32 of file EventPtrList.h.

33  {
34  }

◆ EventPtrList() [2/3]

template<typename EVENT_TYPE>
MINT::EventPtrList< EVENT_TYPE >::EventPtrList ( const EVENT_TYPE &  evt)
inline

Definition at line 36 of file EventPtrList.h.

37  {
38  Add(evt);
39  }
virtual bool Add(const EVENT_TYPE &evt)
Definition: EventPtrList.h:88

◆ ~EventPtrList()

template<typename EVENT_TYPE>
virtual MINT::EventPtrList< EVENT_TYPE >::~EventPtrList ( )
inlinevirtual

Definition at line 40 of file EventPtrList.h.

40 {}

◆ EventPtrList() [3/3]

template<typename EVENT_TYPE>
MINT::EventPtrList< EVENT_TYPE >::EventPtrList ( const EventPtrList< EVENT_TYPE > &  other)
inline

Definition at line 55 of file EventPtrList.h.

56  : IMinimalEventList<EVENT_TYPE>()
57  , PolymorphVector<MINT::counted_ptr<EVENT_TYPE> >(
59  {
60  }

Member Function Documentation

◆ Add() [1/3]

template<typename EVENT_TYPE>
virtual bool MINT::EventPtrList< EVENT_TYPE >::Add ( const EVENT_TYPE &  evt)
inlinevirtual

Implements MINT::IMinimalEventList< EVENT_TYPE >.

Definition at line 88 of file EventPtrList.h.

88  {
89  counted_ptr<EVENT_TYPE> copy (new EVENT_TYPE (evt));
90  this->push_back(copy);
91  return true;
92  }
void push_back(const MINT::counted_ptr< EVENT_TYPE > &c)

◆ Add() [2/3]

template<typename EVENT_TYPE>
virtual bool MINT::EventPtrList< EVENT_TYPE >::Add ( const MINT::counted_ptr< EVENT_TYPE > &  evt)
inlinevirtual

Definition at line 95 of file EventPtrList.h.

95  {
96  this->push_back(evt);
97  return true;
98  }
void push_back(const MINT::counted_ptr< EVENT_TYPE > &c)

◆ Add() [3/3]

template<typename EVENT_TYPE>
virtual bool MINT::EventPtrList< EVENT_TYPE >::Add ( const EventPtrList< EVENT_TYPE > &  otherList)
inlinevirtual

Definition at line 100 of file EventPtrList.h.

100  {
101  if(otherList.empty()) return false;
102  for(unsigned int i=0; i < otherList.size(); i++){
103  this->push_back(otherList.getPtr(i));
104  }
105  return true;
106  }
void push_back(const MINT::counted_ptr< EVENT_TYPE > &c)

◆ getEvent()

template<typename EVENT_TYPE>
virtual EVENT_TYPE MINT::EventPtrList< EVENT_TYPE >::getEvent ( unsigned int  i) const
inlinevirtual

Implements MINT::IMinimalEventList< EVENT_TYPE >.

Definition at line 46 of file EventPtrList.h.

46  {
47  return *(getPtr(i));
48  }
virtual counted_ptr< EVENT_TYPE > getPtr(unsigned int i) const
Definition: EventPtrList.h:42

◆ getEventRef() [1/2]

template<typename EVENT_TYPE>
virtual const EVENT_TYPE& MINT::EventPtrList< EVENT_TYPE >::getEventRef ( unsigned int  i) const
inlinevirtual

Definition at line 49 of file EventPtrList.h.

49  {
50  return *(getPtr(i));
51  }
virtual counted_ptr< EVENT_TYPE > getPtr(unsigned int i) const
Definition: EventPtrList.h:42

◆ getEventRef() [2/2]

template<typename EVENT_TYPE>
virtual EVENT_TYPE& MINT::EventPtrList< EVENT_TYPE >::getEventRef ( unsigned int  i)
inlinevirtual

Definition at line 52 of file EventPtrList.h.

52  {
53  return *(getPtr(i));
54  }
virtual counted_ptr< EVENT_TYPE > getPtr(unsigned int i) const
Definition: EventPtrList.h:42

◆ getPtr()

template<typename EVENT_TYPE>
virtual counted_ptr<EVENT_TYPE> MINT::EventPtrList< EVENT_TYPE >::getPtr ( unsigned int  i) const
inlinevirtual

Definition at line 42 of file EventPtrList.h.

42  {
43  return this->at(i);
44  }
MINT::counted_ptr< EVENT_TYPE > & at(unsigned int i)

◆ operator=()

template<typename EVENT_TYPE>
EventPtrList<EVENT_TYPE>& MINT::EventPtrList< EVENT_TYPE >::operator= ( const EventPtrList< EVENT_TYPE > &  other)
inline

Definition at line 62 of file EventPtrList.h.

62  {
63  if(this == &other) return *this;
64  this->clear();
65  for(unsigned int i=0; i<other.size(); i++){
66  this->push_back(other.getPtr(i));
67  }
68  /*
69  this->_recordCollection = other._recordCollection;
70  this->_recordCollection.pop_front();
71  this->_recordCollection.push_front((IEventList< RETURN_TYPE >*) this);
72  */
73  return *this;
74  }
void push_back(const MINT::counted_ptr< EVENT_TYPE > &c)

◆ popLastEventPtr()

template<typename EVENT_TYPE>
virtual MINT::counted_ptr<EVENT_TYPE> MINT::EventPtrList< EVENT_TYPE >::popLastEventPtr ( )
inlinevirtual

Definition at line 80 of file EventPtrList.h.

80  {
81  if(this->empty()) return MINT::counted_ptr<EVENT_TYPE>(0);
82  MINT::counted_ptr<EVENT_TYPE> evtPtr(getPtr(this->size()-1));
83  this->resize(this->size() - 1);
84  return evtPtr;
85  }
virtual unsigned int size() const
Definition: EventPtrList.h:76
virtual counted_ptr< EVENT_TYPE > getPtr(unsigned int i) const
Definition: EventPtrList.h:42

◆ size()

template<typename EVENT_TYPE>
virtual unsigned int MINT::EventPtrList< EVENT_TYPE >::size ( ) const
inlinevirtual

Implements MINT::IMinimalEventList< EVENT_TYPE >.

Definition at line 76 of file EventPtrList.h.

76  {
78  }
virtual unsigned int size() const
Definition: EventPtrList.h:76

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