]>
Commit | Line | Data |
---|---|---|
a3283a4c | 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 | ||
9265505b | 16 | /// \class AliMUONDigitMaker |
8c51a32f | 17 | /// MUON Digit maker from rawdata. |
a3283a4c | 18 | /// |
19 | /// Raw2Digits: | |
20 | /// Using real mapping for tracker | |
21 | /// Indranil Das (Adapted for runloader: Ch. Finck) july 05 | |
8c51a32f | 22 | /// |
23 | /// Implemented non-constant buspatch numbers for tracking | |
24 | /// with correct DDL id. | |
25 | /// (Ch. Finck, dec 05) | |
26 | /// | |
a3283a4c | 27 | /// Add reader for scaler trigger events |
28 | /// Use memcpy instead of assignment elt by elt | |
29 | /// (Ch. Finck, Jan 06) | |
8c51a32f | 30 | /// |
31 | /// Using new interface with AliMUONRawStreamTracker(Trigger) | |
32 | /// (New interface of AliMUONRawReader class) | |
33 | /// (further details could be found in Alice-note) | |
34 | /// (Ch. Finck, March 06) | |
35 | /// | |
36 | /// Add (S)Digit maker tracker (for free) | |
37 | /// and for trigger. Create trigger inverse mapping. | |
78649106 | 38 | /// |
39 | /// \author Ch. Finck, oct 06 | |
a3283a4c | 40 | |
a3283a4c | 41 | #include "AliMUONDigitMaker.h" |
42 | #include "AliMUONDigit.h" | |
43 | ||
44 | #include "AliMUONConstants.h" | |
45 | #include "AliMUONData.h" | |
46 | ||
47 | #include "AliMUONRawStreamTracker.h" | |
48 | #include "AliMUONDDLTracker.h" | |
49 | #include "AliMUONDspHeader.h" | |
50 | #include "AliMUONBlockHeader.h" | |
51 | #include "AliMUONBusStruct.h" | |
52 | ||
53 | #include "AliMUONRawStreamTrigger.h" | |
54 | #include "AliMUONDDLTrigger.h" | |
55 | #include "AliMUONDarcHeader.h" | |
56 | #include "AliMUONRegHeader.h" | |
57 | #include "AliMUONLocalStruct.h" | |
58 | ||
d53fb0de | 59 | #include "AliMUONTriggerCrateStore.h" |
60 | #include "AliMUONTriggerCrate.h" | |
61 | #include "AliMUONLocalTriggerBoard.h" | |
a3283a4c | 62 | #include "AliMUONLocalTrigger.h" |
63 | #include "AliMUONGlobalTrigger.h" | |
e1a10d41 | 64 | #include "AliMUONTriggerCircuit.h" |
9265505b | 65 | |
66 | #include "AliMpSegmentation.h" | |
a3283a4c | 67 | #include "AliMpVSegmentation.h" |
68 | #include "AliMpPad.h" | |
69 | #include "AliMpDEManager.h" | |
e5ced899 | 70 | #include "AliMpDDLStore.h" |
71 | #include "AliMpCathodType.h" | |
a3283a4c | 72 | |
9265505b | 73 | #include "AliRawReader.h" |
74 | #include "AliRawDataHeader.h" | |
75 | #include "AliLog.h" | |
76 | #include "AliRun.h" | |
77 | ||
9265505b | 78 | #include <TList.h> |
79 | ||
9265505b | 80 | |
81 | /// \cond CLASSIMP | |
a3283a4c | 82 | ClassImp(AliMUONDigitMaker) // Class implementation in ROOT context |
9265505b | 83 | /// \endcond |
84 | ||
a3283a4c | 85 | //__________________________________________________________________________ |
241560c2 | 86 | AliMUONDigitMaker::AliMUONDigitMaker(Bool_t flag) |
a3283a4c | 87 | : TObject(), |
aa6ecf89 | 88 | fMUONData(0x0), |
9f5dcca3 | 89 | fScalerEvent(kFALSE), |
241560c2 | 90 | fDigitFlag(flag), |
e604ac4c | 91 | fTriggerFlag(kTRUE), |
9f5dcca3 | 92 | fRawStreamTracker(new AliMUONRawStreamTracker()), |
93 | fRawStreamTrigger(new AliMUONRawStreamTrigger()), | |
94 | fDigit(new AliMUONDigit()), | |
95 | fLocalTrigger(new AliMUONLocalTrigger()), | |
96 | fGlobalTrigger(new AliMUONGlobalTrigger()), | |
fe5010dd | 97 | fCrateManager(0x0), |
9f5dcca3 | 98 | fTrackerTimer(), |
99 | fTriggerTimer(), | |
100 | fMappingTimer() | |
a3283a4c | 101 | { |
9265505b | 102 | /// ctor with AliMUONData as argument |
103 | /// for reconstruction | |
a3283a4c | 104 | |
105 | AliDebug(1,""); | |
106 | ||
107 | // Standard Constructor | |
108 | ||
a3283a4c | 109 | fTrackerTimer.Start(kTRUE); fTrackerTimer.Stop(); |
110 | fTriggerTimer.Start(kTRUE); fTriggerTimer.Stop(); | |
111 | fMappingTimer.Start(kTRUE); fMappingTimer.Stop(); | |
112 | ||
113 | } | |
114 | ||
a3283a4c | 115 | //__________________________________________________________________________ |
9f5dcca3 | 116 | AliMUONDigitMaker::~AliMUONDigitMaker() |
a3283a4c | 117 | { |
9265505b | 118 | /// clean up |
119 | /// and time processing measure | |
120 | ||
a3283a4c | 121 | delete fRawStreamTracker; |
122 | delete fRawStreamTrigger; | |
123 | ||
124 | delete fDigit; | |
125 | delete fLocalTrigger; | |
126 | delete fGlobalTrigger; | |
127 | ||
a7b01aa5 | 128 | AliDebug(1, Form("Execution time for MUON tracker : R:%.2fs C:%.2fs", |
a3283a4c | 129 | fTrackerTimer.RealTime(),fTrackerTimer.CpuTime())); |
a7b01aa5 | 130 | AliDebug(1, Form(" Execution time for MUON tracker (mapping calls part) " |
a3283a4c | 131 | ": R:%.2fs C:%.2fs", |
132 | fMappingTimer.RealTime(),fMappingTimer.CpuTime())); | |
a7b01aa5 | 133 | AliDebug(1, Form("Execution time for MUON trigger : R:%.2fs C:%.2fs", |
a3283a4c | 134 | fTriggerTimer.RealTime(),fTriggerTimer.CpuTime())); |
135 | ||
136 | return; | |
137 | } | |
138 | ||
139 | //____________________________________________________________________ | |
140 | Int_t AliMUONDigitMaker::Raw2Digits(AliRawReader* rawReader) | |
141 | { | |
9265505b | 142 | /// Main method to creates digit |
143 | /// for tracker | |
144 | /// and trigger | |
a3283a4c | 145 | |
146 | // generate digits | |
147 | ReadTrackerDDL(rawReader); | |
148 | ||
149 | // generate trigger | |
e604ac4c | 150 | if( fTriggerFlag) |
151 | ReadTriggerDDL(rawReader); | |
152 | else | |
153 | AliInfo("Reading trigger rawdata disable"); | |
a3283a4c | 154 | |
155 | return kTRUE; | |
156 | ||
157 | } | |
158 | ||
159 | //____________________________________________________________________ | |
160 | Int_t AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader) | |
161 | { | |
162 | ||
9265505b | 163 | /// reading tracker DDL |
164 | /// filling the TClonesArray in MUONData | |
165 | ||
a3283a4c | 166 | fTrackerTimer.Start(kFALSE); |
167 | ||
168 | // elex info | |
169 | Int_t buspatchId; | |
170 | UChar_t channelId; | |
171 | UShort_t manuId; | |
172 | Char_t parity; | |
173 | UShort_t charge; | |
174 | Int_t dataSize; | |
175 | ||
e6e1f642 | 176 | Int_t iChamber; |
177 | ||
a3283a4c | 178 | AliMUONDDLTracker* ddlTracker = 0x0; |
179 | AliMUONBlockHeader* blkHeader = 0x0; | |
180 | AliMUONDspHeader* dspHeader = 0x0; | |
181 | AliMUONBusStruct* busStruct = 0x0; | |
182 | ||
183 | ||
184 | fRawStreamTracker->SetReader(rawReader); | |
185 | ||
186 | while(fRawStreamTracker->NextDDL()) { | |
187 | ||
188 | ddlTracker = fRawStreamTracker->GetDDLTracker(); | |
189 | ||
190 | Int_t nBlock = ddlTracker->GetBlkHeaderEntries(); | |
191 | for(Int_t iBlock = 0; iBlock < nBlock ;iBlock++){ | |
192 | ||
193 | blkHeader = ddlTracker->GetBlkHeaderEntry(iBlock); | |
194 | ||
195 | Int_t nDsp = blkHeader->GetDspHeaderEntries(); | |
196 | ||
197 | for(Int_t iDsp = 0; iDsp < nDsp ;iDsp++){ //DSP loop | |
198 | ||
199 | dspHeader = blkHeader->GetDspHeaderEntry(iDsp); | |
200 | ||
201 | Int_t nBusPatch = dspHeader->GetBusPatchEntries(); | |
202 | ||
203 | for(Int_t iBusPatch = 0; iBusPatch < nBusPatch; iBusPatch++) { | |
204 | ||
205 | busStruct = dspHeader->GetBusPatchEntry(iBusPatch); | |
206 | ||
207 | dataSize = busStruct->GetLength(); | |
208 | buspatchId = busStruct->GetBusPatchId(); | |
209 | ||
210 | for (Int_t iData = 0; iData < dataSize; iData++) { | |
211 | ||
212 | // digits info | |
213 | parity = busStruct->GetParity(iData); // test later for parity | |
214 | manuId = busStruct->GetManuId(iData); | |
215 | channelId = busStruct->GetChannelId(iData); | |
216 | charge = busStruct->GetCharge(iData); | |
217 | // set charge | |
218 | fDigit->SetSignal(charge); | |
219 | fDigit->SetPhysicsSignal(charge); | |
220 | fDigit->SetADC(charge); | |
221 | ||
222 | // Get Back the hits at pads | |
223 | Int_t error = GetMapping(buspatchId,manuId,channelId,fDigit); | |
84ceeb06 | 224 | if (error) { |
e6e1f642 | 225 | AliWarning("Mapping Error\n"); |
84ceeb06 | 226 | continue; |
227 | } | |
a3283a4c | 228 | // debugging |
229 | if (AliLog::GetGlobalDebugLevel() == 3) { | |
230 | Int_t padX = fDigit->PadX(); | |
231 | Int_t padY = fDigit->PadY(); | |
232 | Int_t iCath = fDigit->Cathode(); | |
233 | Int_t idDE = fDigit->DetElemId(); | |
234 | ||
235 | AliDebug(1,Form("output IdDE %d busPatchid %d PadX %d PadY %d iCath %d \n", | |
236 | idDE, buspatchId, padX, padY, iCath)); | |
237 | ||
238 | AliDebug(3,Form("idDE %d Padx %d Pady %d, Cath %d, charge %d", | |
239 | idDE, padX, padY, iCath, charge)); | |
240 | } | |
241 | ||
242 | // fill digits | |
66f4c572 | 243 | iChamber = AliMpDEManager::GetChamberId(fDigit->DetElemId()); |
241560c2 | 244 | |
245 | if (fDigitFlag) | |
246 | fMUONData->AddDigit(iChamber, *fDigit); | |
247 | else | |
248 | fMUONData->AddSDigit(iChamber, *fDigit); | |
249 | ||
a3283a4c | 250 | |
251 | } // iData | |
252 | } // iBusPatch | |
253 | } // iDsp | |
254 | } // iBlock | |
255 | } // NextDDL | |
256 | ||
257 | fTrackerTimer.Stop(); | |
258 | ||
259 | return kTRUE; | |
260 | } | |
261 | //____________________________________________________________________ | |
262 | Int_t AliMUONDigitMaker::GetMapping(Int_t busPatchId, UShort_t manuId, | |
263 | UChar_t channelId, AliMUONDigit* digit ) | |
264 | { | |
9265505b | 265 | /// mapping for tracker |
266 | ||
a3283a4c | 267 | fMappingTimer.Start(kFALSE); |
268 | ||
269 | // getting DE from buspatch | |
e5ced899 | 270 | Int_t detElemId = AliMpDDLStore::Instance()->GetDEfromBus(busPatchId); |
a3283a4c | 271 | AliDebug(3,Form("detElemId: %d busPatchId %d\n", detElemId, busPatchId)); |
272 | ||
9265505b | 273 | const AliMpVSegmentation* seg |
274 | = AliMpSegmentation::Instance()->GetMpSegmentationByElectronics(detElemId, manuId); | |
a3283a4c | 275 | AliMpPad pad = seg->PadByLocation(AliMpIntPair(manuId,channelId),kTRUE); |
276 | ||
277 | if (!pad.IsValid()) | |
278 | { | |
279 | AliWarning(Form("No pad for detElemId: %d, busPatchId %d, manuId: %d, channelId: %d\n", | |
280 | detElemId, busPatchId, manuId, channelId)); | |
281 | fMappingTimer.Stop(); | |
282 | return kTRUE; | |
283 | } // return error | |
284 | ||
285 | // Getting padX, padY and cathode number. | |
286 | Int_t padX = pad.GetIndices().GetFirst(); | |
287 | Int_t padY = pad.GetIndices().GetSecond(); | |
288 | Int_t iCath = AliMpDEManager::GetCathod(detElemId,seg->PlaneType()); | |
289 | ||
290 | // storing into digits | |
291 | digit->SetPadX(padX); | |
292 | digit->SetPadY(padY); | |
293 | digit->SetCathode(iCath); | |
294 | digit->SetDetElemId(detElemId); | |
295 | digit->SetElectronics(manuId,channelId); | |
296 | ||
297 | AliDebug(3,Form("detElemId: %d, busPatchId %d, manuId: %d, channelId: %d, padx: %d pady %d\n", | |
298 | detElemId, busPatchId, manuId, channelId, padX, padY)); | |
6159fc91 | 299 | // StdoutToAliDebug(3,digit->Print();); |
a3283a4c | 300 | |
301 | fMappingTimer.Stop(); | |
302 | return kFALSE; | |
303 | } | |
304 | ||
305 | //____________________________________________________________________ | |
306 | Int_t AliMUONDigitMaker::ReadTriggerDDL(AliRawReader* rawReader) | |
307 | { | |
9265505b | 308 | /// reading tracker DDL |
309 | /// filling the TClonesArray in MUONData | |
a3283a4c | 310 | |
311 | AliMUONDDLTrigger* ddlTrigger = 0x0; | |
312 | AliMUONDarcHeader* darcHeader = 0x0; | |
313 | AliMUONRegHeader* regHeader = 0x0; | |
314 | AliMUONLocalStruct* localStruct = 0x0; | |
315 | ||
316 | Int_t loCircuit; | |
d2d759cf | 317 | TList digitList; |
318 | ||
a3283a4c | 319 | |
320 | fTriggerTimer.Start(kFALSE); | |
321 | ||
322 | fRawStreamTrigger->SetReader(rawReader); | |
323 | ||
324 | while(fRawStreamTrigger->NextDDL()) { | |
325 | ||
326 | ddlTrigger = fRawStreamTrigger->GetDDLTrigger(); | |
327 | darcHeader = ddlTrigger->GetDarcHeader(); | |
328 | ||
d2d759cf | 329 | // fill global trigger information in Digit Tree |
330 | if (fDigitFlag) { | |
331 | if (darcHeader->GetGlobalFlag()) { | |
332 | fGlobalTrigger->SetFromGlobalResponse(darcHeader->GetGlobalOutput()); | |
333 | fMUONData->AddGlobalTrigger(*fGlobalTrigger); | |
334 | } | |
a3283a4c | 335 | } |
336 | ||
337 | Int_t nReg = darcHeader->GetRegHeaderEntries(); | |
338 | ||
339 | for(Int_t iReg = 0; iReg < nReg ;iReg++){ //reg loop | |
340 | ||
fe5010dd | 341 | // crate info |
342 | if (!fCrateManager) AliFatal("Crate Store not defined"); | |
aa6ecf89 | 343 | AliMUONTriggerCrate* crate = fCrateManager->Crate(fRawStreamTrigger->GetDDL(), iReg); |
d53fb0de | 344 | |
345 | if (!crate) | |
346 | AliWarning(Form("Missing crate number %d in DDL %d\n", iReg, fRawStreamTrigger->GetDDL())); | |
347 | ||
348 | TObjArray *boards = crate->Boards(); | |
349 | ||
350 | ||
a3283a4c | 351 | regHeader = darcHeader->GetRegHeaderEntry(iReg); |
352 | ||
353 | Int_t nLocal = regHeader->GetLocalEntries(); | |
a3283a4c | 354 | for(Int_t iLocal = 0; iLocal < nLocal; iLocal++) { |
355 | ||
356 | localStruct = regHeader->GetLocalEntry(iLocal); | |
357 | ||
5a92f8e6 | 358 | // if card exist |
359 | if (localStruct) { | |
d2d759cf | 360 | |
d53fb0de | 361 | AliMUONLocalTriggerBoard* localBoard = |
362 | (AliMUONLocalTriggerBoard*)boards->At(localStruct->GetId()+1); | |
363 | ||
5a92f8e6 | 364 | // skip copy cards |
365 | if( !(loCircuit = localBoard->GetNumber()) ) | |
366 | continue; | |
d2d759cf | 367 | |
368 | if (fDigitFlag) { | |
369 | // fill local trigger | |
370 | fLocalTrigger->SetLocalStruct(loCircuit, *localStruct); | |
371 | ||
372 | fMUONData->AddLocalTrigger(*fLocalTrigger); | |
373 | ||
374 | } else { | |
375 | // Make SDigit | |
376 | ||
377 | digitList.Clear(); | |
a3283a4c | 378 | |
d2d759cf | 379 | if( TriggerDigits(localBoard, localStruct, digitList) ) { |
380 | ||
381 | for (Int_t iEntry = 0; iEntry < digitList.GetEntries(); iEntry++) { | |
382 | ||
383 | AliMUONDigit* digit = (AliMUONDigit*)digitList.At(iEntry); | |
384 | ||
385 | // filling S container | |
66f4c572 | 386 | Int_t iChamber = AliMpDEManager::GetChamberId(digit->DetElemId()); |
d2d759cf | 387 | fMUONData->AddSDigit(iChamber, *digit); |
388 | ||
389 | } | |
390 | ||
391 | } // trigger digits | |
392 | } // S flag | |
a3283a4c | 393 | |
a3283a4c | 394 | } // if triggerY |
395 | } // iLocal | |
396 | } // iReg | |
397 | } // NextDDL | |
398 | ||
399 | fTriggerTimer.Stop(); | |
400 | ||
401 | return kTRUE; | |
402 | ||
403 | } | |
d2d759cf | 404 | //____________________________________________________________________ |
405 | void AliMUONDigitMaker::GetTriggerChamber(AliMUONLocalStruct* localStruct, Int_t& xyPattern, | |
406 | Int_t& iChamber, Int_t& iCath, Int_t icase) | |
407 | { | |
9265505b | 408 | /// get chamber & cathode number, (chamber starts at 0 !) |
a3283a4c | 409 | |
d2d759cf | 410 | switch(icase) { |
411 | case 0: | |
412 | xyPattern = localStruct->GetX1(); | |
413 | iCath = 0; | |
8c51a32f | 414 | iChamber = 10; |
d2d759cf | 415 | break; |
416 | case 1: | |
417 | xyPattern = localStruct->GetX2(); | |
418 | iCath = 0; | |
8c51a32f | 419 | iChamber = 11; |
d2d759cf | 420 | break; |
421 | case 2: | |
422 | xyPattern = localStruct->GetX3(); | |
423 | iCath = 0; | |
8c51a32f | 424 | iChamber = 12; |
d2d759cf | 425 | break; |
426 | case 3: | |
427 | xyPattern = localStruct->GetX4(); | |
428 | iCath = 0; | |
8c51a32f | 429 | iChamber = 13; |
d2d759cf | 430 | break; |
431 | case 4: | |
432 | xyPattern = localStruct->GetY1(); | |
433 | iCath = 1; | |
8c51a32f | 434 | iChamber = 10; |
d2d759cf | 435 | break; |
436 | case 5: | |
437 | xyPattern = localStruct->GetY2(); | |
438 | iCath = 1; | |
8c51a32f | 439 | iChamber = 11; |
d2d759cf | 440 | break; |
441 | case 6: | |
442 | xyPattern = localStruct->GetY3(); | |
443 | iCath = 1; | |
8c51a32f | 444 | iChamber = 12; |
d2d759cf | 445 | break; |
446 | case 7: | |
447 | xyPattern = localStruct->GetY4(); | |
448 | iCath = 1; | |
8c51a32f | 449 | iChamber = 13; |
d2d759cf | 450 | break; |
451 | } | |
452 | } | |
453 | //____________________________________________________________________ | |
454 | Int_t AliMUONDigitMaker::TriggerDigits(AliMUONLocalTriggerBoard* localBoard, | |
455 | AliMUONLocalStruct* localStruct, | |
456 | TList& digitList) | |
457 | { | |
9265505b | 458 | /// make (S)Digit for trigger |
d2d759cf | 459 | |
460 | Int_t detElemId; | |
461 | Int_t nBoard; | |
462 | Int_t iCath = -1; | |
463 | Int_t iChamber = 0; | |
464 | Int_t xyPattern = 0; | |
465 | ||
466 | // loop over x1-4 and y1-4 | |
467 | for (Int_t icase = 0; icase < 8; icase++) { | |
468 | ||
469 | // get chamber, cathode and associated trigger response pattern | |
470 | GetTriggerChamber(localStruct, xyPattern, iChamber, iCath, icase); | |
471 | ||
472 | if (!xyPattern) continue; | |
473 | ||
474 | // get detElemId | |
e1a10d41 | 475 | AliMUONTriggerCircuit triggerCircuit; |
d2d759cf | 476 | detElemId = triggerCircuit.DetElemId(iChamber, localBoard->GetName()); |
477 | nBoard = localBoard->GetNumber(); | |
478 | ||
9265505b | 479 | const AliMpVSegmentation* seg |
e5ced899 | 480 | = AliMpSegmentation::Instance() |
481 | ->GetMpSegmentation(detElemId, AliMp::GetCathodType(iCath)); | |
d2d759cf | 482 | |
483 | // loop over the 16 bits of pattern | |
484 | for (Int_t ibitxy = 0; ibitxy < 16; ibitxy++) { | |
485 | ||
486 | if ((xyPattern >> ibitxy) & 0x1) { | |
487 | ||
488 | // not quite sure about this | |
489 | Int_t offset = 0; | |
490 | if (iCath && localBoard->GetSwitch(6)) offset = -8; | |
491 | ||
492 | AliMpPad pad = seg->PadByLocation(AliMpIntPair(nBoard,ibitxy+offset),kTRUE); | |
493 | ||
494 | AliMUONDigit* digit = new AliMUONDigit(); | |
495 | if (!pad.IsValid()) { | |
496 | AliWarning(Form("No pad for detElemId: %d, nboard %d, ibitxy: %d\n", | |
497 | detElemId, nBoard, ibitxy)); | |
498 | continue; | |
499 | } // | |
500 | ||
501 | Int_t padX = pad.GetIndices().GetFirst(); | |
502 | Int_t padY = pad.GetIndices().GetSecond(); | |
503 | ||
504 | // file digit | |
505 | digit->SetPadX(padX); | |
506 | digit->SetPadY(padY); | |
507 | digit->SetCathode(iCath); | |
508 | digit->SetDetElemId(detElemId); | |
509 | digit->SetElectronics(nBoard, ibitxy); | |
510 | digitList.Add(digit); | |
511 | ||
512 | }// xyPattern | |
513 | }// ibitxy | |
514 | }// case | |
515 | ||
516 | return kTRUE; | |
517 | } | |
d53fb0de | 518 | //____________________________________________________________________ |
00e86732 | 519 | void AliMUONDigitMaker::GetCrateName(Char_t* name, Int_t iDDL, Int_t iReg) const |
d53fb0de | 520 | { |
9265505b | 521 | /// set crate name from DDL & reg number |
522 | /// method same as in RawWriter, not so nice | |
523 | /// should be put in AliMUONTriggerCrateStore | |
d53fb0de | 524 | |
525 | switch(iReg) { | |
526 | case 0: | |
527 | case 1: | |
528 | sprintf(name,"%d", iReg+1); | |
529 | break; | |
530 | case 2: | |
531 | strcpy(name, "2-3"); | |
532 | break; | |
533 | case 3: | |
534 | case 4: | |
535 | case 5: | |
536 | case 6: | |
537 | case 7: | |
538 | sprintf(name,"%d", iReg); | |
539 | break; | |
540 | } | |
541 | ||
542 | // crate Right for first DDL | |
543 | if (iDDL == 0) | |
544 | strcat(name, "R"); | |
545 | else | |
546 | strcat(name, "L"); | |
547 | } |