1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 #include "AliMUONDarcHeader.h"
19 #include "AliMUONRegHeader.h"
21 //-----------------------------------------------------------------------------
22 /// \class AliMUONDarcHeader
23 /// Darc structure for trigger raw data.
24 /// Each DDL contains one Darc structure
25 /// The structure includes the information of the Darc boards
26 /// the Global board input and the global board output
27 /// The structure containes the information of the 8 (at most)
28 /// regional structures.
30 /// \author Christian Finck
31 //-----------------------------------------------------------------------------
34 ClassImp(AliMUONDarcHeader)
37 const Int_t AliMUONDarcHeader::fgkDarcHeaderLength = 1;
38 const Int_t AliMUONDarcHeader::fgkGlobalHeaderLength = 5;
39 const Int_t AliMUONDarcHeader::fgkDarcScalerLength = 8;
40 const Int_t AliMUONDarcHeader::fgkGlobalScalerLength = 10;
42 const UInt_t AliMUONDarcHeader::fgkEndOfDarc = 0xDEADFACE;
43 const UInt_t AliMUONDarcHeader::fgkEndOfGlobal = 0xDEADBEEF;
45 //___________________________________________
46 AliMUONDarcHeader::AliMUONDarcHeader()
64 fRegHeaderArray(new TClonesArray("AliMUONRegHeader",8))
70 for (Int_t i = 0; i < 4; i++)
73 for (Int_t i = 0; i < 6; i++)
78 //___________________________________________
79 AliMUONDarcHeader::AliMUONDarcHeader(const AliMUONDarcHeader& event)
82 fGlobalOutput(event.fGlobalOutput),
83 fGlobalL0(event.fGlobalL0),
84 fGlobalClk(event.fGlobalClk),
85 fGlobalHold(event.fGlobalHold),
86 fGlobalSpare(event.fGlobalSpare),
88 fDarcL0R(event.fDarcL0R),
89 fDarcL1P(event.fDarcL1P),
90 fDarcL1S(event.fDarcL1S),
91 fDarcL2A(event.fDarcL2A),
92 fDarcL2R(event.fDarcL2R),
93 fDarcClk(event.fDarcClk),
94 fDarcHold(event.fDarcHold),
95 fDarcSpare(event.fDarcSpare),
96 fRegHeaderArray(new TClonesArray("AliMUONRegHeader", 8))
103 for (Int_t i = 0; i < 4; i++)
104 fGlobalInput[i] = event.fGlobalInput[i];
106 for (Int_t i = 0; i < 6; i++)
107 fGlobalScaler[i] = event.fGlobalScaler[i];
109 for (Int_t index = 0; index < (event.fRegHeaderArray)->GetEntriesFast(); index++) {
110 new ((*fRegHeaderArray)[fRegHeaderArray->GetEntriesFast()])
111 AliMUONRegHeader(*(AliMUONRegHeader*)(event.fRegHeaderArray)->At(index));
115 //___________________________________________
116 AliMUONDarcHeader& AliMUONDarcHeader::operator=(const AliMUONDarcHeader& event)
119 /// assignment operator
121 if (this == &event) return *this;
124 fGlobalOutput = event.fGlobalOutput;
125 fGlobalL0 = event.fGlobalL0;
126 fGlobalClk = event.fGlobalClk;
127 fGlobalHold = event.fGlobalHold;
128 fGlobalSpare = event.fGlobalSpare;
130 fDarcL0R = event.fDarcL0R;
131 fDarcL1P = event.fDarcL1P;
132 fDarcL1S = event.fDarcL1S;
133 fDarcL2A = event.fDarcL2A;
134 fDarcL2R = event.fDarcL2R;
135 fDarcClk = event.fDarcClk;
136 fDarcHold = event.fDarcHold;
137 fDarcSpare = event.fDarcSpare;
139 for (Int_t i = 0; i < 4; i++)
140 fGlobalInput[i] = event.fGlobalInput[i];
142 for (Int_t i = 0; i < 6; i++)
143 fGlobalScaler[i] = event.fGlobalScaler[i];
145 fRegHeaderArray = new TClonesArray("AliMUONRegHeader", 8);
146 for (Int_t index = 0; index < (event.fRegHeaderArray)->GetEntriesFast(); index++) {
147 new ((*fRegHeaderArray)[fRegHeaderArray->GetEntriesFast()])
148 AliMUONRegHeader(*(AliMUONRegHeader*)(event.fRegHeaderArray)->At(index));
154 //___________________________________________
155 AliMUONDarcHeader::~AliMUONDarcHeader()
160 fRegHeaderArray->Delete();
161 delete fRegHeaderArray;
164 //___________________________________________
165 void AliMUONDarcHeader::SetScalersNumbers()
167 /// set numbers for scaler events for Darc header
168 /// since this is provided by the experiment
169 /// put dummy numbers to check the monitoring
185 for (Int_t i = 0; i < 6; i++)
186 fGlobalScaler[i] = i;
190 //___________________________________________
191 void AliMUONDarcHeader::Clear(Option_t* )
193 /// Clear TClones arrays
194 /// instead of deleting
196 fRegHeaderArray->Clear("C");