19 #include "StMcCtbHitCollection.hh"
20 #include "StMcCtbHit.hh"
22 static const char rcsid[] =
"$Id: StMcCtbHitCollection.cc,v 2.3 2012/03/01 16:48:29 perev Exp $";
30 StMcCtbHitCollection::~StMcCtbHitCollection()
39 StMcCtbHitCollection::numberOfHits()
const
45 const StSPtrVecMcCtbHit&
46 StMcCtbHitCollection::hits()
const {
return mHits; }
49 StSPtrVecMcCtbHit& StMcCtbHitCollection::hits() {
return mHits; }
53 assert(hit &&
"Zero hit pointer added");
58 void StMcCtbHitCollection::Clear(
const char*)
60 for (
int i=0; i<(int)mHits.size(); i++)
62 delete mHits[i]; mHits[i] = 0;
67 void StMcCtbHitCollection::Browse(TBrowser *b)
70 for (
int i=0; i<(int)mHits.size(); i++) {
71 TObject *obj = mHits[i];
if (!obj)
continue;
72 TString ts(obj->GetName()); ts+=
"#"; ts+=i;
73 b->Add(obj,ts.Data());