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