AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONRegHeader.cxx
Go to the documentation of this file.
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 <TClonesArray.h>
19 
20 #include "AliMUONRegHeader.h"
21 #include "AliMUONLocalStruct.h"
22 
23 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
32 
36 
37  const Int_t AliMUONRegHeader::fgkHeaderLength = 5;
38  const Int_t AliMUONRegHeader::fgkScalerLength = 10;
39  const UInt_t AliMUONRegHeader::fgkEndOfReg = 0xBEEFFACE;
40  const UInt_t AliMUONRegHeader::fgkErrorWord = 0xCAFEDEAD;
41 
42 //___________________________________________
43 AliMUONRegHeader::AliMUONRegHeader(TRootIOCtor* /*dummy*/)
44 : TObject(),
45 fDarcWord(0),
46 fWord(0),
47 fMask(0),
48 fL0(0),
49 fClk(0),
50 fHold(0),
51 fLocalArray(0x0)
52 {
54  fInput[0] = fInput[1] = 0;
55 
56  for (Int_t i = 0; i < 8; i++)
57  fScaler[i] = 0;
58 }
59 
60 //___________________________________________
62  : TObject(),
63  fDarcWord(0),
64  fWord(0),
65  fMask(0),
66  fL0(0),
67  fClk(0),
68  fHold(0),
69  fLocalArray(new TClonesArray("AliMUONLocalStruct",16))
70 {
72 
73  fInput[0] = fInput[1] = 0;
74 
75  for (Int_t i = 0; i < 8; i++)
76  fScaler[i] = 0;
77 
78 }
79 
80 //___________________________________________
82 {
84 
85  fLocalArray->Delete();
86  delete fLocalArray;
87 }
88 
89 //___________________________________________
91  : TObject(event),
92  fDarcWord(event.fDarcWord),
93  fWord(event.fWord),
94  fMask(event.fMask),
95  fL0(event.fL0),
96  fClk(event.fClk),
97  fHold(event.fHold),
98  fLocalArray(new TClonesArray("AliMUONLocalStruct", 16))
99 {
103 
104  fInput[0] = event.fInput[0];
105  fInput[1] = event.fInput[1];
106 
107  for (Int_t i = 0; i < 8; i++)
108  fScaler[i] = event.fScaler[i];
109 
110  for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
111  {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
112  AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
113  }
114 }
115 
116 //___________________________________________
118 {
122 
123  if (this == &event) return *this;
124 
125  fDarcWord = event.fDarcWord;
126  fWord = event.fWord;
127  fClk = event.fClk;
128  fHold = event.fHold;
129  fL0 = event.fL0;
130  fMask = event.fMask;
131 
132  fInput[0] = event.fInput[0];
133  fInput[1] = event.fInput[1];
134 
135  for (Int_t i = 0; i < 8; i++)
136  fScaler[i] = event.fScaler[i];
137 
138  fLocalArray = new TClonesArray("AliMUONLocalStruct", 16);
139  for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
140  {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
141  AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
142  }
143 
144  return *this;
145 }
146 
147 //___________________________________________
149 {
153 
154  fClk = 10000;
155  fHold = 100;
156 
157  for (Int_t i = 0; i < 8; i++)
158  fScaler[i] = i;
159 }
160 
161 //___________________________________________
162 void AliMUONRegHeader::Clear(Option_t* )
163 {
167  fLocalArray->Clear("C");
168 
169 }
AliMUONRegHeader & operator=(const AliMUONRegHeader &event)
UInt_t fInput[2]
regional input
void SetScalersNumbers()
set random numbers to fill variable
Rawdata local card structure for trigger.
for(Int_t isec=54;isec< 71;isec+=1)
Definition: AnalyzeLaser.C:32
UInt_t fScaler[8]
regional ouput
MUON regional header for trigger.
virtual ~AliMUONRegHeader()
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
TClonesArray * fLocalArray
array of local structure
UInt_t fHold
regional hold (dead time)
UInt_t fDarcWord
darc word
UInt_t fClk
regional clock
UInt_t fWord
first reg word
void Clear(Option_t *opt)
UShort_t fMask
local mask ("poids faible" 16 bits)
UShort_t fL0
L0 counter (16 bits)