StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StETofCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StETofCollection.cxx,v 2.1 2018/07/09 14:53:48 ullrich Exp $
4  *
5  * Author: Florian Seck, April 2018
6  ***************************************************************************
7  *
8  * Description: This class collects eTOF objects for persistent
9  * storage in StEvent. All eTOF stuff goes here expect the PiDTraits:
10  * - StETofDigi
11  * - StETofHit
12  * - StETofHeader
13  *
14  ***************************************************************************
15  *
16  * $Log: StETofCollection.cxx,v $
17  * Revision 2.1 2018/07/09 14:53:48 ullrich
18  * Initial Revision.
19  *
20  *
21  ***************************************************************************/
22 #include "StETofCollection.h"
23 
24 
25 StETofCollection::StETofCollection() {
26  mETofHeader = 0;
27 }
28 
29 
30 StETofCollection::~StETofCollection() {
31  if( mETofHeader ) delete mETofHeader;
32 }
33 
34 
35 StETofHeader* StETofCollection::etofHeader() { return mETofHeader; }
36 StSPtrVecETofDigi& StETofCollection::etofDigis() { return mETofDigis; }
37 StSPtrVecETofHit& StETofCollection::etofHits() { return mETofHits; }
38 
39 const StETofHeader* StETofCollection::etofHeader() const { return mETofHeader; }
40 const StSPtrVecETofDigi& StETofCollection::etofDigis() const { return mETofDigis; }
41 const StSPtrVecETofHit& StETofCollection::etofHits() const { return mETofHits; }
42 
43 
44 void
45 StETofCollection::setHeader(StETofHeader* val){
46  mETofHeader = val;
47 }
48 
49 
50 void
51 StETofCollection::addDigi( const StETofDigi* aDigi ) {
52  if ( aDigi ) mETofDigis.push_back( aDigi );
53 }
54 
55 
56 void
57 StETofCollection::addHit( const StETofHit* aHit ) {
58  if ( aHit ) mETofHits.push_back( aHit );
59 }
60 
61 
62 bool StETofCollection::digisPresent() const { return mETofDigis.size(); }
63 bool StETofCollection::hitsPresent() const { return mETofHits.size(); }