00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <memory>
00022
00023 #include "StGlobals.hh"
00024
00025 #include "StMuTofHitCollection.h"
00026
00027 StMuTofHitCollection::StMuTofHitCollection()
00028 { }
00029
00030 StMuTofHitCollection::~StMuTofHitCollection()
00031 {
00032 clear();
00033 }
00034
00035 void
00036 StMuTofHitCollection::clear()
00037 {
00038 int n = mHitVector.size();
00039 for (int i=0;i<n;i++) { delete mHitVector[i];}
00040 mHitVector.clear();
00041 }
00042
00043 bool
00044 StMuTofHitCollection::push_back(StMuTofHit* hit)
00045 {
00046 mHitVector.push_back(hit);
00047 return true;
00048 }
00049
00050 StMuTofHit*
00051 StMuTofHitCollection::front() const
00052 {
00053 return mHitVector.front();
00054 }
00055
00056 StMuTofHit*
00057 StMuTofHitCollection::getHit(size_t index) const
00058 {
00059 return mHitVector[index];
00060 }
00061
00062 StMuTofHit*
00063 StMuTofHitCollection::back() const
00064 {
00065 return mHitVector.back();
00066 }
00067
00068 size_t
00069 StMuTofHitCollection::size() const
00070 {
00071 return mHitVector.size();
00072 }
00073