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 ///////////////////////////////////////////////////////////////////////////////
20 /// This class provides access to PMD digits in raw data.
22 /// It loops over all PMD digits in the raw data given by the AliRawReader.
23 /// The Next method goes to the next digit. If there are no digits left
24 /// it returns kFALSE.
25 /// Several getters provide information about the current digit.
27 ///////////////////////////////////////////////////////////////////////////////
29 #include <Riostream.h>
30 #include <TObjArray.h>
35 #include "AliPMDBlockHeader.h"
36 #include "AliPMDDspHeader.h"
37 #include "AliPMDPatchBusHeader.h"
38 #include "AliPMDddldata.h"
39 #include "AliPMDRawStream.h"
40 #include "AliRawReader.h"
42 ClassImp(AliPMDRawStream)
45 //_____________________________________________________________________________
46 AliPMDRawStream::AliPMDRawStream(AliRawReader* rawReader) :
47 fRawReader(rawReader),
51 // create an object to read PMD raw digits
54 fRawReader->Select("PMD");
57 //_____________________________________________________________________________
58 AliPMDRawStream::AliPMDRawStream(const AliPMDRawStream& stream) :
66 AliFatal("Copy constructor not implemented");
69 //_____________________________________________________________________________
70 AliPMDRawStream& AliPMDRawStream::operator = (const AliPMDRawStream&
73 // assignment operator
75 AliFatal("operator = assignment operator not implemented");
79 //_____________________________________________________________________________
80 AliPMDRawStream::~AliPMDRawStream()
87 //_____________________________________________________________________________
89 Int_t AliPMDRawStream::DdlData(TObjArray *pmdddlcont)
91 // read the next raw digit
92 // returns kFALSE if there is no digit left
98 AliPMDddldata *pmdddldata;
100 if (!fRawReader->ReadHeader()) return iddl;
102 iddl = fRawReader->GetDDLID();
103 Int_t dataSize = fRawReader->GetDataSize();
104 Int_t totaldataword = dataSize/4;
106 if (dataSize <= 0) return -1;
110 fRawReader->ReadNextData(fData);
117 const Int_t kNPatchBus = 51;
119 Int_t moduleNo[kNPatchBus], mcmperBus[kNPatchBus];
120 Int_t startRowBus[kNPatchBus], endRowBus[kNPatchBus];
121 Int_t startColBus[kNPatchBus], endColBus[kNPatchBus];
123 for (ibus = 0; ibus < kNPatchBus; ibus++)
126 mcmperBus[ibus] = -1;
127 startRowBus[ibus] = -1;
128 endRowBus[ibus] = -1;
129 startColBus[ibus] = -1;
130 endColBus[ibus] = -1;
133 // Call the Mapping methods - hard coded
138 Ddl0Mapping(moduleNo, mcmperBus, startRowBus,
139 endRowBus, startColBus, endColBus);
143 Ddl1Mapping(moduleNo, mcmperBus, startRowBus,
144 endRowBus, startColBus, endColBus);
148 Ddl2Mapping(moduleNo, mcmperBus, startRowBus,
149 endRowBus, startColBus, endColBus);
153 Ddl3Mapping(moduleNo, mcmperBus, startRowBus,
154 endRowBus, startColBus, endColBus);
158 Ddl4Mapping(moduleNo, mcmperBus, startRowBus,
159 endRowBus, startColBus, endColBus);
163 Ddl5Mapping(moduleNo, mcmperBus, startRowBus,
164 endRowBus, startColBus, endColBus);
168 AliPMDBlockHeader blockHeader;
169 AliPMDDspHeader dspHeader;
170 AliPMDPatchBusHeader pbusHeader;
172 const Int_t kblHLen = blockHeader.GetHeaderLength();
173 const Int_t kdspHLen = dspHeader.GetHeaderLength();
174 const Int_t kpbusHLen = pbusHeader.GetHeaderLength();
181 Int_t blHeaderWord[8];
182 Int_t dspHeaderWord[10];
183 Int_t pbusHeaderWord[4];
187 Int_t blRawDataLength = 0;
188 Int_t dspRawDataLength = 0;
193 for (Int_t iblock = 0; iblock < 2; iblock++)
195 ilowLimit = iuppLimit;
196 iuppLimit = ilowLimit + kblHLen;
198 for (Int_t i = ilowLimit; i < iuppLimit; i++)
202 blHeaderWord[i-ilowLimit] = (Int_t) GetNextWord();
205 blockHeader.SetHeader(blHeaderWord);
206 blRawDataLength = blockHeader.GetRawDataLength();
208 if (iwordddl == totaldataword) continue;
212 for (Int_t idsp = 0; idsp < 5; idsp++)
216 ilowLimit = iuppLimit;
217 iuppLimit = ilowLimit + kdspHLen;
219 for (Int_t i = ilowLimit; i < iuppLimit; i++)
223 dspHeaderWord[i-ilowLimit] = (Int_t) GetNextWord();
225 dspHeader.SetHeader(dspHeaderWord);
226 dspRawDataLength = dspHeader.GetRawDataLength();
228 if (iwordddl == totaldataword) continue;
232 for (ibus = 0; ibus < 5; ibus++)
234 ilowLimit = iuppLimit;
235 iuppLimit = ilowLimit + kpbusHLen;
237 for (Int_t i = ilowLimit; i < iuppLimit; i++)
242 pbusHeaderWord[i-ilowLimit] = (Int_t) GetNextWord();
245 pbusHeader.SetHeader(pbusHeaderWord);
246 Int_t rawdatalength = pbusHeader.GetRawDataLength();
247 Int_t pbusid = pbusHeader.GetPatchBusId();
249 if (pbusid < 0 || pbusid > 50) return -1;
252 ilowLimit = iuppLimit;
253 iuppLimit = ilowLimit + rawdatalength;
255 Int_t imodule = moduleNo[pbusid];
257 if (iwordddl == totaldataword) continue;
259 for (Int_t iword = ilowLimit; iword < iuppLimit; iword++)
265 data = GetNextWord();
267 Int_t isig = data & 0x0FFF;
268 Int_t ich = (data >> 12) & 0x003F;
269 Int_t imcm = (data >> 18) & 0x07FF;
270 Int_t ibit = (data >> 31) & 0x0001;
271 parity = ComputeParity(data);
274 AliWarning(Form("Parity Error:: Patch Bus %d Module %d",pbusid,imodule));
275 fRawReader->AddMajorErrorLog(kParityError);
279 ConvertDDL2SMN(iddl, imodule, ismn, idet);
281 GetRowCol(iddl, ismn, pbusid, imcm, ich,
282 startRowBus, endRowBus,
283 startColBus, endColBus,
286 TransformH2S(ismn, irow, icol);
288 pmdddldata = new AliPMDddldata();
290 pmdddldata->SetDetector(idet);
291 pmdddldata->SetSMN(ismn);
292 pmdddldata->SetModule(imodule);
293 pmdddldata->SetPatchBusId(pbusid);
294 pmdddldata->SetMCM(imcm);
295 pmdddldata->SetChannel(ich);
296 pmdddldata->SetRow(irow);
297 pmdddldata->SetColumn(icol);
298 pmdddldata->SetSignal(isig);
299 pmdddldata->SetParityBit(ibit);
301 pmdddlcont->Add(pmdddldata);
305 if (iwordddl == totaldataword) break;
307 if (iworddsp == dspRawDataLength) break; // raw data
311 if (dspHeader.GetPaddingWord() == 1)
317 data = GetNextWord();
320 if (iwordblk == blRawDataLength) break; // for raw data
330 //_____________________________________________________________________________
331 void AliPMDRawStream::GetRowCol(Int_t ddlno, Int_t smn, Int_t pbusid,
332 UInt_t mcmno, UInt_t chno,
333 Int_t startRowBus[], Int_t endRowBus[],
334 Int_t startColBus[], Int_t endColBus[],
335 Int_t &row, Int_t &col) const
337 // decode: ddlno, patchbusid, mcmno, chno -> um, row, col
341 static const UInt_t kChDdl01[64] = { 9, 6, 5, 10, 1, 2, 0, 3,
342 13, 7, 4, 11, 8, 14, 12, 15,
343 16, 19, 17, 23, 20, 27, 24, 18,
344 28, 31, 29, 30, 21, 26, 25, 22,
345 41, 38, 37, 42, 33, 34, 32, 35,
346 45, 39, 36, 43, 40, 46, 44, 47,
347 48, 51, 49, 55, 52, 59, 56, 50,
348 60, 63, 61, 62, 53, 58, 57, 54 };
350 static const UInt_t kChDdl23[64] = { 54, 57, 58, 53, 62, 61, 63, 60,
351 50, 56, 59, 52, 55, 49, 51, 48,
352 47, 44, 46, 40, 43, 36, 39, 45,
353 35, 32, 34, 33, 42, 37, 38, 41,
354 22, 25, 26, 21, 30, 29, 31, 28,
355 18, 24, 27, 20, 23, 17, 19, 16,
356 15, 12, 14, 8, 11, 4, 7, 13,
357 3, 0, 2, 1, 10, 5, 6, 9 };
359 static const UInt_t kChDdl41[64] = { 53, 58, 57, 54, 61, 62, 60, 63,
360 49, 59, 56, 55, 52, 50, 48, 51,
361 44, 47, 45, 43, 40, 39, 36, 46,
362 32, 35, 33, 34, 41, 38, 37, 42,
363 21, 26, 25, 22, 29, 30, 28, 31,
364 17, 27, 24, 23, 20, 18, 16, 19,
365 12, 15, 13, 11, 8, 7, 4, 14,
366 0, 3, 1, 2, 9, 6, 5, 10 };
368 static const UInt_t kChDdl42[64] = { 10, 5, 6, 9, 2, 1, 3, 0,
369 14, 4, 7, 8, 11, 13, 15, 12,
370 19, 16, 18, 20, 23, 24, 27, 17,
371 31, 28, 30, 29, 22, 25, 26, 21,
372 42, 37, 38, 41, 34, 33, 35, 32,
373 46, 36, 39, 40, 43, 45, 47, 44,
374 51, 48, 50, 52, 55, 56, 59, 49,
375 63, 60, 62, 61, 54, 57, 58, 53 };
377 static const UInt_t kChDdl51[64] = { 10, 5, 6, 9, 2, 1, 3, 0,
378 14, 4, 7, 8, 11, 13, 15, 12,
379 19, 16, 18, 20, 23, 24, 27, 17,
380 31, 28, 30, 29, 22, 25, 26, 21,
381 42, 37, 38, 41, 34, 33, 35, 32,
382 46, 36, 39, 40, 43, 45, 47, 44,
383 51, 48, 50, 52, 55, 56, 59, 49,
384 63, 60, 62, 61, 54, 57, 58, 53 };
386 static const UInt_t kChDdl52[64] = { 53, 58, 57, 54, 61, 62, 60, 63,
387 49, 59, 56, 55, 52, 50, 48, 51,
388 44, 47, 45, 43, 40, 39, 36, 46,
389 32, 35, 33, 34, 41, 38, 37, 42,
390 21, 26, 25, 22, 29, 30, 28, 31,
391 17, 27, 24, 23, 20, 18, 16, 19,
392 12, 15, 13, 11, 8, 7, 4, 14,
393 0, 3, 1, 2, 9, 6, 5, 10 };
395 for (Int_t i = 0; i < 64; i++)
397 if (ddlno == 0 || ddlno == 1) iCh[i] = kChDdl01[i];
398 if (ddlno == 2 || ddlno == 3) iCh[i] = kChDdl23[i];
400 if (ddlno == 4 && smn < 6) iCh[i] = kChDdl41[i];
401 if (ddlno == 4 && (smn >= 18 && smn < 24))iCh[i] = kChDdl42[i];
402 if (ddlno == 5 && (smn >= 12 && smn < 18))iCh[i] = kChDdl51[i];
403 if (ddlno == 5 && (smn >= 6 && smn < 12))iCh[i] = kChDdl52[i];
407 Int_t rowcol = iCh[chno];
408 Int_t irownew = rowcol/4;
409 Int_t icolnew = rowcol%4;
413 row = startRowBus[pbusid] + irownew;
414 col = startColBus[pbusid] + (mcmno-1)*4 + icolnew;
418 row = endRowBus[pbusid] - (15 - irownew);
419 col = startColBus[pbusid] + (mcmno-1)*4 + icolnew;
422 else if (ddlno == 2 )
424 row = startRowBus[pbusid] + irownew;
425 col = endColBus[pbusid] - (mcmno-1)*4 - (3 - icolnew);
429 row = endRowBus[pbusid] - (15 - irownew);
430 col = endColBus[pbusid] - (mcmno-1)*4 - (3 - icolnew);
432 else if (ddlno == 4 )
438 // Add 16 to skip the 1st 15 rows
439 row = startRowBus[pbusid] + irownew + 16;
440 col = startColBus[pbusid] + (mcmno-1)*4 + icolnew;
444 row = startRowBus[pbusid] + irownew;
445 col = startColBus[pbusid] + (mcmno-12-1)*4 + icolnew;
452 col = endColBus[pbusid] - (mcmno-1)*4 - (3 - icolnew);
454 if(endRowBus[pbusid] - startRowBus[pbusid] > 16)
455 row = endRowBus[pbusid] - (15 - irownew) - 16 ;
457 row = endRowBus[pbusid] - (15 - irownew) ;
461 row = endRowBus[pbusid] - (15 - irownew) ;
462 col = endColBus[pbusid] - (mcmno - 12 - 1)*4 - (3 - icolnew);
472 // Subtract 16 to skip the 1st 15 rows
473 row = endRowBus[pbusid] - 16 -(15 - irownew);
474 col = startColBus[pbusid] + (mcmno-12 -1)*4 + icolnew;
478 row = endRowBus[pbusid] - (15 - irownew) ;
479 col = startColBus[pbusid] + (mcmno -1)*4 + icolnew;
484 else if (pbusid > 18)
488 // Add 16 to skip the 1st 15 rows
489 row = startRowBus[pbusid] + irownew + 16;
490 col = endColBus[pbusid] - (mcmno - 12 - 1)*4 - (3 - icolnew);
494 row = startRowBus[pbusid] + irownew ;
495 col = endColBus[pbusid] - (mcmno - 1)*4 - (3 - icolnew);
501 //_____________________________________________________________________________
502 void AliPMDRawStream::ConvertDDL2SMN(Int_t iddl, Int_t imodule,
503 Int_t &smn, Int_t &detector) const
505 // This converts the DDL number (0 to 5), Module Number (0-47)
506 // to Serial module number in one detector (SMN : 0-23) and
507 // detector number (0:PRE plane, 1:CPV plane)
519 //_____________________________________________________________________________
521 void AliPMDRawStream::TransformH2S(Int_t smn, Int_t &row, Int_t &col) const
523 // This does the transformation of the hardware coordinate to
525 // i.e., For SuperModule 0 &1, instead of 96x48(hardware),
526 // it is 48x96 (software)
527 // For Supermodule 3 & 4, 48x96
537 else if(smn >= 12 && smn < 24)
546 //_____________________________________________________________________________
547 Int_t AliPMDRawStream::ComputeParity(UInt_t data)
549 // Calculate the parity bit
552 for(Int_t j = 0; j<29; j++)
554 if (data & 0x01 ) count++;
558 Int_t parity = count%2;
563 //_____________________________________________________________________________
564 UInt_t AliPMDRawStream::GetNextWord()
566 // Returns the next 32 bit word
567 // inside the raw data payload.
569 if (!fData || fPosition < 0) AliFatal("Raw data payload buffer is not yet initialized !");
572 word |= fData[fPosition++];
573 word |= fData[fPosition++] << 8;
574 word |= fData[fPosition++] << 16;
575 word |= fData[fPosition++] << 24;
580 //_____________________________________________________________________________
581 void AliPMDRawStream::Ddl0Mapping(Int_t moduleNo[], Int_t mcmperBus[],
582 Int_t startRowBus[], Int_t endRowBus[],
583 Int_t startColBus[], Int_t endColBus[])
587 const Int_t ktotpbus = 36;
588 static const Int_t modno0[ktotpbus] = {0, 0, 0, 0, 0, 0,
597 static const Int_t srbus0[ktotpbus] = {0, 16, 32, 48, 64, 80,
598 0, 16, 32, 48, 64, 80,
599 0, 16, 32, 48, 64, 80,
600 0, 16, 32, 48, 64, 80,
601 0, 16, 32, 48, 64, 80,
602 0, 16, 32, 48, 64, 80};
606 static const Int_t erbus0[ktotpbus] = {15, 31, 47, 63, 79, 95,
607 15, 31, 47, 63, 79, 95,
608 15, 31, 47, 63, 79, 95,
609 15, 31, 47, 63, 79, 95,
610 15, 31, 47, 63, 79, 95,
611 15, 31, 47, 63, 79, 95};
614 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
616 moduleNo[ibus] = modno0[ibus-1];
617 mcmperBus[ibus] = 12;
618 startRowBus[ibus] = srbus0[ibus-1];
619 endRowBus[ibus] = erbus0[ibus-1];
620 startColBus[ibus] = 0;
621 endColBus[ibus] = 47;
626 //_____________________________________________________________________________
627 void AliPMDRawStream::Ddl1Mapping(Int_t moduleNo[], Int_t mcmperBus[],
628 Int_t startRowBus[], Int_t endRowBus[],
629 Int_t startColBus[], Int_t endColBus[])
633 const Int_t ktotpbus = 36;
634 static const Int_t kmodno1[ktotpbus] = {6, 6, 6, 6, 6, 6,
638 10, 10, 10, 10, 10, 10,
639 11, 11, 11, 11, 11, 11};
642 static const Int_t ksrbus1[ktotpbus] = {0, 16, 32, 48, 64, 80,
643 0, 16, 32, 48, 64, 80,
644 0, 16, 32, 48, 64, 80,
645 0, 16, 32, 48, 64, 80,
646 0, 16, 32, 48, 64, 80,
647 0, 16, 32, 48, 64, 80};
651 static const Int_t kerbus1[ktotpbus] = {15, 31, 47, 63, 79, 95,
652 15, 31, 47, 63, 79, 95,
653 15, 31, 47, 63, 79, 95,
654 15, 31, 47, 63, 79, 95,
655 15, 31, 47, 63, 79, 95,
656 15, 31, 47, 63, 79, 95};
659 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
661 moduleNo[ibus] = kmodno1[ibus-1];
662 mcmperBus[ibus] = 12;
663 startRowBus[ibus] = ksrbus1[ibus-1];
664 endRowBus[ibus] = kerbus1[ibus-1];
665 startColBus[ibus] = 0;
666 endColBus[ibus] = 47;
671 //_____________________________________________________________________________
672 void AliPMDRawStream::Ddl2Mapping(Int_t moduleNo[], Int_t mcmperBus[],
673 Int_t startRowBus[], Int_t endRowBus[],
674 Int_t startColBus[], Int_t endColBus[])
678 const Int_t ktotpbus = 36;
679 static const Int_t kmodno2[ktotpbus] = {12, 12, 12, 12, 12, 12,
680 13, 13, 13, 13, 13, 13,
681 14, 14, 14, 14, 14, 14,
682 15, 15, 15, 15, 15, 15,
683 16, 16, 16, 16, 16, 16,
684 17, 17, 17, 17, 17, 17};
686 static const Int_t ksrbus2[ktotpbus] = {32, 32, 16, 16, 0, 0,
687 32, 32, 16, 16, 0, 0,
688 32, 32, 16, 16, 0, 0,
689 32, 32, 16, 16, 0, 0,
690 32, 32, 16, 16, 0, 0,
691 32, 32, 16, 16, 0, 0};
694 static const Int_t kerbus2[ktotpbus] = {47, 47, 31, 31, 15, 15,
695 47, 47, 31, 31, 15, 15,
696 47, 47, 31, 31, 15, 15,
697 47, 47, 31, 31, 15, 15,
698 47, 47, 31, 31, 15, 15,
699 47, 47, 31, 31, 15, 15};
701 static const Int_t kscbus2[ktotpbus] = {48, 0, 48, 0, 48, 0,
706 48, 0, 48, 0, 48, 0};
708 static const Int_t kecbus2[ktotpbus] = {95, 47, 95, 47, 95, 47,
709 95, 47, 95, 47, 95, 47,
710 95, 47, 95, 47, 95, 47,
711 95, 47, 95, 47, 95, 47,
712 95, 47, 95, 47, 95, 47,
713 95, 47, 95, 47, 95, 47};
717 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
719 moduleNo[ibus] = kmodno2[ibus-1];
720 mcmperBus[ibus] = 12;
721 startRowBus[ibus] = ksrbus2[ibus-1];
722 endRowBus[ibus] = kerbus2[ibus-1];
723 startColBus[ibus] = kscbus2[ibus-1];
724 endColBus[ibus] = kecbus2[ibus-1];
729 //_____________________________________________________________________________
730 void AliPMDRawStream::Ddl3Mapping(Int_t moduleNo[], Int_t mcmperBus[],
731 Int_t startRowBus[], Int_t endRowBus[],
732 Int_t startColBus[], Int_t endColBus[])
736 const Int_t ktotpbus = 36;
737 static const Int_t kmodno3[ktotpbus] = {18, 18, 18, 18, 18, 18,
738 19, 19, 19, 19, 19, 19,
739 20, 20, 20, 20, 20, 20,
740 21, 21, 21, 21, 21, 21,
741 22, 22, 22, 22, 22, 22,
742 23, 23, 23, 23, 23, 23};
746 static const Int_t ksrbus3[ktotpbus] = {32, 32, 16, 16, 0, 0,
747 32, 32, 16, 16, 0, 0,
748 32, 32, 16, 16, 0, 0,
749 32, 32, 16, 16, 0, 0,
750 32, 32, 16, 16, 0, 0,
751 32, 32, 16, 16, 0, 0};
754 static const Int_t kerbus3[ktotpbus] = {47, 47, 31, 31, 15, 15,
755 47, 47, 31, 31, 15, 15,
756 47, 47, 31, 31, 15, 15,
757 47, 47, 31, 31, 15, 15,
758 47, 47, 31, 31, 15, 15,
759 47, 47, 31, 31, 15, 15};
761 static const Int_t kscbus3[ktotpbus] = {48, 0, 48, 0, 48, 0,
766 48, 0, 48, 0, 48, 0};
768 static const Int_t kecbus3[ktotpbus] = {95, 47, 95, 47, 95, 47,
769 95, 47, 95, 47, 95, 47,
770 95, 47, 95, 47, 95, 47,
771 95, 47, 95, 47, 95, 47,
772 95, 47, 95, 47, 95, 47,
773 95, 47, 95, 47, 95, 47};
775 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
777 moduleNo[ibus] = kmodno3[ibus-1];
778 mcmperBus[ibus] = 12;
779 startRowBus[ibus] = ksrbus3[ibus-1];
780 endRowBus[ibus] = kerbus3[ibus-1];
781 startColBus[ibus] = kscbus3[ibus-1];
782 endColBus[ibus] = kecbus3[ibus-1];
787 //_____________________________________________________________________________
788 void AliPMDRawStream::Ddl4Mapping(Int_t moduleNo[], Int_t mcmperBus[],
789 Int_t startRowBus[], Int_t endRowBus[],
790 Int_t startColBus[], Int_t endColBus[])
794 const Int_t ktotpbus = 42;
795 static const Int_t kmodno4[ktotpbus] = {24, 24, 24, 25, 25, 25,
796 26, 26, 26, 27, 27, 27,
797 28, 28, 28, 29, 29, 29,
798 42, 42, 42, 42, 43, 43, 43, 43,
799 44, 44, 44, 44, 45, 45, 45, 45,
800 46, 46, 46, 46, 47, 47, 47, 47};
803 static const Int_t kmcbus4[ktotpbus] = {24, 24, 24, 24, 24, 24,
804 24, 24, 24, 24, 24, 24,
805 24, 24, 24, 24, 24, 24,
806 12, 12, 24, 24, 12, 12, 24, 24,
807 12, 12, 24, 24, 12, 12, 24, 24,
808 12, 12, 24, 24, 12, 12, 24, 24};
811 static const Int_t ksrbus4[ktotpbus] = {0, 32, 64, 0, 32, 64,
812 0, 32, 64, 0, 32, 64,
813 0, 32, 64, 0, 32, 64,
814 32, 32, 0, 0, 32, 32, 0, 0,
815 32, 32, 0, 0, 32, 32, 0, 0,
816 32, 32, 0, 0, 32, 32, 0, 0};
821 static const Int_t kerbus4[ktotpbus] = {31, 63, 95, 31, 63, 95,
822 31, 63, 95, 31, 63, 95,
823 31, 63, 95, 31, 63, 95,
824 47, 47, 31, 31, 47, 47, 31, 31,
825 47, 47, 31, 31, 47, 47, 31, 31,
826 47, 47, 31, 31, 47, 47, 31, 31};
830 static const Int_t kscbus4[ktotpbus] = {0, 0, 0, 0, 0, 0,
833 48, 0, 48, 0, 48, 0, 48, 0,
834 48, 0, 48, 0, 48, 0, 48, 0,
835 48, 0, 48, 0, 48, 0, 48, 0};
839 static const Int_t kecbus4[ktotpbus] = {47, 47, 47, 47, 47, 47,
840 47, 47, 47, 47, 47, 47,
841 47, 47, 47, 47, 47, 47,
842 95, 47, 95, 47, 95, 47, 95, 47,
843 95, 47, 95, 47, 95, 47, 95, 47,
844 95, 47, 95, 47, 95, 47, 95, 47};
847 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
849 moduleNo[ibus] = kmodno4[ibus-1];
850 mcmperBus[ibus] = kmcbus4[ibus-1];
851 startRowBus[ibus] = ksrbus4[ibus-1];
852 endRowBus[ibus] = kerbus4[ibus-1];
853 startColBus[ibus] = kscbus4[ibus-1];
854 endColBus[ibus] = kecbus4[ibus-1];
859 //_____________________________________________________________________________
860 void AliPMDRawStream::Ddl5Mapping(Int_t moduleNo[], Int_t mcmperBus[],
861 Int_t startRowBus[], Int_t endRowBus[],
862 Int_t startColBus[], Int_t endColBus[])
866 const Int_t ktotpbus = 42;
867 static const Int_t kmodno5[ktotpbus] = {30, 30, 30, 31, 31, 31,
868 32, 32, 32, 33, 33, 33,
869 34, 34, 34, 35, 35, 35,
870 36, 36, 36, 36, 37, 37, 37, 37,
871 38, 38, 38, 38, 39, 39, 39, 39,
872 40, 40, 40, 40, 41, 41, 41, 41};
875 static const Int_t kmcbus5[ktotpbus] = {24, 24, 24, 24, 24, 24,
876 24, 24, 24, 24, 24, 24,
877 24, 24, 24, 24, 24, 24,
878 12, 12, 24, 24, 12, 12, 24, 24,
879 12, 12, 24, 24, 12, 12, 24, 24,
880 12, 12, 24, 24, 12, 12, 24, 24};
884 static const Int_t ksrbus5[ktotpbus] = {0, 32, 64, 0, 32, 64,
885 0, 32, 64, 0, 32, 64,
886 0, 32, 64, 0, 32, 64,
887 32, 32, 0, 0, 32, 32, 0, 0,
888 32, 32, 0, 0, 32, 32, 0, 0,
889 32, 32, 0, 0, 32, 32, 0, 0};
894 static const Int_t kerbus5[ktotpbus] = {31, 63, 95, 31, 63, 95,
895 31, 63, 95, 31, 63, 95,
896 31, 63, 95, 31, 63, 95,
897 47, 47, 31, 31, 47, 47, 31, 31,
898 47, 47, 31, 31, 47, 47, 31, 31,
899 47, 47, 31, 31, 47, 47, 31, 31};
903 static const Int_t kscbus5[ktotpbus] = {0, 0, 0, 0, 0, 0,
906 48, 0, 48, 0, 48, 0, 48, 0,
907 48, 0, 48, 0, 48, 0, 48, 0,
908 48, 0, 48, 0, 48, 0, 48, 0};
912 static const Int_t kecbus5[ktotpbus] = {47, 47, 47, 47, 47, 47,
913 47, 47, 47, 47, 47, 47,
914 47, 47, 47, 47, 47, 47,
915 95, 47, 95, 47, 95, 47, 95, 47,
916 95, 47, 95, 47, 95, 47, 95, 47,
917 95, 47, 95, 47, 95, 47, 95, 47};
920 for (Int_t ibus = 1; ibus <= ktotpbus; ibus++)
922 moduleNo[ibus] = kmodno5[ibus-1];
923 mcmperBus[ibus] = kmcbus5[ibus-1];
924 startRowBus[ibus] = ksrbus5[ibus-1];
925 endRowBus[ibus] = kerbus5[ibus-1];
926 startColBus[ibus] = kscbus5[ibus-1];
927 endColBus[ibus] = kecbus5[ibus-1];