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 **************************************************************************/
16 ////////////////////////////////////////////////////////////////////////////
18 // Decoding data from the TRD raw stream //
19 // and translation into ADC values //
21 // Author: J. Klein (jochen.klein@cern.ch) //
23 ////////////////////////////////////////////////////////////////////////////
28 #include "TClonesArray.h"
32 #include "AliRawReader.h"
33 #include "AliTRDdigitsManager.h"
34 #include "AliTRDdigitsParam.h"
35 #include "AliTRDtrapConfig.h"
36 #include "AliTRDarrayADC.h"
37 #include "AliTRDarrayDictionary.h"
38 #include "AliTRDSignalIndex.h"
39 #include "AliTRDtrackletWord.h"
40 #include "AliESDTrdTrack.h"
41 #include "AliTreeLoader.h"
43 #include "AliTRDrawStream.h"
46 #include "AliRunLoader.h"
48 ClassImp(AliTRDrawStream)
50 // some static information
51 const Int_t AliTRDrawStream::fgkMcmOrder[] = {12, 13, 14, 15,
55 const Int_t AliTRDrawStream::fgkRobOrder [] = {0, 1, 2, 3};
56 const Int_t AliTRDrawStream::fgkNlinks = 12;
57 const Int_t AliTRDrawStream::fgkNstacks = 5;
58 const UInt_t AliTRDrawStream::fgkDataEndmarker = 0x00000000;
59 const UInt_t AliTRDrawStream::fgkTrackletEndmarker = 0x10001000;
61 const char* AliTRDrawStream::fgErrorMessages[] = {
63 "Link monitor active",
64 "Pretrigger counter mismatch",
65 "not a TRD equipment (1024-1041)",
66 "Invalid Stack header",
67 "Invalid detector number",
68 "No digits could be retrieved from the digitsmanager",
70 "HC check bits wrong",
71 "Unexpected position in readout stream",
72 "Invalid testpattern mode",
73 "Testpattern mismatch",
74 "Number of timebins changed",
75 "ADC mask inconsistent",
76 "ADC check bits invalid",
78 "Missing expected ADC channels",
82 const Int_t AliTRDrawStream::fgErrorDebugLevel[] = {
103 AliTRDrawStream::ErrorBehav_t AliTRDrawStream::fgErrorBehav[] = {
104 AliTRDrawStream::kTolerate,
105 AliTRDrawStream::kDiscardHC,
106 AliTRDrawStream::kTolerate,
107 AliTRDrawStream::kAbort,
108 AliTRDrawStream::kAbort,
109 AliTRDrawStream::kAbort,
110 AliTRDrawStream::kAbort,
111 AliTRDrawStream::kDiscardHC,
112 AliTRDrawStream::kDiscardHC,
113 AliTRDrawStream::kTolerate,
114 AliTRDrawStream::kTolerate,
115 AliTRDrawStream::kTolerate,
116 AliTRDrawStream::kTolerate,
117 AliTRDrawStream::kTolerate,
118 AliTRDrawStream::kTolerate,
119 AliTRDrawStream::kTolerate,
120 AliTRDrawStream::kTolerate,
121 AliTRDrawStream::kTolerate
124 AliTRDrawStream::AliTRDrawStream(AliRawReader *rawReader) :
126 fStoreError(&AliTRDrawStream::StoreErrorTree),
127 fRawReader(rawReader),
143 fCurrSmuIndexHeaderSize(0),
144 fCurrSmuIndexHeaderVersion(0),
146 fCurrTrackletEnable(0),
148 fCurrStackIndexWord(0x0),
149 fCurrStackHeaderSize(0x0),
150 fCurrStackHeaderVersion(0x0),
152 fCurrCleanCheckout(0x0),
155 fCurrLinkMonitorFlags(0x0),
156 fCurrLinkDataTypeFlags(0x0),
157 fCurrLinkDebugFlags(0x0),
181 // default constructor
183 fCurrStackIndexWord = new UInt_t[fgkNstacks];
184 fCurrStackHeaderSize = new UInt_t[fgkNstacks];
185 fCurrStackHeaderVersion = new UInt_t[fgkNstacks];
186 fCurrLinkMask = new UInt_t[fgkNstacks];
187 fCurrCleanCheckout = new UInt_t[fgkNstacks];
188 fCurrBoardId = new UInt_t[fgkNstacks];
189 fCurrHwRev = new UInt_t[fgkNstacks];
190 fCurrLinkMonitorFlags = new UInt_t[fgkNstacks * fgkNlinks];
191 fCurrLinkDataTypeFlags = new UInt_t[fgkNstacks * fgkNlinks];
192 fCurrLinkDebugFlags = new UInt_t[fgkNstacks * fgkNlinks];
193 for (Int_t i = 0; i < 100; i++)
196 // preparing TClonesArray
197 fTrackletArray = new TClonesArray("AliTRDtrackletWord", 256);
199 // setting up the error tree
200 fErrors = new TTree("errorStats", "Error statistics");
201 fErrors->SetDirectory(0x0);
202 fErrors->Branch("error", &fLastError);
203 fErrors->SetCircular(1000);
206 AliTRDrawStream::~AliTRDrawStream()
212 delete [] fCurrStackIndexWord;
213 delete [] fCurrStackHeaderSize;
214 delete [] fCurrStackHeaderVersion;
215 delete [] fCurrLinkMask;
216 delete [] fCurrCleanCheckout;
217 delete [] fCurrBoardId;
218 delete [] fCurrHwRev;
219 delete [] fCurrLinkMonitorFlags;
220 delete [] fCurrLinkDataTypeFlags;
221 delete [] fCurrLinkDebugFlags;
224 Bool_t AliTRDrawStream::ReadEvent(TTree *trackletTree)
226 // read the current event from the raw reader and fill it to the digits manager
229 AliError("No raw reader available");
234 ConnectTracklets(trackletTree);
239 // loop over all DDLs
240 // data starts with GTU payload, i.e. SMU index word
241 UChar_t *buffer = 0x0;
243 while (fRawReader->ReadNextData(buffer)) {
245 fCurrEquipmentId = fRawReader->GetEquipmentId();
246 AliDebug(2, Form("equipment: %i", fCurrEquipmentId));
248 if (fCurrEquipmentId < 1024 || fCurrEquipmentId > 1041) {
249 EquipmentError(kNonTrdEq, "Skipping");
253 // setting the pointer to data and current reading position
254 fPayloadCurr = fPayloadStart = (UInt_t*) (buffer);
255 fPayloadSize = fRawReader->GetDataSize() / sizeof(UInt_t);
256 fStats.fStatsSector[fCurrEquipmentId - 1024].fBytes = fRawReader->GetDataSize();
257 AliDebug(2, Form("Read buffer of size: %i", fRawReader->GetDataSize()));
259 // read SMU index header
260 if (ReadSmHeader() < 0) {
261 AliError(Form("Reading SMU header failed, skipping this DDL %i", fCurrEquipmentId));
265 // read stack index header
266 for (Int_t iStack = 0; iStack < 5; iStack++) {
267 if ((fCurrStackMask & (1 << iStack)) != 0)
268 ReadStackIndexHeader(iStack);
271 for (Int_t iStack = 0; iStack < 5; iStack++) {
273 if ((fCurrStackMask & (1 << fCurrSlot)) == 0)
276 AliDebug(2, Form("Stack %i, Link mask: 0x%02x", fCurrSlot, fCurrLinkMask[fCurrSlot]));
277 for (Int_t iLink = 0; iLink < 12; iLink++) {
279 fCurrHC = fCurrSm * 60 + fCurrSlot * 12 + iLink;
280 if ((fCurrLinkMask[fCurrSlot] & (1 << fCurrLink)) == 0)
284 // check for link monitor error flag
285 if (fCurrLinkMonitorFlags[fCurrSlot*fgkNlinks + fCurrLink] != 0)
286 LinkError(kLinkMonitor);
288 // read the data from one HC
291 // read all data endmarkers
300 Bool_t AliTRDrawStream::NextDDL()
302 // continue reading with the next equipment
307 fCurrEquipmentId = 0;
311 UChar_t *buffer = 0x0;
313 while (fRawReader->ReadNextData(buffer)) {
315 fCurrEquipmentId = fRawReader->GetEquipmentId();
316 AliDebug(2, Form("equipment: %i", fCurrEquipmentId));
318 if (fCurrEquipmentId < 1024 || fCurrEquipmentId > 1041) {
319 EquipmentError(kNonTrdEq, "Skipping");
323 // setting the pointer to data and current reading position
324 fPayloadCurr = fPayloadStart = (UInt_t*) (buffer);
325 fPayloadSize = fRawReader->GetDataSize() / sizeof(UInt_t);
326 AliDebug(2, Form("Read buffer of size: %i", fRawReader->GetDataSize()));
328 // read SMU index header
329 if (ReadSmHeader() < 0) {
330 AliError(Form("Reading SMU header failed, skipping this DDL %i", fCurrEquipmentId));
334 // read stack index header
335 for (Int_t iStack = 0; iStack < 5; iStack++) {
336 if ((fCurrStackMask & (1 << iStack)) != 0) {
337 ReadStackIndexHeader(iStack);
347 Int_t AliTRDrawStream::NextChamber(AliTRDdigitsManager *digMgr, UInt_t ** /* trackletContainer */, UShort_t ** /* errorContainer */)
349 // read the data for the next chamber
350 // in case you only want to read the data of a single chamber
351 // to read all data ReadEvent(...) is recommended
353 fDigitsManager = digMgr;
358 // tracklet output preparation
359 TTree *trklTree = 0x0;
360 AliRunLoader *rl = AliRunLoader::Instance();
361 AliLoader* trdLoader = rl ? rl->GetLoader("TRDLoader") : NULL;
362 AliDataLoader *trklLoader = trdLoader ? trdLoader->GetDataLoader("tracklets") : NULL;
364 AliTreeLoader *trklTreeLoader = (AliTreeLoader*) trklLoader->GetBaseLoader("tracklets-raw");
366 trklTree = trklTreeLoader->Tree();
368 trklTree = trklLoader->Tree();
371 if (fTrackletTree != trklTree)
372 ConnectTracklets(trklTree);
375 AliError("No raw reader available");
379 if (fCurrSlot < 0 || fCurrSlot >= 5) {
386 AliDebug(2, Form("Stack %i, Link %i, mask: 0x%02x", fCurrSlot, fCurrLink, fCurrLinkMask[fCurrSlot]));
387 fCurrHC = (fCurrEquipmentId - 1024) * 60 + fCurrSlot * 12 + fCurrLink;
389 if (fCurrLinkMonitorFlags[fCurrSlot*fgkNlinks + fCurrLink] != 0)
390 LinkError(kLinkMonitor);
392 // read the data from one HC
395 // read all data endmarkers
398 if (fCurrLink % 2 == 0) {
399 // if we just read the A-side HC then also check the B-side
402 if (fCurrLinkMask[fCurrSlot] & (1 << fCurrLink)) {
411 if (fCurrLink > 11) {
415 } while ((fCurrSlot < 5) &&
416 (((fCurrStackMask & (1 << fCurrSlot)) == 0) ||
417 ((fCurrLinkMask[fCurrSlot] & (1 << fCurrLink))) == 0));
419 // return chamber information from HC if it is valid
420 // otherwise return information from link position
421 if (fCurrSm < 0 || fCurrSm > 17 || fCurrStack < 0 || fCurrStack > 4 || fCurrLayer < 0 || fCurrLayer > 5)
422 return ((fCurrEquipmentId-1024) + fCurrSlot * 6 + fCurrLink/2);
424 return (fCurrSm * 30 + fCurrStack * 6 + fCurrLayer);
428 Int_t AliTRDrawStream::ReadSmHeader()
430 // read the SMU index header at the current reading position
431 // and store the information in the corresponding variables
433 if (fPayloadCurr - fPayloadStart >= fPayloadSize - 1) {
434 EquipmentError(kUnknown, "SM Header incomplete");
438 fCurrSmuIndexHeaderSize = ((*fPayloadCurr) >> 16) & 0xffff;
439 fCurrSmuIndexHeaderVersion = ((*fPayloadCurr) >> 12) & 0xf;
440 // fCurrSmuIndexHeaderTrgAvail = ((*fPayloadCurr) >> 9) & 0x1;
441 // fCurrSmuIndexHeaderEvType = ((*fPayloadCurr) >> 7) & 0x3;
442 fCurrTrackEnable = ((*fPayloadCurr) >> 6) & 0x1;
443 fCurrTrackletEnable = ((*fPayloadCurr) >> 5) & 0x1;
444 fCurrStackMask = ((*fPayloadCurr) ) & 0x1f;
446 AliDebug(5, Form("SMU header: size: %i, version: %i, track enable: %i, tracklet enable: %i, stack mask: %2x",
447 fCurrSmuIndexHeaderSize,
448 fCurrSmuIndexHeaderVersion,
453 // decode GTU track words
457 for (UInt_t iWord = 4; iWord < fCurrSmuIndexHeaderSize; iWord++) {
458 if (fPayloadCurr[iWord] == 0x10000000) {
464 ((fPayloadCurr[iWord] & 0xfffff0f0) == 0x13370000)) {
465 AliDebug(1,Form("stack %i: fast trigger word: 0x%08x", stack, fPayloadCurr[iWord]));
468 else if ((idx & 0x1)==0x1) {
469 trackWord[idx&0x1] = fPayloadCurr[iWord];
470 AliDebug(1,Form("track debug word: 0x%08x%08x", trackWord[1], trackWord[0]));
472 // new ((*fTracks)[fTracks->GetEntriesFast()]) AliESDTrdTrack(0, 0, trackWord[0], trackWord[1], fCurrEquipmentId-1024);
475 trackWord[idx&0x1] = fPayloadCurr[iWord];
481 fPayloadCurr += fCurrSmuIndexHeaderSize + 1;
483 return fCurrSmuIndexHeaderSize + 1;
486 Int_t AliTRDrawStream::ReadStackIndexHeader(Int_t stack)
488 // read the stack index header
489 // and store the information in the corresponding variables
491 fCurrStackIndexWord[stack] = *fPayloadCurr;
492 fCurrStackHeaderSize[stack] = (((*fPayloadCurr) >> 16) & 0xffff) + 1;
493 fCurrStackHeaderVersion[stack] = ((*fPayloadCurr) >> 12) & 0xf;
494 fCurrLinkMask[stack] = (*fPayloadCurr) & 0xfff;
496 if (fPayloadCurr - fPayloadStart >= fPayloadSize - (Int_t) fCurrStackHeaderSize[stack]) {
497 StackError(kStackHeaderInvalid, "Stack index header aborted");
501 switch (fCurrStackHeaderVersion[stack]) {
503 if (fCurrStackHeaderSize[stack] < 8) {
504 StackError(kStackHeaderInvalid, "Stack header smaller than expected!");
508 fCurrCleanCheckout[stack] = fPayloadCurr[1] & 0x1;
509 fCurrBoardId[stack] = (fPayloadCurr[1] >> 8) & 0xff;
510 fCurrHwRev[stack] = (fPayloadCurr[1] >> 16) & 0xffff;
512 for (Int_t iLayer = 0; iLayer < 6; iLayer++) {
514 fCurrLinkMonitorFlags [stack*fgkNlinks + iLayer*2] = fPayloadCurr[iLayer+2] & 0xf;
515 fCurrLinkDataTypeFlags [stack*fgkNlinks + iLayer*2] = (fPayloadCurr[iLayer+2] >> 4) & 0x3;
516 fCurrLinkDebugFlags [stack*fgkNlinks + iLayer*2] = (fPayloadCurr[iLayer+2] >> 12) & 0xf;
518 fCurrLinkMonitorFlags [stack*fgkNlinks + iLayer*2 + 1] = (fPayloadCurr[iLayer+2] >> 16) & 0xf;
519 fCurrLinkDataTypeFlags [stack*fgkNlinks + iLayer*2 + 1] = (fPayloadCurr[iLayer+2] >> 20) & 0x3;
520 fCurrLinkDebugFlags [stack*fgkNlinks + iLayer*2 + 1] = (fPayloadCurr[iLayer+2] >> 28) & 0xf;
525 StackError(kStackHeaderInvalid, "Invalid Stack Index Header version %x", fCurrStackHeaderVersion[stack]);
528 fPayloadCurr += fCurrStackHeaderSize[stack];
530 return fCurrStackHeaderSize[stack];
533 Int_t AliTRDrawStream::ReadLinkData()
535 // read the data in one link (one HC) until the data endmarker is reached
536 // returns the number of words read!
539 UInt_t* startPosLink = fPayloadCurr;
541 // printf("----- HC: %i -----\n", fCurrHC);
542 // for (Int_t i = 0; i < 3; i++) {
543 // printf("0x%08x 0x%08x 0x%08x 0x%08x\n",
544 // fPayloadCurr[i*4+0], fPayloadCurr[i*4+1], fPayloadCurr[i*4+2], fPayloadCurr[i*4+3]);
548 new ((*fMarkers)[fMarkers->GetEntriesFast()])
549 AliTRDrawStreamError(-kHCactive, fCurrSm, fCurrStack, fCurrLink);
551 if (fErrorFlags & kDiscardHC)
554 count += ReadTracklets();
555 if (fErrorFlags & kDiscardHC)
558 count += ReadHcHeader();
559 if (fErrorFlags & kDiscardHC)
562 Int_t det = fCurrSm * 30 + fCurrStack * 6 + fCurrLayer;
564 if (det > -1 && det < 540) {
566 if ((fAdcArray = fDigitsManager->GetDigits(det))) {
567 //fAdcArray->Expand();
568 if (fAdcArray->GetNtime() != fCurrNtimebins)
569 fAdcArray->Allocate(16, 144, fCurrNtimebins);
572 LinkError(kNoDigits);
576 fDigitsParam = fDigitsManager->GetDigitsParam();
579 fDigitsParam->SetPretriggerPhase(det, fCurrPtrgPhase);
580 fDigitsParam->SetNTimeBins(det, fCurrNtimebins);
581 fDigitsParam->SetADCbaseline(det, 10);
584 if (fDigitsManager->UsesDictionaries()) {
585 fDigitsManager->GetDictionary(det, 0)->Reset();
586 fDigitsManager->GetDictionary(det, 1)->Reset();
587 fDigitsManager->GetDictionary(det, 2)->Reset();
590 if ((fSignalIndex = fDigitsManager->GetIndexes(det))) {
591 fSignalIndex->SetSM(fCurrSm);
592 fSignalIndex->SetStack(fCurrStack);
593 fSignalIndex->SetLayer(fCurrLayer);
594 fSignalIndex->SetDetNumber(det);
595 if (!fSignalIndex->IsAllocated())
596 fSignalIndex->Allocate(16, 144, fCurrNtimebins);
599 // ----- check which kind of data -----
600 if (fCurrMajor & 0x40) {
601 if ((fCurrMajor & 0x7) == 0x7) {
602 AliDebug(1, "This is a config event");
603 UInt_t *startPos = fPayloadCurr;
604 while (fPayloadCurr - fPayloadStart < fPayloadSize &&
605 *fPayloadCurr != fgkDataEndmarker)
607 count += fPayloadCurr - startPos;
609 // feeding TRAP config
610 AliTRDtrapConfig *trapcfg = AliTRDtrapConfig::Instance();
611 trapcfg->ReadPackedConfig(fCurrHC, startPos, fPayloadCurr - startPos);
614 Int_t tpmode = fCurrMajor & 0x7;
615 AliDebug(1, Form("Checking testpattern (mode %i) data", tpmode));
619 else if (fCurrMajor & 0x20) {
620 AliDebug(1, "This is a zs event");
621 count += ReadZSData();
624 AliDebug(1, "This is a nozs event");
625 count += ReadNonZSData();
629 LinkError(kInvalidDetector, "%i", det);
630 while (fPayloadCurr - fPayloadStart < fPayloadSize &&
631 *fPayloadCurr != fgkDataEndmarker)
635 fStats.fStatsSector[fCurrSm].fStatsHC[fCurrHC%60].fBytes += (fPayloadCurr - startPosLink) * sizeof(UInt_t);
636 fStats.fStatsSector[fCurrSm].fStatsHC[fCurrHC%60].fBytesRead += count * sizeof(UInt_t);
637 fStats.fStatsSector[fCurrSm].fBytesRead += count * sizeof(UInt_t);
638 fStats.fBytesRead += count * sizeof(UInt_t);
643 Int_t AliTRDrawStream::ReadTracklets()
645 // read the tracklets from one HC
647 fTrackletArray->Clear();
649 UInt_t *start = fPayloadCurr;
650 while (*(fPayloadCurr) != fgkTrackletEndmarker &&
651 fPayloadCurr - fPayloadStart < fPayloadSize) {
653 new ((*fTrackletArray)[fTrackletArray->GetEntriesFast()]) AliTRDtrackletWord(*(fPayloadCurr), fCurrHC);
658 if (fTrackletArray->GetEntriesFast() > 0) {
659 AliDebug(1, Form("Found %i tracklets in %i %i %i (ev. %i)", fTrackletArray->GetEntriesFast(),
660 fCurrSm, fCurrSlot, fCurrLink, fRawReader->GetEventIndex()));
661 if (fCurrSm > -1 && fCurrSm < 18) {
662 fStats.fStatsSector[fCurrSm].fStatsHC[fCurrHC%60].fNTracklets += fTrackletArray->GetEntriesFast();
663 fStats.fStatsSector[fCurrSm].fNTracklets += fTrackletArray->GetEntriesFast();
666 fTrackletTree->Fill();
668 for (Int_t iTracklet = 0; iTracklet < fTrackletArray->GetEntriesFast(); iTracklet++) {
669 new ((*fTracklets)[fTracklets->GetEntriesFast()]) AliTRDtrackletWord(*((AliTRDtrackletWord*)(*fTrackletArray)[iTracklet]));
673 // loop over remaining tracklet endmarkers
674 while ((*(fPayloadCurr) == fgkTrackletEndmarker &&
675 fPayloadCurr - fPayloadStart < fPayloadSize))
678 return fPayloadCurr - start;
681 Int_t AliTRDrawStream::ReadHcHeader()
683 // read and parse the HC header of one HC
684 // and store the information in the corresponding variables
686 UInt_t *start = fPayloadCurr;
687 // check not to be at the data endmarker
688 if (*fPayloadCurr == fgkDataEndmarker)
691 fCurrSpecial = (*fPayloadCurr >> 31) & 0x1;
692 fCurrMajor = (*fPayloadCurr >> 24) & 0x7f;
693 fCurrMinor = (*fPayloadCurr >> 17) & 0x7f;
694 fCurrAddHcWords = (*fPayloadCurr >> 14) & 0x7;
695 fCurrSm = (*fPayloadCurr >> 9) & 0x1f;
696 fCurrLayer = (*fPayloadCurr >> 6) & 0x7;
697 fCurrStack = (*fPayloadCurr >> 3) & 0x7;
698 fCurrSide = (*fPayloadCurr >> 2) & 0x1;
699 fCurrCheck = (*fPayloadCurr) & 0x3;
701 if (fCurrSm != (((Int_t) fCurrEquipmentId) - 1024) ||
702 fCurrStack != fCurrSlot ||
703 fCurrLayer != fCurrLink / 2 ||
704 fCurrSide != fCurrLink % 2) {
705 LinkError(kHCmismatch,
706 "HC: %i, %i, %i, %i\n 0x%08x 0x%08x 0x%08x 0x%08x",
707 fCurrSm, fCurrStack, fCurrLayer, fCurrSide,
708 fPayloadCurr[0], fPayloadCurr[1], fPayloadCurr[2], fPayloadCurr[3]);;
710 if (fCurrCheck != 0x1) {
711 LinkError(kHCcheckFailed);
714 if (fCurrAddHcWords > 0) {
715 fCurrNtimebins = (fPayloadCurr[1] >> 26) & 0x3f;
716 fCurrBC = (fPayloadCurr[1] >> 10) & 0xffff;
717 fCurrPtrgCnt = (fPayloadCurr[1] >> 6) & 0xf;
718 fCurrPtrgPhase = (fPayloadCurr[1] >> 2) & 0xf;
721 fPayloadCurr += 1 + fCurrAddHcWords;
723 return (fPayloadCurr - start);
726 Int_t AliTRDrawStream::ReadTPData(Int_t mode)
728 // testing of testpattern 1 to 3 (hardcoded), 0 missing
729 // evcnt checking missing
731 Int_t cpufromchannel[] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3};
736 Int_t channelcount = 0;
738 UInt_t expadcval = 0;
740 Int_t lastmcmpos = -1;
741 Int_t lastrobpos = -1;
743 UInt_t* start = fPayloadCurr;
745 while (*(fPayloadCurr) != fgkDataEndmarker &&
746 fPayloadCurr - fPayloadStart < fPayloadSize - 1) {
748 // ----- Checking MCM Header -----
749 AliDebug(2, Form("MCM header: 0x%08x", *fPayloadCurr));
752 // ----- checking for proper readout order - ROB -----
753 if (GetROBReadoutPos(ROB(*fPayloadCurr) / 2) >= lastrobpos) {
754 lastrobpos = GetROBReadoutPos(ROB(*fPayloadCurr) / 2);
759 fCurrRobPos = ROB(*fPayloadCurr);
761 // ----- checking for proper readout order - MCM -----
762 if (GetMCMReadoutPos(MCM(*fPayloadCurr)) >= (lastmcmpos + 1) % 16) {
763 lastmcmpos = GetMCMReadoutPos(MCM(*fPayloadCurr));
768 fCurrMcmPos = MCM(*fPayloadCurr);
773 evcnt = 0x3f & *fPayloadCurr >> 26;
776 while (channelcount < 21) {
778 if (cpu != cpufromchannel[channelcount]) {
779 cpu = cpufromchannel[channelcount];
780 expadcval = (1 << 9) | (fCurrRobPos << 6) | (fCurrMcmPos << 2) | cpu;
785 if (channelcount % 2 == 0)
792 expword |= expadcval << 2;
793 expadcval = ( (expadcval << 1) | ( ( (expadcval >> 9) ^ (expadcval >> 6) ) & 1) ) & 0x3FF;
794 expword |= expadcval << 12;
795 expadcval = ( (expadcval << 1) | ( ( (expadcval >> 9) ^ (expadcval >> 6) ) & 1) ) & 0x3FF;
796 expword |= expadcval << 22;
797 expadcval = ( (expadcval << 1) | ( ( (expadcval >> 9) ^ (expadcval >> 6) ) & 1) ) & 0x3FF;
799 else if (mode == 2) {
801 expword = ((0x3f & evcnt) << 26) | ((fCurrSm + 1) << 21) | ((fCurrLayer + 1) << 18) |
802 ((fCurrStack + 1) << 15) |
803 (fCurrRobPos << 12) | (fCurrMcmPos << 8) | (cpu << 6) | (wordcount + 1);
805 else if (mode == 3) {
807 expword = ((0xfff & evcnt) << 20) | (fCurrSm << 15) | (fCurrLink/2 << 12) | (fCurrStack << 9) |
808 (fCurrRobPos << 6) | (fCurrMcmPos << 2) | (cpu << 0);
812 LinkError(kTPmodeInvalid, "Just reading");
815 diff = *fPayloadCurr ^ expword;
817 MCMError(kTPmismatch,
818 "Seen 0x%08x, expected 0x%08x, diff: 0x%08x (0x%02x)",
819 *fPayloadCurr, expword, diff, 0xff & (diff | diff >> 8 | diff >> 16 | diff >> 24));;
827 // continue with next MCM
829 return fPayloadCurr - start;
833 Int_t AliTRDrawStream::ReadZSData()
835 // read the zs data from one link from the current reading position
837 UInt_t *start = fPayloadCurr;
840 Int_t mcmcountExp = fCurrStack == 2 ? 48 : 64;
841 Int_t channelcount = 0;
842 Int_t channelcountExp = 0;
843 Int_t channelcountMax = 0;
845 Int_t currentTimebin = 0;
848 Int_t lastmcmpos = -1;
849 Int_t lastrobpos = -1;
851 if (fCurrNtimebins != fNtimebins) {
853 LinkError(kNtimebinsChanged,
854 "No. of timebins changed from %i to %i", fNtimebins, fCurrNtimebins);
855 fNtimebins = fCurrNtimebins;
858 timebins = fNtimebins;
860 while (*(fPayloadCurr) != fgkDataEndmarker &&
861 fPayloadCurr - fPayloadStart < fPayloadSize) {
863 // ----- Checking MCM Header -----
864 AliDebug(2, Form("MCM header: 0x%08x", *fPayloadCurr));
865 UInt_t *startPosMCM = fPayloadCurr;
867 // ----- checking for proper readout order - ROB -----
868 if (GetROBReadoutPos(ROB(*fPayloadCurr) / 2) >= lastrobpos) {
869 lastrobpos = GetROBReadoutPos(ROB(*fPayloadCurr) / 2);
874 fCurrRobPos = ROB(*fPayloadCurr);
876 // ----- checking for proper readout order - MCM -----
877 if (GetMCMReadoutPos(MCM(*fPayloadCurr)) > lastmcmpos) {
878 lastmcmpos = GetMCMReadoutPos(lastmcmpos);
883 fCurrMcmPos = MCM(*fPayloadCurr);
885 if (EvNo(*fPayloadCurr) != evno) {
887 evno = EvNo(*fPayloadCurr);
889 MCMError(kPtrgCntMismatch, "%i <-> %i", evno, EvNo(*fPayloadCurr));
892 Int_t adccoloff = AdcColOffset(*fPayloadCurr);
893 Int_t padcoloff = PadColOffset(*fPayloadCurr);
894 Int_t row = Row(*fPayloadCurr);
897 // ----- Reading ADC channels -----
898 AliDebug(2, Form("ADC mask: 0x%08x", *fPayloadCurr));
900 // ----- analysing the ADC mask -----
902 channelcountExp = GetNActiveChannelsFromMask(*fPayloadCurr);
903 channelcountMax = GetNActiveChannels(*fPayloadCurr);
904 Int_t channelmask = GetActiveChannels(*fPayloadCurr);
905 Int_t channelno = -1;
908 if (channelcountExp != channelcountMax) {
909 if (channelcountExp > channelcountMax) {
910 Int_t temp = channelcountExp;
911 channelcountExp = channelcountMax;
912 channelcountMax = temp;
914 while (channelcountExp < channelcountMax && channelcountExp < 21 &&
915 fPayloadCurr - fPayloadStart < fPayloadSize - 10 * channelcountExp - 1) {
916 MCMError(kAdcMaskInconsistent,
917 "Possible MCM-H: 0x%08x, possible ADC-mask: 0x%08x",
918 *(fPayloadCurr + 10 * channelcountExp),
919 *(fPayloadCurr + 10 * channelcountExp + 1) );
920 if (!CouldBeMCMhdr( *(fPayloadCurr + 10 * channelcountExp)) && !CouldBeADCmask( *(fPayloadCurr + 10 * channelcountExp + 1)))
926 MCMError(kAdcMaskInconsistent,
927 "Inconsistency in no. of active channels: Counter: %i, Mask: %i, chosen: %i!",
928 GetNActiveChannels(fPayloadCurr[-1]), GetNActiveChannelsFromMask(fPayloadCurr[-1]), channelcountExp);
930 AliDebug(2, Form("expecting %i active channels, timebins: %i", channelcountExp, fCurrNtimebins));
932 // ----- reading marked ADC channels -----
933 while (channelcount < channelcountExp && *(fPayloadCurr) != fgkDataEndmarker) {
936 while (channelno < 20 && (channelmask & 1 << channelno) == 0)
939 if (fCurrNtimebins > 30) {
940 currentTimebin = ((*fPayloadCurr >> 2) & 0x3f);
941 timebins = ((*fPayloadCurr >> 8) & 0xf) * 3;
948 AliDebug(2, Form("Now looking %i words", timebins / 3));
949 Int_t adccol = adccoloff - channelno;
950 Int_t padcol = padcoloff - channelno;
951 // if (adccol < 3 || adccol > 165)
952 // AliInfo(Form("writing channel %i of det %3i %i:%2i to adcrow/-col: %i/%i padcol: %i",
953 // channelno, fCurrHC/2, fCurrRobPos, fCurrMcmPos, row, adccol, padcol));
955 while (adcwc < timebins / 3 &&
956 *(fPayloadCurr) != fgkDataEndmarker &&
957 fPayloadCurr - fPayloadStart < fPayloadSize) {
958 int check = 0x3 & *fPayloadCurr;
959 if (channelno % 2 != 0) { // odd channel
960 if (check != 0x2 && channelno < 21) {
961 MCMError(kAdcCheckInvalid,
962 "%i for %2i. ADC word in odd channel %i",
963 check, adcwc+1, channelno);
966 else { // even channel
967 if (check != 0x3 && channelno < 21) {
968 MCMError(kAdcCheckInvalid,
969 "%i for %2i. ADC word in even channel %i",
970 check, adcwc+1, channelno);
974 // filling the actual timebin data
975 int tb2 = 0x3ff & *fPayloadCurr >> 22;
976 int tb1 = 0x3ff & *fPayloadCurr >> 12;
977 int tb0 = 0x3ff & *fPayloadCurr >> 2;
978 if (adcwc != 0 || fCurrNtimebins <= 30)
979 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb0);
982 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb1);
983 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb2);
989 if (adcwc != timebins / 3)
990 MCMError(kAdcDataAbort);
993 if (padcol > 0 && padcol < 144) {
994 fSignalIndex->AddIndexRC(row, padcol);
1000 fStats.fStatsSector[fCurrSm].fStatsHC[fCurrHC%60].fNChannels += channelcount;
1001 fStats.fStatsSector[fCurrSm].fNChannels += channelcount;
1002 if (channelcount != channelcountExp)
1003 MCMError(kAdcChannelsMiss);
1006 fStats.fStatsSector[fCurrSm].fStatsHC[fCurrHC%60].fNMCMs++;
1007 fStats.fStatsSector[fCurrSm].fNMCMs++;
1009 if (IsDumping() && DumpingMCM(fCurrHC/2, fCurrRobPos, fCurrMcmPos)) {
1010 DumpRaw(Form("Event %i: Det %3i ROB %i MCM %2i", fRawReader->GetEventIndex(), fCurrHC/2, fCurrRobPos, fCurrMcmPos),
1011 startPosMCM, fPayloadCurr - startPosMCM);
1014 // continue with next MCM
1017 // check for missing MCMs (if header suppression is inactive)
1018 if (((fCurrMajor & 0x1) == 0) && (mcmcount != mcmcountExp)) {
1019 LinkError(kMissMcmHeaders,
1020 "No. of MCM headers %i not as expected: %i",
1021 mcmcount, mcmcountExp);
1024 return (fPayloadCurr - start);
1027 Int_t AliTRDrawStream::ReadNonZSData()
1029 // read the non-zs data from one link from the current reading position
1031 UInt_t *start = fPayloadCurr;
1034 Int_t mcmcountExp = fCurrStack == 2 ? 48 : 64;
1035 Int_t channelcount = 0;
1036 Int_t channelcountExp = 0;
1038 Int_t currentTimebin = 0;
1041 Int_t lastmcmpos = -1;
1042 Int_t lastrobpos = -1;
1044 if (fCurrNtimebins != fNtimebins) {
1046 LinkError(kNtimebinsChanged,
1047 "No. of timebins changed from %i to %i", fNtimebins, fCurrNtimebins);
1048 fNtimebins = fCurrNtimebins;
1051 timebins = fNtimebins;
1053 while (*(fPayloadCurr) != fgkDataEndmarker &&
1054 fPayloadCurr - fPayloadStart < fPayloadSize - 2) {
1056 // ----- Checking MCM Header -----
1057 AliDebug(2, Form("MCM header: 0x%08x", *fPayloadCurr));
1059 // ----- checking for proper readout order - ROB -----
1060 if (GetROBReadoutPos(ROB(*fPayloadCurr) / 2) >= lastrobpos) {
1061 lastrobpos = GetROBReadoutPos(ROB(*fPayloadCurr) / 2);
1064 ROBError(kPosUnexp);
1066 fCurrRobPos = ROB(*fPayloadCurr);
1068 // ----- checking for proper readout order - MCM -----
1069 if (GetMCMReadoutPos(MCM(*fPayloadCurr)) >= (lastmcmpos + 1) % 16) {
1070 lastmcmpos = GetMCMReadoutPos(*fPayloadCurr);
1073 MCMError(kPosUnexp);
1075 fCurrMcmPos = MCM(*fPayloadCurr);
1077 if (EvNo(*fPayloadCurr) != evno) {
1079 evno = EvNo(*fPayloadCurr);
1081 MCMError(kPtrgCntMismatch, "%i <-> %i", evno, EvNo(*fPayloadCurr));
1086 channelcountExp = 21;
1089 Int_t adccoloff = AdcColOffset(*fPayloadCurr);
1090 Int_t padcoloff = PadColOffset(*fPayloadCurr);
1091 Int_t row = Row(*fPayloadCurr);
1095 // ----- reading marked ADC channels -----
1096 while (channelcount < channelcountExp &&
1097 *(fPayloadCurr) != fgkDataEndmarker) {
1104 AliDebug(2, Form("Now looking %i words", timebins / 3));
1105 Int_t adccol = adccoloff - channelno;
1106 Int_t padcol = padcoloff - channelno;
1107 while (adcwc < timebins / 3 &&
1108 *(fPayloadCurr) != fgkDataEndmarker &&
1109 fPayloadCurr - fPayloadStart < fPayloadSize) {
1110 int check = 0x3 & *fPayloadCurr;
1111 if (channelno % 2 != 0) { // odd channel
1112 if (check != 0x2 && channelno < 21) {
1113 MCMError(kAdcCheckInvalid,
1114 "%i for %2i. ADC word in odd channel %i",
1115 check, adcwc+1, channelno);
1118 else { // even channel
1119 if (check != 0x3 && channelno < 21) {
1120 MCMError(kAdcCheckInvalid,
1121 "%i for %2i. ADC word in even channel %i",
1122 check, adcwc+1, channelno);
1126 // filling the actual timebin data
1127 int tb2 = 0x3ff & *fPayloadCurr >> 22;
1128 int tb1 = 0x3ff & *fPayloadCurr >> 12;
1129 int tb0 = 0x3ff & *fPayloadCurr >> 2;
1130 if (adcwc != 0 || fCurrNtimebins <= 30)
1131 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb0);
1134 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb1);
1135 fAdcArray->SetDataByAdcCol(row, adccol, currentTimebin++, tb2);
1141 if (adcwc != timebins / 3)
1142 MCMError(kAdcDataAbort);
1145 if (padcol > 0 && padcol < 144) {
1146 fSignalIndex->AddIndexRC(row, padcol);
1152 if (channelcount != channelcountExp)
1153 MCMError(kAdcChannelsMiss);
1155 // continue with next MCM
1158 // check for missing MCMs (if header suppression is inactive)
1159 if (mcmcount != mcmcountExp) {
1160 LinkError(kMissMcmHeaders,
1161 "%i not as expected: %i", mcmcount, mcmcountExp);
1164 return (fPayloadCurr - start);
1167 Int_t AliTRDrawStream::SeekNextLink()
1169 UInt_t *start = fPayloadCurr;
1171 // read until data endmarkers
1172 while (fPayloadCurr - fPayloadStart < fPayloadSize &&
1173 *fPayloadCurr != fgkDataEndmarker)
1176 // read all data endmarkers
1177 while (fPayloadCurr - fPayloadStart < fPayloadSize &&
1178 *fPayloadCurr == fgkDataEndmarker)
1181 return (fPayloadCurr - start);
1184 Bool_t AliTRDrawStream::ConnectTracklets(TTree *trklTree)
1186 fTrackletTree = trklTree;
1190 if (!fTrackletTree->GetBranch("hc"))
1191 fTrackletTree->Branch("hc", &fCurrHC, "hc/I");
1193 fTrackletTree->SetBranchAddress("hc", &fCurrHC);
1195 if (!fTrackletTree->GetBranch("trkl"))
1196 fTrackletTree->Branch("trkl", &fTrackletArray);
1198 fTrackletTree->SetBranchAddress("trkl", &fTrackletArray);
1204 void AliTRDrawStream::EquipmentError(ErrorCode_t err, const char *const msg, ...)
1206 // register error according to error code on equipment level
1207 // and return the corresponding error message
1209 fLastError.fSector = fCurrEquipmentId - 1024;
1210 fLastError.fStack = -1;
1211 fLastError.fLink = -1;
1212 fLastError.fRob = -1;
1213 fLastError.fMcm = -1;
1214 fLastError.fError = err;
1215 (this->*fStoreError)();
1218 if (fgErrorDebugLevel[err] > 10)
1219 AliDebug(fgErrorDebugLevel[err],
1220 Form("Event %6i: Eq. %2d - %s : %s",
1221 fRawReader->GetEventIndex(), fCurrEquipmentId, fgErrorMessages[err],
1222 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1224 AliError(Form("Event %6i: Eq. %2d - %s : %s",
1225 fRawReader->GetEventIndex(), fCurrEquipmentId, fgErrorMessages[err],
1226 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1227 fErrorFlags |= fgErrorBehav[err];
1231 void AliTRDrawStream::StackError(ErrorCode_t err, const char *const msg, ...)
1233 // register error according to error code on stack level
1234 // and return the corresponding error message
1236 fLastError.fSector = fCurrEquipmentId - 1024;
1237 fLastError.fStack = fCurrSlot;
1238 fLastError.fLink = -1;
1239 fLastError.fRob = -1;
1240 fLastError.fMcm = -1;
1241 fLastError.fError = err;
1242 (this->*fStoreError)();
1245 if (fgErrorDebugLevel[err] > 0)
1246 AliDebug(fgErrorDebugLevel[err],
1247 Form("Event %6i: Eq. %2d S %i - %s : %s",
1248 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fgErrorMessages[err],
1249 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1251 AliError(Form("Event %6i: Eq. %2d S %i - %s : %s",
1252 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fgErrorMessages[err],
1253 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1254 fErrorFlags |= fgErrorBehav[err];
1258 void AliTRDrawStream::LinkError(ErrorCode_t err, const char *const msg, ...)
1260 // register error according to error code on link level
1261 // and return the corresponding error message
1263 fLastError.fSector = fCurrEquipmentId - 1024;
1264 fLastError.fStack = fCurrSlot;
1265 fLastError.fLink = fCurrLink;
1266 fLastError.fRob = -1;
1267 fLastError.fMcm = -1;
1268 fLastError.fError = err;
1269 (this->*fStoreError)();
1272 if (fgErrorDebugLevel[err] > 0)
1273 AliDebug(fgErrorDebugLevel[err],
1274 Form("Event %6i: Eq. %2d S %i l %2i - %s : %s",
1275 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fgErrorMessages[err],
1276 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1278 AliError(Form("Event %6i: Eq. %2d S %i l %2i - %s : %s",
1279 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fgErrorMessages[err],
1280 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1281 fErrorFlags |= fgErrorBehav[err];
1285 void AliTRDrawStream::ROBError(ErrorCode_t err, const char *const msg, ...)
1287 // register error according to error code on ROB level
1288 // and return the corresponding error message
1290 fLastError.fSector = fCurrEquipmentId - 1024;
1291 fLastError.fStack = fCurrSlot;
1292 fLastError.fLink = fCurrLink;
1293 fLastError.fRob = fCurrRobPos;
1294 fLastError.fMcm = -1;
1295 fLastError.fError = err;
1296 (this->*fStoreError)();
1299 if (fgErrorDebugLevel[err] > 0)
1300 AliDebug(fgErrorDebugLevel[err],
1301 Form("Event %6i: Eq. %2d S %i l %2i ROB %i - %s : %s",
1302 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fCurrRobPos, fgErrorMessages[err],
1303 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1305 AliError(Form("Event %6i: Eq. %2d S %i l %2i ROB %i - %s : %s",
1306 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fCurrRobPos, fgErrorMessages[err],
1307 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1308 fErrorFlags |= fgErrorBehav[err];
1312 void AliTRDrawStream::MCMError(ErrorCode_t err, const char *const msg, ...)
1314 // register error according to error code on MCM level
1315 // and return the corresponding error message
1317 fLastError.fSector = fCurrEquipmentId - 1024;
1318 fLastError.fStack = fCurrSlot;
1319 fLastError.fLink = fCurrLink;
1320 fLastError.fRob = fCurrRobPos;
1321 fLastError.fMcm = fCurrMcmPos;
1322 fLastError.fError = err;
1323 (this->*fStoreError)();
1326 if (fgErrorDebugLevel[err] > 0)
1327 AliDebug(fgErrorDebugLevel[err],
1328 Form("Event %6i: Eq. %2d S %i l %2i ROB %i MCM %2i - %s : %s",
1329 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fCurrRobPos, fCurrMcmPos, fgErrorMessages[err],
1330 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1332 AliError(Form("Event %6i: Eq. %2d S %i l %2i ROB %i MCM %2i - %s : %s",
1333 fRawReader->GetEventIndex(), fCurrEquipmentId, fCurrSlot, fCurrLink, fCurrRobPos, fCurrMcmPos, fgErrorMessages[err],
1334 (va_start(ap, msg), vsprintf(fErrorBuffer, msg, ap), va_end(ap), fErrorBuffer) ));
1335 fErrorFlags |= fgErrorBehav[err];
1338 const char* AliTRDrawStream::GetErrorMessage(ErrorCode_t errCode)
1340 // return the error message for the given error code
1342 if (errCode > 0 && errCode < kLastErrorCode)
1343 return fgErrorMessages[errCode];
1348 void AliTRDrawStream::AliTRDrawStats::ClearStats()
1350 // clear statistics (includes clearing sector-wise statistics)
1353 for (Int_t iSector = 0; iSector < 18; iSector++) {
1354 fStatsSector[iSector].ClearStats();
1359 void AliTRDrawStream::AliTRDrawStats::AliTRDrawStatsSector::ClearStats()
1361 // clear statistics (includes clearing HC-wise statistics)
1369 for (Int_t iHC = 0; iHC < 60; iHC++) {
1370 fStatsHC[iHC].ClearStats();
1374 void AliTRDrawStream::AliTRDrawStats::AliTRDrawStatsSector::AliTRDrawStatsHC::ClearStats()
1385 void AliTRDrawStream::SetDumpMCM(Int_t det, Int_t rob, Int_t mcm, Bool_t dump)
1387 // mark MCM for dumping of raw data
1390 fDumpMCM[fNDumpMCMs++] = (det << 7) | (rob << 4) | mcm;
1394 for (iMCM = 0; iMCM < fNDumpMCMs; iMCM++) {
1395 if (fDumpMCM[iMCM] == ((det << 7) | (rob << 4) | mcm)) {
1400 for ( ; iMCM < fNDumpMCMs; iMCM++) {
1401 fDumpMCM[iMCM] = fDumpMCM[iMCM+1];
1406 Bool_t AliTRDrawStream::DumpingMCM(Int_t det, Int_t rob, Int_t mcm)
1408 // check if MCM data should be dumped
1410 for (Int_t iMCM = 0; iMCM < fNDumpMCMs; iMCM++) {
1411 if (fDumpMCM[iMCM] == ((det << 7) | (rob << 4) | mcm)) {
1418 void AliTRDrawStream::DumpRaw(TString title, UInt_t *start, Int_t length)
1424 for ( ; pos+3 < length; pos += 4) {
1425 title += Form("0x%08x 0x%08x 0x%08x 0x%08x\n",
1426 start[pos+0], start[pos+1], start[pos+2], start[pos+3]);
1428 for ( ; pos < length; pos++) {
1429 title += Form("0x%08x ", start[pos]);
1434 AliTRDrawStream::AliTRDrawStreamError::AliTRDrawStreamError(Int_t error, Int_t sector, Int_t stack, Int_t link, Int_t rob, Int_t mcm) :