28 #include "StMcRichHitCollection.hh"
29 #include "StMcRichHit.hh"
31 static const char rcsid[] =
"$Id: StMcRichHitCollection.cc,v 2.3 2012/03/01 16:48:29 perev Exp $";
34 StMcRichHitCollection::StMcRichHitCollection()
39 StMcRichHitCollection::~StMcRichHitCollection()
49 if (!hit)
return false;
55 unsigned long StMcRichHitCollection::numberOfHits()
const
61 const StSPtrVecMcRichHit& StMcRichHitCollection::hits()
const {
return mHits; }
63 StSPtrVecMcRichHit& StMcRichHitCollection::hits() {
return mHits; }
65 void StMcRichHitCollection::Clear(
const char*)
67 for (
int i=0; i<(int)mHits.size(); i++)
69 delete mHits[i]; mHits[i] = 0;
74 void StMcRichHitCollection::Browse(TBrowser *b)
77 for (
int i=0; i<(int)mHits.size(); i++) {
78 TObject *obj = mHits[i];
if (!obj)
continue;
79 TString ts(obj->GetName()); ts+=
"#"; ts+=i;
80 b->Add(obj,ts.Data());