]>
Commit | Line | Data |
---|---|---|
32def6aa | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
13985652 | 16 | /* $Id$ */ |
17 | ||
32def6aa | 18 | #include "AliMUONLocalStruct.h" |
19 | ||
00e86732 | 20 | /// \class AliMUONLocalStruct |
32def6aa | 21 | /// Local structure for trigger raw data. |
22 | /// The structure includes the information | |
23 | /// about the x,y position of the 4 detection planes, | |
24 | /// the trigger word (address, local decision, y trigger, y position, x deviation, | |
25 | /// x position) | |
26 | /// | |
00e86732 | 27 | /// \author Christian Finck |
32def6aa | 28 | |
13985652 | 29 | /// \cond CLASSIMP |
32def6aa | 30 | ClassImp(AliMUONLocalStruct) |
13985652 | 31 | /// \endcond |
32 | ||
32def6aa | 33 | const Int_t AliMUONLocalStruct::fgkLength = 5; |
34 | const Int_t AliMUONLocalStruct::fgkScalerLength = 45; | |
35 | const UInt_t AliMUONLocalStruct::fgkEndOfLocal = 0xCAFEFADE; | |
b2e46925 | 36 | const UInt_t AliMUONLocalStruct::fgkDisableWord = 0x010CDEAD; |
32def6aa | 37 | //___________________________________________ |
38 | AliMUONLocalStruct::AliMUONLocalStruct() | |
39 | : TObject(), | |
40 | fL0(0), | |
41 | fHold(0), | |
42 | fClk(0), | |
43 | fLPtNTrig(0), | |
44 | fHPtNTrig(0), | |
45 | fLPtRTrig(0), | |
46 | fHPtRTrig(0), | |
47 | fLPtLTrig(0), | |
48 | fHPtLTrig(0), | |
49 | fLPtSTrig(0), | |
50 | fHPtSTrig(0), | |
51 | fEOS(0), | |
52 | fReset(0) | |
53 | { | |
00e86732 | 54 | /// |
55 | /// ctor | |
56 | /// | |
32def6aa | 57 | for (Int_t i = 0; i < 5; i++) |
58 | fData[i] = 0; | |
59 | ||
60 | for (Int_t i = 0; i < 8*4; i++) | |
61 | fScaler[i] = 0; | |
62 | ||
63 | ||
64 | } | |
65 | ||
66 | //___________________________________________ | |
67 | AliMUONLocalStruct::AliMUONLocalStruct(const AliMUONLocalStruct& event) | |
9f5dcca3 | 68 | : TObject(event), |
69 | fL0(event.fL0), | |
70 | fHold(event.fHold), | |
71 | fClk(event.fClk), | |
72 | fLPtNTrig(event.fLPtNTrig), | |
73 | fHPtNTrig(event.fHPtNTrig), | |
74 | fLPtRTrig(event.fLPtRTrig), | |
75 | fHPtRTrig(event.fHPtRTrig), | |
76 | fLPtLTrig(event.fLPtLTrig), | |
77 | fHPtLTrig(event.fHPtLTrig), | |
78 | fLPtSTrig(event.fLPtSTrig), | |
79 | fHPtSTrig(event.fHPtSTrig), | |
80 | fEOS(event.fEOS), | |
81 | fReset(event.fReset) | |
32def6aa | 82 | { |
00e86732 | 83 | /// |
84 | /// copy ctor | |
85 | /// | |
32def6aa | 86 | for (Int_t i = 0; i < 5; i++) |
87 | fData[i] = event.fData[i]; | |
88 | ||
89 | for (Int_t i = 0; i < 8*4; i++) | |
90 | fScaler[i] = event.fScaler[i]; | |
91 | ||
92 | ||
93 | } | |
71a2d3aa | 94 | |
95 | //___________________________________________ | |
96 | AliMUONLocalStruct::~AliMUONLocalStruct() | |
97 | { | |
98 | /// Destructor | |
99 | } | |
100 | ||
32def6aa | 101 | //___________________________________________ |
102 | AliMUONLocalStruct& | |
103 | AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event) | |
104 | { | |
00e86732 | 105 | /// |
106 | /// assignment operator | |
107 | /// | |
32def6aa | 108 | |
109 | if (this == &event) return *this; | |
110 | ||
111 | fL0 = event.fL0; | |
112 | fHold = event.fHold; | |
113 | fClk = event.fClk; | |
114 | fLPtNTrig = event.fLPtNTrig; | |
115 | fHPtNTrig = event.fHPtNTrig; | |
116 | fLPtRTrig = event.fLPtRTrig; | |
117 | fHPtRTrig = event.fHPtRTrig; | |
118 | fLPtLTrig = event.fLPtLTrig; | |
119 | fHPtLTrig = event.fHPtLTrig; | |
120 | fLPtSTrig = event.fLPtSTrig; | |
121 | fHPtSTrig = event.fHPtSTrig; | |
122 | fEOS = event.fEOS; | |
123 | fReset = event.fReset; | |
124 | ||
125 | for (Int_t i = 0; i < 5; i++) | |
126 | fData[i] = event.fData[i]; | |
127 | ||
128 | for (Int_t i = 0; i < 8*4; i++) | |
129 | fScaler[i] = event.fScaler[i]; | |
130 | ||
131 | return *this; | |
132 | } | |
133 | ||
861275bb | 134 | //___________________________________________ |
135 | void AliMUONLocalStruct::GetXPattern(TArrayS& array) const | |
136 | { | |
137 | /// return array of X pattern | |
138 | Short_t vec[4] = {GetX1(), GetX2(), GetX3(), GetX4()}; | |
139 | array.Set(4, vec); | |
140 | } | |
141 | ||
142 | //___________________________________________ | |
143 | void AliMUONLocalStruct::GetYPattern(TArrayS& array) const | |
144 | { | |
145 | /// return array of Y pattern | |
146 | Short_t vec[4] = {GetY1(), GetY2(), GetY3(), GetY4()}; | |
147 | array.Set(4, vec); | |
148 | } | |
149 | ||
32def6aa | 150 | //___________________________________________ |
151 | void AliMUONLocalStruct::SetScalersNumbers() | |
152 | { | |
00e86732 | 153 | /// set numbers for scaler events for local structure |
154 | /// crasy numbers for scaler words, while no beam is coming | |
155 | /// | |
32def6aa | 156 | |
157 | fL0 = 1000; | |
158 | fHold = 100; | |
159 | fClk = 10000; | |
160 | fLPtNTrig = 1; | |
161 | fHPtNTrig = 1; | |
162 | fLPtRTrig = 2; | |
163 | fHPtRTrig = 2; | |
164 | fLPtLTrig = 3; | |
165 | fHPtLTrig = 3; | |
166 | fLPtSTrig = 4; | |
167 | fHPtSTrig = 4; | |
168 | fEOS = 0x2AA; | |
169 | fReset = 10; | |
170 | ||
171 | for (Int_t i = 0; i < 8*4; i++) | |
172 | fScaler[i] = i; | |
173 | ||
174 | } |