StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSstStrip.cc
1 //$Id: StSstStrip.cc,v 1.2 2016/06/14 19:01:48 bouchet Exp $
2 //
3 //$Log: StSstStrip.cc,v $
4 //Revision 1.2 2016/06/14 19:01:48 bouchet
5 //coverity : UNINIT_CTOR
6 //
7 //Revision 1.1 2015/06/23 16:26:20 jeromel
8 //First version created from the SSD code and reshaped
9 //
10 //Revision 1.1 2015/04/19 17:30:32 bouchet
11 //initial commit ; SST codes
12 //
13 
14 //fork from the SSD code, move along - see history therein
15 
16 #include <string.h>
17 #include "StSstStrip.hh"
18 
19 //________________________________________________________________________________
20 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rDigitSig, Float_t rSigma, Int_t rPedestal, Int_t *rIdMcHit,Int_t *rIdMcTrack) {
21  memset (first, 0, last - first);
22  mNStrip = rNStrip;
23  mDigitSig = rDigitSig;
24  mSigma = rSigma;
25  mPedestal = rPedestal;
26  for(Int_t e=0;e<5;e++) {
27  mIdMcHit[e] = rIdMcHit[e];
28  mIdMcTrack[e] = rIdMcTrack[e];
29  mIdHit[e] = 0;
30  }
31  mMcStrip = 0;
32  mNHits = 1;
33  mAnalogSig = 0;
34  mPrevStrip = 0;
35  mNextStrip = 0;
36 }
37 //________________________________________________________________________________
38 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rDigitSig, Float_t rSigma, Int_t rPedestal) {
39  memset (first, 0, last - first);
40  mNStrip = rNStrip;
41  mDigitSig = rDigitSig;
42  mSigma = rSigma;
43  mPedestal = rPedestal;
44  for(Int_t e=0;e<5;e++) {
45  mIdMcHit[e] = 0;
46  mIdMcTrack[e] = 0;
47  mIdHit[e] =0;
48  }
49  mMcStrip = 0;
50  mNHits = 1;
51  mAnalogSig = 0;
52  mPrevStrip = 0;
53  mNextStrip = 0;
54 }
55 //________________________________________________________________________________
56 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rIdHit, Int_t rMcHit, Int_t rMcTrack, Float_t rAnalogSig) {
57  memset (first, 0, last - first);
58  mNStrip = rNStrip;
59  mIdHit[0] = rIdHit;
60  mIdMcHit[0] = rMcHit;
61  mIdMcTrack[0] = rMcTrack;
62  for(Int_t e=1;e<5;e++) {
63  mIdMcHit[e] = 0;
64  mIdMcTrack[e] = 0;
65  mIdHit[e] = 0;
66  }
67  mNHits = 1;
68  mAnalogSig = rAnalogSig;
69  mDigitSig = 0;
70  mSigma = 0;
71  mPedestal = 0;
72  mMcStrip = 0;
73  mPrevStrip =0;
74  mNextStrip = 0;
75 }
76 //________________________________________________________________________________
77 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rMcStrip, Int_t rDigitSig, Float_t rAnalogSig, Int_t *rIdMcHit) {
78  memset (first, 0, last - first);
79  mNStrip = rNStrip;
80  mMcStrip = rMcStrip;
81  mDigitSig = rDigitSig;
82  mAnalogSig = rAnalogSig;
83  for(Int_t e=0;e<5;e++) mIdMcHit[e] = rIdMcHit[e];
84  for(Int_t e=0;e<5;e++) {
85  mIdMcTrack[e] = 0;
86  mIdHit[e] = 0;
87  }
88  mNHits = 1;
89  mSigma = 0;
90  mPedestal = 0;
91  mPrevStrip = 0;
92  mNextStrip = 0;
93 }
94 //_________________
95 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rMcStrip, Int_t rDigitSig, Float_t rAnalogSig, Int_t *rIdMcHit,Int_t *rIdMcTrack) {
96  memset (first, 0, last - first);
97  mNStrip = rNStrip;
98  mMcStrip = rMcStrip;
99  mDigitSig = rDigitSig;
100  mAnalogSig = rAnalogSig;
101  for(Int_t e=0;e<5;e++) {
102  mIdHit[e] =0;
103  mIdMcHit[e] = rIdMcHit[e];
104  mIdMcTrack[e] = rIdMcTrack[e];
105  }
106  mSigma = 0;
107  mPedestal = 0;
108  mNHits = 1;
109  mPrevStrip = 0;
110  mNextStrip = 0;
111 }
112 
113 //________________________________________________________________________________
114 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rMcStrip, Float_t rAnalogSig) {
115  memset (first, 0, last - first);
116  mNStrip = rNStrip;
117  mMcStrip = rMcStrip;
118  mAnalogSig = rAnalogSig;
119  mDigitSig = 0;
120  mSigma = 0;
121  mPedestal = 0;
122  for(Int_t e=0;e<5;e++) {
123  mIdMcHit[e] = 0;
124  mIdMcTrack[e] = 0;
125  mIdHit[e] = 0;
126  }
127  mNHits = 1;
128  mPrevStrip = 0;
129  mNextStrip = 0;
130 }
131 //________________________________________________________________________________
132 StSstStrip::StSstStrip(Int_t rNStrip, Int_t rDigitSig) {
133  memset (first, 0, last - first);
134  mNStrip = rNStrip;
135  mDigitSig = rDigitSig;
136  mSigma = 0;
137  mPedestal = 0;
138  for(Int_t e=0;e<5;e++) {
139  mIdMcHit[e] = 0;
140  mIdMcTrack[e] = 0;
141  mIdHit[e] = 0;
142  }
143  mMcStrip = 0;
144  mNHits = 1;
145  mAnalogSig = 0;
146  mPrevStrip = 0;
147  mNextStrip = 0;
148 }
149 //________________________________________________________________________________
150 void StSstStrip::copyTo(StSstStrip *ptrClone) {
151  memcpy (ptrClone->first, first, last - first);
152  ptrClone->mPrevStrip = ptrClone->mNextStrip = 0;
153 }
154 //________________________________________________________________________________
155 
156