18 #include "StMcTofHitCollection.hh"
19 #include "StMcTofHit.hh"
21 static const char rcsid[] =
"$Id: StMcTofHitCollection.cc,v 2.3 2012/03/01 16:48:29 perev Exp $";
25 StMcTofHitCollection::StMcTofHitCollection()
30 StMcTofHitCollection::~StMcTofHitCollection()
34 for (
unsigned int i=0; i<mHits.size(); i++) {
43 if (!hit)
return false;
49 unsigned long StMcTofHitCollection::numberOfHits()
const
55 const StSPtrVecMcTofHit& StMcTofHitCollection::hits()
const {
return mHits; }
58 StSPtrVecMcTofHit& StMcTofHitCollection::hits() {
return mHits; }
60 void StMcTofHitCollection::Clear(
const char*)
62 for (
int i=0; i<(int)mHits.size(); i++)
64 delete mHits[i]; mHits[i] = 0;
69 void StMcTofHitCollection::Browse(TBrowser *b)
72 for (
int i=0; i<(int)mHits.size(); i++) {
73 TObject *obj = mHits[i];
if (!obj)
continue;
74 TString ts(obj->GetName()); ts+=
"#"; ts+=i;
75 b->Add(obj,ts.Data());