00001
00002
00003
00004
00005
00006
00007 #ifndef ATLFAST_TRANSPORTEDPARTICLECOLLECTION_H
00008 #define ATLFAST_TRANSPORTEDPARTICLECOLLECTION_H
00009
00010 #ifndef STD_VECTOR_H
00011 #include <vector>
00012 #define STD_VECTOR_H
00013 #endif
00014
00015 #ifndef ATLFAST_TRANSPORTEDPARTICLE_H
00016 #include "AtlfastCode/TransportedParticle.h"
00017 #endif
00018
00019 namespace Atlfast {
00020
00021 class TransportedParticleCollection {
00022 public:
00023 TransportedParticleCollection(){}
00024 ~TransportedParticleCollection(){
00025 std::vector<const TransportedParticle*>::iterator itr = m_vector.begin();
00026 for (; itr != m_vector.end(); ++itr) delete (*itr);
00027 }
00028 void push_back(TransportedParticle* part){
00029 m_vector.push_back(part);
00030 }
00031 std::vector<const TransportedParticle*>::iterator begin(){
00032 return m_vector.begin();
00033 }
00034 std::vector<const TransportedParticle*>::iterator end(){
00035 return m_vector.end();
00036 }
00037 std::vector<const TransportedParticle*>::const_iterator begin() const{
00038 return m_vector.begin();
00039 }
00040 std::vector<const TransportedParticle*>::const_iterator end() const{
00041 return m_vector.end();
00042 }
00043
00044 private:
00045 std::vector<const TransportedParticle*> m_vector;
00046 };
00047
00048 typedef
00049
00050 std::vector<const TransportedParticle*>::const_iterator
00051 TransportedParticleCollectionCIter ;
00052 typedef
00053
00054 std::vector<const TransportedParticle*>::iterator
00055 TransportedParticleCollectionIter ;
00056 }
00057
00058 #endif
00059
00060
00061
00062
00063