StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StBTofCollection.cxx,v 2.1 2008/12/22 20:30:53 ullrich Exp $
4  *
5  * Author: Xin Dong, Nov 2008
6  ***************************************************************************
7  *
8  * Description:
9  *
10  * Persistent data which is written into StEvent
11  * directly from the reco chain. All Barrel ToF stuff goes here
12  * except the StBTofPidTraits.
13  *
14  ***************************************************************************
15  *
16  * $Log: StBTofCollection.cxx,v $
17  * Revision 2.1 2008/12/22 20:30:53 ullrich
18  * Initial Revision.
19  *
20  *
21  **************************************************************************/
22 #include "StBTofCollection.h"
23 
24 static const char rcsid[] = "$Id: StBTofCollection.cxx,v 2.1 2008/12/22 20:30:53 ullrich Exp $";
25 
26 ClassImp(StBTofCollection)
27 
29 {
30  mBTofHeader = 0;
31 }
32 
33 StBTofCollection::~StBTofCollection()
34 {
35  if(mBTofHeader) delete mBTofHeader;
36 }
37 
39 StBTofCollection::tofHeader() { return mBTofHeader; }
40 
41 const StBTofHeader*
42 StBTofCollection::tofHeader() const { return mBTofHeader; }
43 
44 const StSPtrVecBTofHit&
45 StBTofCollection::tofHits() const { return mBTofHits; }
46 
47 StSPtrVecBTofHit&
48 StBTofCollection::tofHits() { return mBTofHits; }
49 
50 const StSPtrVecBTofRawHit&
51 StBTofCollection::tofRawHits() const { return mBTofRawHits; }
52 
53 StSPtrVecBTofRawHit&
54 StBTofCollection::tofRawHits() { return mBTofRawHits; }
55 
56 void
57 StBTofCollection::setHeader(StBTofHeader* val) { mBTofHeader = val; }
58 
59 void
60 StBTofCollection::addHit(const StBTofHit* aHit)
61 {
62  if (aHit) mBTofHits.push_back(aHit);
63 }
64 
65 void
66 StBTofCollection::addRawHit(const StBTofRawHit* aRawHit)
67 {
68  if (aRawHit) mBTofRawHits.push_back(aRawHit);
69 }
70 
71 bool
72 StBTofCollection::hitsPresent() const { return mBTofHits.size(); }
73 
74 bool
75 StBTofCollection::rawHitsPresent() const { return mBTofRawHits.size(); }