15 #include "StMcMtdHitCollection.hh"
16 #include "StMcMtdHit.hh"
19 static const char rcsid[] =
"$Id: StMcMtdHitCollection.cc,v 2.2 2012/03/01 16:48:29 perev Exp $";
23 StMcMtdHitCollection::StMcMtdHitCollection()
28 StMcMtdHitCollection::~StMcMtdHitCollection()
37 assert(hit &&
"Zero hit pointer added");
42 void StMcMtdHitCollection::Clear(
const char*)
44 for (
int i=0; i<(int)mHits.size(); i++)
46 delete mHits[i]; mHits[i] = 0;
51 void StMcMtdHitCollection::Browse(TBrowser *b)
54 for (
int i=0; i<(int)mHits.size(); i++) {
55 TObject *obj = mHits[i];
if (!obj)
continue;
56 TString ts(obj->GetName()); ts+=
"#"; ts+=i;
57 b->Add(obj,ts.Data());
61 unsigned long StMcMtdHitCollection::numberOfHits()
const
67 const StSPtrVecMcMtdHit& StMcMtdHitCollection::hits()
const {
return mHits; }
70 StSPtrVecMcMtdHit& StMcMtdHitCollection::hits() {
return mHits; }