00001 /*************************************************************************** 00002 * 00003 * $Id: StRnDHitCollection.cxx,v 2.1 2006/01/19 21:42:06 ullrich Exp $ 00004 * 00005 * Author: Thomas Ullrich, Jan 2006 00006 *************************************************************************** 00007 * 00008 * Description: 00009 * 00010 *************************************************************************** 00011 * 00012 * $Log: StRnDHitCollection.cxx,v $ 00013 * Revision 2.1 2006/01/19 21:42:06 ullrich 00014 * Initial Revision. 00015 * 00016 **************************************************************************/ 00017 #include "StRnDHitCollection.h" 00018 #include "StRnDHit.h" 00019 00020 ClassImp(StRnDHitCollection) 00021 00022 StRnDHitCollection::StRnDHitCollection() { /* noop */ } 00023 00024 StRnDHitCollection::~StRnDHitCollection() 00025 { 00026 // 00027 // Usually this wouldn't be necessary but mHits 00028 // is a polymorphic container and StRnDHit 00029 // provides its own new/delete operator. 00030 // 00031 for (unsigned int i=0; i<mHits.size(); i++) { 00032 delete mHits[i]; 00033 mHits[i] = 0; 00034 } 00035 } 00036 00037 bool 00038 StRnDHitCollection::addHit(StRnDHit* hit) 00039 { 00040 if (hit) { 00041 mHits.push_back(hit); 00042 return true; 00043 } 00044 else 00045 return false; 00046 } 00047
1.5.9