17 #include "StMcBTofHitCollection.hh"
18 #include "StMcBTofHit.hh"
21 static const char rcsid[] =
"$Id: StMcBTofHitCollection.cc,v 2.3 2012/03/01 16:48:29 perev Exp $";
26 StMcBTofHitCollection::StMcBTofHitCollection()
31 StMcBTofHitCollection::~StMcBTofHitCollection()
41 assert(hit &&
"Zero hit pointer added");
47 unsigned long StMcBTofHitCollection::numberOfHits()
const
53 const StSPtrVecMcBTofHit& StMcBTofHitCollection::hits()
const {
return mHits; }
56 StSPtrVecMcBTofHit& StMcBTofHitCollection::hits() {
return mHits; }
58 void StMcBTofHitCollection::Clear(
const char*)
60 for (
int i=0; i<(int)mHits.size(); i++)
62 delete mHits[i]; mHits[i] = 0;
67 void StMcBTofHitCollection::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());