]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONLocalStruct.cxx
- Adding the array of slat segmentation and GetLayerSegmentation(..) method
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalStruct.cxx
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
16 /* $Id$ */
17
18 #include "AliMUONLocalStruct.h"
19
20 /// 
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 ///
27
28 /// \cond CLASSIMP
29 ClassImp(AliMUONLocalStruct)
30 /// \endcond
31
32  const Int_t  AliMUONLocalStruct::fgkLength = 5;
33  const Int_t  AliMUONLocalStruct::fgkScalerLength = 45;
34  const UInt_t AliMUONLocalStruct::fgkEndOfLocal   = 0xCAFEFADE;
35  const UInt_t AliMUONLocalStruct::fgkDisableWord  = 0x010CDEAD;
36 //___________________________________________
37 AliMUONLocalStruct::AliMUONLocalStruct()
38   :  TObject(),
39      fL0(0),   
40      fHold(0), 
41      fClk(0),   
42      fLPtNTrig(0), 
43      fHPtNTrig(0), 
44      fLPtRTrig(0), 
45      fHPtRTrig(0), 
46      fLPtLTrig(0), 
47      fHPtLTrig(0), 
48      fLPtSTrig(0), 
49      fHPtSTrig(0), 
50      fEOS(0),         
51      fReset(0)       
52 {
53   //
54   // ctor
55   //
56   for (Int_t i = 0; i < 5; i++)
57     fData[i] = 0;
58
59   for (Int_t i = 0; i < 8*4; i++)
60     fScaler[i] = 0;
61
62
63 }
64
65 //___________________________________________
66 AliMUONLocalStruct::AliMUONLocalStruct(const AliMUONLocalStruct& event)
67   :  TObject(event),
68      fL0(event.fL0),
69      fHold(event.fHold),
70      fClk(event.fClk),
71      fLPtNTrig(event.fLPtNTrig),
72      fHPtNTrig(event.fHPtNTrig),
73      fLPtRTrig(event.fLPtRTrig),
74      fHPtRTrig(event.fHPtRTrig),
75      fLPtLTrig(event.fLPtLTrig),
76      fHPtLTrig(event.fHPtLTrig),
77      fLPtSTrig(event.fLPtSTrig),
78      fHPtSTrig(event.fHPtSTrig),
79      fEOS(event.fEOS),
80      fReset(event.fReset)
81 {
82   //
83   // copy ctor
84   //
85   for (Int_t i = 0; i < 5; i++)
86     fData[i] = event.fData[i];
87
88   for (Int_t i = 0; i < 8*4; i++)
89     fScaler[i] = event.fScaler[i];
90
91
92 }
93 //___________________________________________
94 AliMUONLocalStruct& 
95 AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event)
96 {
97   // 
98   // assignment operator
99   //
100
101   if (this == &event) return *this;
102
103   fL0       = event.fL0;
104   fHold     = event.fHold;
105   fClk      = event.fClk;
106   fLPtNTrig = event.fLPtNTrig;
107   fHPtNTrig = event.fHPtNTrig;
108   fLPtRTrig = event.fLPtRTrig;
109   fHPtRTrig = event.fHPtRTrig;
110   fLPtLTrig = event.fLPtLTrig;
111   fHPtLTrig = event.fHPtLTrig;
112   fLPtSTrig = event.fLPtSTrig;
113   fHPtSTrig = event.fHPtSTrig;
114   fEOS      = event.fEOS;
115   fReset    = event.fReset;
116
117   for (Int_t i = 0; i < 5; i++)
118     fData[i] = event.fData[i];
119
120   for (Int_t i = 0; i < 8*4; i++)
121     fScaler[i] = event.fScaler[i];
122
123   return *this;
124 }
125
126 //___________________________________________
127 void AliMUONLocalStruct::SetScalersNumbers()
128 {
129   // set numbers for scaler events for local structure
130   // crasy numbers for scaler words, while no beam is coming
131   //
132
133   fL0       = 1000;   
134   fHold     = 100; 
135   fClk      = 10000;  
136   fLPtNTrig = 1; 
137   fHPtNTrig = 1; 
138   fLPtRTrig = 2; 
139   fHPtRTrig = 2; 
140   fLPtLTrig = 3; 
141   fHPtLTrig = 3; 
142   fLPtSTrig = 4; 
143   fHPtSTrig = 4; 
144   fEOS      = 0x2AA;         
145   fReset    = 10;     
146
147   for (Int_t i = 0; i < 8*4; i++)
148     fScaler[i] = i;
149
150 }