StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMwcTriggerDetector.cxx
1 /***************************************************************************
2  *
3  * $Id: StMwcTriggerDetector.cxx,v 2.8 2018/03/15 22:00:50 smirnovd Exp $
4  *
5  * Author: Thomas Ullrich, Sep 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StMwcTriggerDetector.cxx,v $
13  * Revision 2.8 2018/03/15 22:00:50 smirnovd
14  * Revert removal of StMwcTriggerDetector constructor
15  *
16  * This constructor was removed by Yuri on 2009-11-23 leaving the declaration
17  * behind in the corresponding header file. However, this constructor is used in
18  * existing StTriggerDetectorCollection()
19  *
20  * Revision 2.7 2009/11/23 16:34:06 fisyak
21  * Cleanup, remove dependence on dst tables, clean up software monitors
22  *
23  * Revision 2.6 2007/07/11 23:06:45 perev
24  * Cleanup+fix StXXXTriggerDetector
25  *
26  * Revision 2.5 2001/04/05 04:00:51 ullrich
27  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
28  *
29  * Revision 2.4 2000/05/09 10:22:25 ullrich
30  * Updated to cope with modified dst_TrgDet.idl
31  *
32  * Revision 2.3 1999/12/21 15:09:04 ullrich
33  * Modified to cope with new compiler version on Sun (CC5.0).
34  *
35  * Revision 2.2 1999/10/28 22:26:07 ullrich
36  * Adapted new StArray version. First version to compile on Linux and Sun.
37  *
38  * Revision 2.1 1999/10/13 19:44:58 ullrich
39  * Initial Revision
40  *
41  **************************************************************************/
42 #include "StMwcTriggerDetector.h"
43 #include "tables/St_dst_TrgDet_Table.h"
44 
45 static const char rcsid[] = "$Id: StMwcTriggerDetector.cxx,v 2.8 2018/03/15 22:00:50 smirnovd Exp $";
46 
47 ClassImp(StMwcTriggerDetector)
48 
50 {
51  memset(mBeg,0,mEnd-mBeg);
52 }
53 
54 StMwcTriggerDetector::StMwcTriggerDetector(const dst_TrgDet_st& t)
55 {
56  memset(mBeg,0,mEnd-mBeg);
57  int i, j, k;
58  for(i=0; i<mMaxSectors; i++)
59  for(j=0; j<mMaxSubSectors; j++)
60  for(k=0; k<mMaxEventSamples; k++)
61  mMips[i][j][k] = t.nMwc[i][j][k];
62 
63  for(i=0; i<mMaxAux; i++)
64  for(j=0; j<mMaxEventSamples; j++)
65  mAux[i][j] = t.mwcaux[i][j];
66 
67  mNumberOfPreSamples = t.npre;
68  mNumberOfPostSamples = t.npost;
69 }
70 
71 StMwcTriggerDetector::~StMwcTriggerDetector() {/* noop */}
72 
73 unsigned int
74 StMwcTriggerDetector::numberOfSectors() const {return mMaxSectors;}
75 
76 unsigned int
77 StMwcTriggerDetector::numberOfSubSectors() const {return mMaxSubSectors;}
78 
79 unsigned int
80 StMwcTriggerDetector::numberOfPreSamples() const {return mNumberOfPreSamples;}
81 
82 unsigned int
83 StMwcTriggerDetector::numberOfPostSamples() const {return mNumberOfPostSamples;}
84 
85 unsigned int
86 StMwcTriggerDetector::numberOfAuxWords() const {return mMaxAux;}
87 
88 float
89 StMwcTriggerDetector::mips(unsigned int i, unsigned int j, unsigned int k) const
90 {
91  return mMips[i][j][k];
92 }
93 
94 float
95 StMwcTriggerDetector::aux(unsigned int i, unsigned int j) const
96 {
97  return mAux[i][j];
98 }
99 
100 void
101 StMwcTriggerDetector::setMips(unsigned int i, unsigned int j, unsigned int k, float val)
102 {
103  mMips[i][j][k] = val;
104 }
105 
106 void
107 StMwcTriggerDetector::setAux(unsigned int i, unsigned int j, float val)
108 {
109  mAux[i][j] = val;
110 }
111 
112 void
113 StMwcTriggerDetector::setNumberOfPreSamples(unsigned int val)
114 {
115  mNumberOfPreSamples = val;
116 }
117 
118 void
119 StMwcTriggerDetector::setNumberOfPostSamples(unsigned int val)
120 {
121  mNumberOfPostSamples = val;
122 }