]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONLocalStruct.cxx
Do not unload gAlice, it is needed until the end of the simulation run
[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 #include "AliMUONLocalStruct.h"
17
18 /// 
19 /// Local structure for trigger raw data.
20 /// The structure includes the information
21 ///  about the x,y position of the 4 detection planes,
22 /// the trigger word (address, local decision, y trigger, y position, x deviation,
23 /// x position)
24 ///
25
26 ClassImp(AliMUONLocalStruct)
27  
28  const Int_t  AliMUONLocalStruct::fgkLength = 5;
29  const Int_t  AliMUONLocalStruct::fgkScalerLength = 45;
30  const UInt_t AliMUONLocalStruct::fgkEndOfLocal   = 0xCAFEFADE;
31
32 //___________________________________________
33 AliMUONLocalStruct::AliMUONLocalStruct()
34   :  TObject(),
35      fL0(0),   
36      fHold(0), 
37      fClk(0),   
38      fLPtNTrig(0), 
39      fHPtNTrig(0), 
40      fLPtRTrig(0), 
41      fHPtRTrig(0), 
42      fLPtLTrig(0), 
43      fHPtLTrig(0), 
44      fLPtSTrig(0), 
45      fHPtSTrig(0), 
46      fEOS(0),         
47      fReset(0)       
48 {
49   //
50   // ctor
51   //
52   for (Int_t i = 0; i < 5; i++)
53     fData[i] = 0;
54
55   for (Int_t i = 0; i < 8*4; i++)
56     fScaler[i] = 0;
57
58
59 }
60
61 //___________________________________________
62 AliMUONLocalStruct::AliMUONLocalStruct(const AliMUONLocalStruct& event)
63   :  TObject(event)
64 {
65   //
66   // copy ctor
67   //
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   for (Int_t i = 0; i < 5; i++)
83     fData[i] = event.fData[i];
84
85   for (Int_t i = 0; i < 8*4; i++)
86     fScaler[i] = event.fScaler[i];
87
88
89 }
90 //___________________________________________
91 AliMUONLocalStruct& 
92 AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event)
93 {
94   // 
95   // assignment operator
96   //
97
98   if (this == &event) return *this;
99
100   fL0       = event.fL0;
101   fHold     = event.fHold;
102   fClk      = event.fClk;
103   fLPtNTrig = event.fLPtNTrig;
104   fHPtNTrig = event.fHPtNTrig;
105   fLPtRTrig = event.fLPtRTrig;
106   fHPtRTrig = event.fHPtRTrig;
107   fLPtLTrig = event.fLPtLTrig;
108   fHPtLTrig = event.fHPtLTrig;
109   fLPtSTrig = event.fLPtSTrig;
110   fHPtSTrig = event.fHPtSTrig;
111   fEOS      = event.fEOS;
112   fReset    = event.fReset;
113
114   for (Int_t i = 0; i < 5; i++)
115     fData[i] = event.fData[i];
116
117   for (Int_t i = 0; i < 8*4; i++)
118     fScaler[i] = event.fScaler[i];
119
120   return *this;
121 }
122
123 //___________________________________________
124 void AliMUONLocalStruct::SetScalersNumbers()
125 {
126   // set numbers for scaler events for local structure
127   // crasy numbers for scaler words, while no beam is coming
128   //
129
130   fL0       = 1000;   
131   fHold     = 100; 
132   fClk      = 10000;  
133   fLPtNTrig = 1; 
134   fHPtNTrig = 1; 
135   fLPtRTrig = 2; 
136   fHPtRTrig = 2; 
137   fLPtLTrig = 3; 
138   fHPtLTrig = 3; 
139   fLPtSTrig = 4; 
140   fHPtSTrig = 4; 
141   fEOS      = 0x2AA;         
142   fReset    = 10;     
143
144   for (Int_t i = 0; i < 8*4; i++)
145     fScaler[i] = i;
146
147 }