]>
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 | ||
3d1463c8 | 20 | //----------------------------------------------------------------------------- |
00e86732 | 21 | /// \class AliMUONLocalStruct |
32def6aa | 22 | /// Local structure for trigger raw data. |
23 | /// The structure includes the information | |
24 | /// about the x,y position of the 4 detection planes, | |
25 | /// the trigger word (address, local decision, y trigger, y position, x deviation, | |
26 | /// x position) | |
27 | /// | |
00e86732 | 28 | /// \author Christian Finck |
3d1463c8 | 29 | //----------------------------------------------------------------------------- |
32def6aa | 30 | |
13985652 | 31 | /// \cond CLASSIMP |
32def6aa | 32 | ClassImp(AliMUONLocalStruct) |
13985652 | 33 | /// \endcond |
34 | ||
32def6aa | 35 | const Int_t AliMUONLocalStruct::fgkLength = 5; |
36 | const Int_t AliMUONLocalStruct::fgkScalerLength = 45; | |
37 | const UInt_t AliMUONLocalStruct::fgkEndOfLocal = 0xCAFEFADE; | |
b2e46925 | 38 | const UInt_t AliMUONLocalStruct::fgkDisableWord = 0x010CDEAD; |
32def6aa | 39 | //___________________________________________ |
40 | AliMUONLocalStruct::AliMUONLocalStruct() | |
41 | : TObject(), | |
42 | fL0(0), | |
43 | fHold(0), | |
44 | fClk(0), | |
45 | fLPtNTrig(0), | |
46 | fHPtNTrig(0), | |
47 | fLPtRTrig(0), | |
48 | fHPtRTrig(0), | |
49 | fLPtLTrig(0), | |
50 | fHPtLTrig(0), | |
51 | fLPtSTrig(0), | |
52 | fHPtSTrig(0), | |
53 | fEOS(0), | |
54 | fReset(0) | |
55 | { | |
00e86732 | 56 | /// |
57 | /// ctor | |
58 | /// | |
32def6aa | 59 | for (Int_t i = 0; i < 5; i++) |
60 | fData[i] = 0; | |
61 | ||
62 | for (Int_t i = 0; i < 8*4; i++) | |
63 | fScaler[i] = 0; | |
64 | ||
65 | ||
66 | } | |
67 | ||
68 | //___________________________________________ | |
69 | AliMUONLocalStruct::AliMUONLocalStruct(const AliMUONLocalStruct& event) | |
9f5dcca3 | 70 | : TObject(event), |
71 | fL0(event.fL0), | |
72 | fHold(event.fHold), | |
73 | fClk(event.fClk), | |
74 | fLPtNTrig(event.fLPtNTrig), | |
75 | fHPtNTrig(event.fHPtNTrig), | |
76 | fLPtRTrig(event.fLPtRTrig), | |
77 | fHPtRTrig(event.fHPtRTrig), | |
78 | fLPtLTrig(event.fLPtLTrig), | |
79 | fHPtLTrig(event.fHPtLTrig), | |
80 | fLPtSTrig(event.fLPtSTrig), | |
81 | fHPtSTrig(event.fHPtSTrig), | |
82 | fEOS(event.fEOS), | |
83 | fReset(event.fReset) | |
32def6aa | 84 | { |
00e86732 | 85 | /// |
86 | /// copy ctor | |
87 | /// | |
32def6aa | 88 | for (Int_t i = 0; i < 5; i++) |
89 | fData[i] = event.fData[i]; | |
90 | ||
91 | for (Int_t i = 0; i < 8*4; i++) | |
92 | fScaler[i] = event.fScaler[i]; | |
93 | ||
94 | ||
95 | } | |
71a2d3aa | 96 | |
97 | //___________________________________________ | |
98 | AliMUONLocalStruct::~AliMUONLocalStruct() | |
99 | { | |
100 | /// Destructor | |
101 | } | |
102 | ||
32def6aa | 103 | //___________________________________________ |
104 | AliMUONLocalStruct& | |
105 | AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event) | |
106 | { | |
00e86732 | 107 | /// |
108 | /// assignment operator | |
109 | /// | |
32def6aa | 110 | |
111 | if (this == &event) return *this; | |
112 | ||
113 | fL0 = event.fL0; | |
114 | fHold = event.fHold; | |
115 | fClk = event.fClk; | |
116 | fLPtNTrig = event.fLPtNTrig; | |
117 | fHPtNTrig = event.fHPtNTrig; | |
118 | fLPtRTrig = event.fLPtRTrig; | |
119 | fHPtRTrig = event.fHPtRTrig; | |
120 | fLPtLTrig = event.fLPtLTrig; | |
121 | fHPtLTrig = event.fHPtLTrig; | |
122 | fLPtSTrig = event.fLPtSTrig; | |
123 | fHPtSTrig = event.fHPtSTrig; | |
124 | fEOS = event.fEOS; | |
125 | fReset = event.fReset; | |
126 | ||
127 | for (Int_t i = 0; i < 5; i++) | |
128 | fData[i] = event.fData[i]; | |
129 | ||
130 | for (Int_t i = 0; i < 8*4; i++) | |
131 | fScaler[i] = event.fScaler[i]; | |
132 | ||
133 | return *this; | |
134 | } | |
135 | ||
861275bb | 136 | //___________________________________________ |
137 | void AliMUONLocalStruct::GetXPattern(TArrayS& array) const | |
138 | { | |
139 | /// return array of X pattern | |
140 | Short_t vec[4] = {GetX1(), GetX2(), GetX3(), GetX4()}; | |
141 | array.Set(4, vec); | |
142 | } | |
143 | ||
144 | //___________________________________________ | |
145 | void AliMUONLocalStruct::GetYPattern(TArrayS& array) const | |
146 | { | |
147 | /// return array of Y pattern | |
148 | Short_t vec[4] = {GetY1(), GetY2(), GetY3(), GetY4()}; | |
149 | array.Set(4, vec); | |
150 | } | |
151 | ||
32def6aa | 152 | //___________________________________________ |
153 | void AliMUONLocalStruct::SetScalersNumbers() | |
154 | { | |
00e86732 | 155 | /// set numbers for scaler events for local structure |
156 | /// crasy numbers for scaler words, while no beam is coming | |
157 | /// | |
32def6aa | 158 | |
159 | fL0 = 1000; | |
160 | fHold = 100; | |
161 | fClk = 10000; | |
162 | fLPtNTrig = 1; | |
163 | fHPtNTrig = 1; | |
164 | fLPtRTrig = 2; | |
165 | fHPtRTrig = 2; | |
166 | fLPtLTrig = 3; | |
167 | fHPtLTrig = 3; | |
168 | fLPtSTrig = 4; | |
169 | fHPtSTrig = 4; | |
170 | fEOS = 0x2AA; | |
171 | fReset = 10; | |
172 | ||
173 | for (Int_t i = 0; i < 8*4; i++) | |
174 | fScaler[i] = i; | |
175 | ||
176 | } |