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 /** @file AliFMDRawReader.cxx
17 @author Christian Holm Christensen <cholm@nbi.dk>
18 @date Mon Mar 27 12:45:23 2006
19 @brief Class to read raw data
22 //____________________________________________________________________
24 // Class to read ADC values from a AliRawReader object.
26 // This class uses the AliFMDRawStreamer class to read the ALTRO
34 // +-----------------+ <<references>> +--------------+
35 // | AliFMDRawReader |<>----------------| AliRawReader |
36 // +-----------------+ +--------------+
40 // +-----------------+ <<uses>> |
41 // | AliFMDRawStream |------------------------+
42 // +-----------------+
49 // #include <AliLog.h> // ALILOG_H
50 #include "AliFMDDebug.h" // Better debug macros
51 #include "AliFMDParameters.h" // ALIFMDPARAMETERS_H
52 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
53 #include "AliFMDRawStream.h" // ALIFMDRAWSTREAM_H
54 #include "AliRawReader.h" // ALIRAWREADER_H
55 #include "AliFMDRawReader.h" // ALIFMDRAWREADER_H
56 #include "AliFMDDebug.h"
57 #include "AliFMDCalibSampleRate.h"
58 #include "AliFMDCalibStripRange.h"
59 #include "AliFMDAltroMapping.h"
60 // #include "AliFMDAltroIO.h" // ALIFMDALTROIO_H
61 #include <TArrayS.h> // ROOT_TArrayS
62 #include <TTree.h> // ROOT_TTree
63 #include <TClonesArray.h> // ROOT_TClonesArray
68 //____________________________________________________________________
69 ClassImp(AliFMDRawReader)
71 ; // This is here to keep Emacs for indenting the next line
74 //____________________________________________________________________
75 AliFMDRawReader::AliFMDRawReader(AliRawReader* reader, TTree* tree)
76 : TTask("FMDRawReader", "Reader of Raw ADC values from the FMD"),
87 //____________________________________________________________________
89 AliFMDRawReader::Exec(Option_t*)
92 TClonesArray* array = new TClonesArray("AliFMDDigit");
97 fTree->Branch("FMD", &array);
101 Int_t nWrite = fTree->Fill();
102 AliFMDDebug(1, ("Got a grand total of %d digits, wrote %d bytes to tree",
103 array->GetEntriesFast(), nWrite));
108 //____________________________________________________________________
110 AliFMDRawReader::ReadAdcs(TClonesArray* array)
113 fReader->Select("FMD");
114 // Read raw data into the digits array, using AliFMDAltroReader.
116 AliError("No TClonesArray passed");
119 const UShort_t kUShortMax = (1 << 16) - 1;
120 fSeen.Reset(kUShortMax);
122 // if (!fReader->ReadHeader()) {
123 // AliError("Couldn't read header");
127 AliFMDParameters* pars = AliFMDParameters::Instance();
128 AliFMDAltroMapping* map = pars->GetAltroMap();
129 AliFMDRawStream input(fReader);
130 AliFMDDebug(5, ("Setting 7 word headers"));
131 input.SetShortDataHeader(!pars->HasCompleteHeader());
133 UShort_t stripMin = 0;
134 UShort_t stripMax = 0; // 127;
135 UShort_t preSamp = 0; // 14+5;
142 // Data array is approx twice the size needed.
144 for (size_t i = 0; i < 2048; i++) data[i] = 0; // kUShortMax;
146 Bool_t isGood = kTRUE;
148 isGood = input.ReadChannel(ddl, hwaddr, last, data);
149 // if (!isGood) break;
150 if (ddl >= UInt_t(-1)) {
151 AliFMDDebug(5, ("At end of event with %d digits",
152 array->GetEntriesFast()));
156 fZeroSuppress[ddl] = input.GetZeroSupp();
157 AliFMDDebug(20, ("RCU @ DDL %d zero suppression: %s",
158 ddl, (fZeroSuppress[ddl] ? "yes" : "no")));
160 // WARNING: We store the noise factor in the 2nd baseline
161 // filters excluded post samples, since we'll never use that
163 fNoiseFactor[ddl] = input.GetNPostsamples();
164 AliFMDDebug(20, ("RCU @ DDL %d noise factor: %d", ddl,fNoiseFactor[ddl]));
166 Int_t nChAddrMismatch = input.GetNChAddrMismatch();
167 Int_t nChLenMismatch = input.GetNChLengthMismatch();
168 if (nChAddrMismatch != 0)
169 AliWarning(Form("Got %d channels with address mis-matches for 0x%03x",
170 nChAddrMismatch, hwaddr));
171 if (nChLenMismatch != 0)
172 AliWarning(Form("Got %d channels with length mis-matches for 0x%03x",
173 nChLenMismatch, hwaddr));
176 // AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
178 UShort_t det, sec, samp, board, chip, channel;
183 if (map->DDL2Detector(ddl) < 0) break;
184 det = map->DDL2Detector(ddl);
185 map->ChannelAddress(hwaddr, board, chip, channel);
186 if (!map->Channel2StripBase(board, chip, channel, ring, sec, strbase)) {
187 AliError(Form("Failed to get detector id from DDL %d, "
188 "hardware address 0x%03x", ddl, hwaddr));
192 stripMin = pars->GetMinStrip(det, ring, sec, strbase);
193 stripMax = pars->GetMaxStrip(det, ring, sec, strbase);
194 preSamp = pars->GetPreSamples(det, ring, sec, strbase);
195 // WARNING: We use the number of pre-samples to store the
196 // oversampling rate in.
197 rate = input.GetNPretriggerSamples();
198 if (rate == 0) rate = pars->GetSampleRate(det, ring, sec, strbase);
200 // Loop over the `timebins', and make the digits
201 for (size_t i = 0; i < last; i++) {
202 // if (i < preSamp) continue;
203 AliFMDDebug(15, ("0x%04x/0x%03x/%04d %4d", ddl, hwaddr, i, data[i]));
206 map->Timebin2Strip(sec, i, preSamp, rate, stroff, samp);
207 Short_t str = strbase + stroff;
209 AliFMDDebug(10, ("0x%04x/0x%03x/%04d maps to FMD%d%c[%2d,%3d]-%d",
210 ddl, hwaddr, i, det, ring, sec, str, samp));
212 AliFMDDebug(8, ("Got presamples at timebin %d", i));
213 data[i] = 0; // Reset cache
217 Short_t lstrip = (i - preSamp) / rate + stripMin;
219 AliFMDDebug(15, ("Checking if strip %d (%d) in range [%d,%d]",
220 lstrip, str, stripMin, stripMax));
221 if (lstrip < stripMin || lstrip > stripMax) {
222 AliFMDDebug(5, ("FMD%d%c[%02d,%03d]-%d out of range (%3d->%3d)",
223 det, ring, sec, samp, str, stripMin, stripMax));
224 data[i] = 0; // Reset cache
228 // Check the cache of indicies
229 Int_t idx = fSeen(det, ring, sec, str);
230 if (idx == kUShortMax) {
231 // We haven't seen this strip yet.
232 fSeen(det, ring, sec, str) = idx = array->GetEntriesFast();
233 AliFMDDebug(7,("making digit for FMD%d%c[%2d,%3d]-%d from timebin %4d",
234 det, ring, sec, str, samp, i));
235 new ((*array)[idx]) AliFMDDigit(det, ring, sec, str);
237 AliFMDDigit* digit = static_cast<AliFMDDigit*>(array->At(idx));
239 ("Setting from FMD%d%c[%2d,%3d]-%d from timebin %4d = %4d",
240 det, ring, sec, str, samp, i, data[i]));
241 digit->SetCount(samp, data[i]);
242 data[i] = 0; // Reset cache
248 //____________________________________________________________________
250 AliFMDRawReader::ReadAdcs(TClonesArray* array)
252 // Read raw data into the digits array, using AliFMDAltroReader.
254 AliError("No TClonesArray passed");
257 // if (!fReader->ReadHeader()) {
258 // AliError("Couldn't read header");
262 AliFMDParameters* pars = AliFMDParameters::Instance();
265 fReader->Select("FMD");
267 UShort_t stripMin = 0;
268 UShort_t stripMax = 127;
269 UShort_t preSamp = 0;
273 if (!fReader->ReadNextData(cdata)) break;
274 size_t nchar = fReader->GetDataSize();
275 UShort_t ddl = fReader->GetDDLID();
277 AliFMDDebug(1, ("Reading %d bytes (%d 10bit words) from %d",
278 nchar, nchar * 8 / 10, ddl));
279 // Make a stream to read from
280 std::string str((char*)(cdata), nchar);
281 std::istringstream s(str);
282 // Prep the reader class.
283 AliFMDAltroReader r(s);
284 // Data array is approx twice the size needed.
285 UShort_t data[2048], hwaddr, last;
286 while (r.ReadChannel(hwaddr, last, data) > 0) {
287 AliFMDDebug(5, ("Read channel 0x%x of size %d", hwaddr, last));
288 UShort_t det, sec, str;
290 if (!pars->Hardware2Detector(ddl, hwaddr, det, ring, sec, str)) {
291 AliError(Form("Failed to detector id from DDL %d "
292 "and hardware address 0x%x", ddl, hwaddr));
295 rate = pars->GetSampleRate(det, ring, sec, str);
296 stripMin = pars->GetMinStrip(det, ring, sec, str);
297 stripMax = pars->GetMaxStrip(det, ring, sec, str);
298 AliFMDDebug(5, ("DDL 0x%04x, address 0x%03x maps to FMD%d%c[%2d,%3d]",
299 ddl, hwaddr, det, ring, sec, str));
301 // Loop over the `timebins', and make the digits
302 for (size_t i = 0; i < last; i++) {
303 if (i < preSamp) continue;
304 Int_t n = array->GetEntries();
305 UShort_t curStr = str + stripMin + i / rate;
306 if ((curStr-str) > stripMax) {
307 AliError(Form("Current strip is %d but DB says max is %d",
310 AliFMDDebug(5, ("making digit for FMD%d%c[%2d,%3d] from sample %4d",
311 det, ring, sec, curStr, i));
312 new ((*array)[n]) AliFMDDigit(det, ring, sec, curStr, data[i],
313 (rate >= 2 ? data[i+1] : 0),
314 (rate >= 3 ? data[i+2] : 0));
318 if (r.IsBof()) break;
326 // This is the old method, for comparison. It's really ugly, and far
328 //____________________________________________________________________
330 AliFMDRawReader::Exec(Option_t*)
332 // Read raw data into the digits array
333 // if (!fReader->ReadHeader()) {
334 // Error("ReadAdcs", "Couldn't read header");
339 TClonesArray* array = new TClonesArray("AliFMDDigit");
340 fTree->Branch("FMD", &array);
343 AliFMDParameters* pars = AliFMDParameters::Instance();
344 fSampleRate = pars->GetSampleRate(0);
346 // Use AliAltroRawStream to read the ALTRO format. No need to
347 // reinvent the wheel :-)
348 AliFMDRawStream input(fReader, fSampleRate);
350 fReader->Select("FMD");
354 UShort_t detector = 1; // Must be one here
355 UShort_t oldDetector = 0;
362 // Loop over data in file
367 Int_t ddl = fReader->GetDDLID();
368 AliFMDDebug(10, ("Current DDL is %d", ddl));
369 if (ddl != oldDDL || input.IsNewStrip() || !next) {
370 // Make a new digit, if we have some data (oldDetector == 0,
371 // means that we haven't really read anything yet - that is,
372 // it's the first time we get here).
373 if (oldDetector > 0) {
375 AliFMDDebug(10, ("Add a new strip: FMD%d%c[%2d,%3d] "
376 "(current: FMD%d%c[%2d,%3d])",
377 oldDetector, input.PrevRing(),
378 input.PrevSector() , input.PrevStrip(),
379 detector , input.Ring(), input.Sector(),
381 new ((*array)[n]) AliFMDDigit(oldDetector,
385 counts[0], counts[1], counts[2]);
389 static_cast<AliFMDDigit*>(fFMD->Digits()->
390 UncheckedAt(fFMD->GetNdigits()-1));
395 AliFMDDebug(10, ("Read %d channels for FMD%d",
396 count + 1, detector));
401 // If we got a new DDL, it means we have a new detector.
404 AliFMDDebug(10, ("Read %d channels for FMD%d", count + 1, detector));
405 // Reset counts, and update the DDL cache
408 // Check that we're processing a FMD detector
409 Int_t detId = fReader->GetDetectorID();
410 if (detId != (AliDAQ::DetectorID("FMD"))) {
411 AliError(Form("Detector ID %d != %d",
412 detId, (AliDAQ::DetectorID("FMD"))));
415 // Figure out what detector we're deling with
416 oldDetector = detector;
418 case 0: detector = 1; break;
419 case 1: detector = 2; break;
420 case 2: detector = 3; break;
422 AliError(Form("Unknown DDL 0x%x for FMD", ddl));
425 AliFMDDebug(10, ("Reading ADCs for 0x%x - That is FMD%d",
426 fReader->GetEquipmentId(), detector));
431 counts[input.Sample()] = input.Count();
433 AliFMDDebug(10, ("ADC of FMD%d%c[%2d,%3d] += %d",
434 detector, input.Ring(), input.Sector(),
435 input.Strip(), input.Count()));
436 oldDetector = detector;
443 //____________________________________________________________________
444 Bool_t AliFMDRawReader::ReadSODevent(AliFMDCalibSampleRate* sampleRate,
445 AliFMDCalibStripRange* stripRange,
447 TArrayS &pulseLength)
450 AliFMDDebug(0, ("Start of SOD/EOD"));
452 UInt_t shift_clk[18];
453 UInt_t sample_clk[18];
454 UInt_t strip_low[18];
455 UInt_t strip_high[18];
456 UInt_t pulse_size[18];
457 UInt_t pulse_length[18];
458 AliFMDParameters* param = AliFMDParameters::Instance();
459 AliFMDAltroMapping* map = param->GetAltroMap();
461 while(fReader->ReadNextData(fData)) {
463 Int_t ddl = fReader->GetDDLID();
464 Int_t detID = fReader->GetDetectorID();
465 AliFMDDebug(0, (" From reader: DDL number is %d , det ID is %d",ddl,detID));
467 fNbytes = fReader->GetDataSize();
469 ULong_t nWords = GetNwords();
470 UInt_t trailerLast = Get32bitWord(nWords);
471 AliFMDDebug(20, (" # Bytes: %d, # Words: %d, Last word: 0x%08x",
472 fNbytes, nWords, trailerLast));
473 if ((trailerLast & 0xFFFF0000) != 0xAAAA0000) {
474 AliWarning(Form("Last word 0x%08x does not match RCU II trailer",
479 // 7 last bits is size of trailer
480 ULong_t nTrailerWords = trailerLast & 0x7f;
481 ULong_t nPayloadWords = Get32bitWord(nWords - nTrailerWords+1);
483 AliFMDDebug(20, (" # trailer words: %d, # payload words: %d",
484 nTrailerWords, nPayloadWords));
487 for (ULong_t i = 1; i <= nPayloadWords ; i++) {
488 UInt_t payloadWord = Get32bitWord(i);
490 // address is only 24 bit
491 UInt_t address = (0xffffff & payloadWord);
492 UInt_t type = ((address >> 21) & 0xf);
493 UInt_t error = ((address >> 20) & 0x1);
494 UInt_t bcast = ((address >> 18) & 0x1);
495 UInt_t bc_not_altro = ((address >> 17) & 0x1);
496 UInt_t board = ((address >> 12) & 0x1f);
497 UInt_t instruction = 0;
501 instruction = address & 0xfff;
503 chip = ((address >> 9) & 0x7);
504 channel = ((address >> 5) & 0x5);
505 instruction = (address & 0x1f);
508 Bool_t readDataWord = kFALSE;
510 case 0x0: // Fec read
511 readDataWord = kTRUE;
513 case 0x2: // Fec write
519 case 0x6: // End sequence
521 i = nPayloadWords + 1;
527 //Don't read unless we have a FEC_RD
528 if(!readDataWord) continue;
530 UInt_t dataWord = Get32bitWord(i);
531 UInt_t data = (0xFFFFF & dataWord) ;
532 //UInt_t data = (0xFFFF & dataWord) ;
535 AliWarning(Form("error bit detected at Word 0x%06x; "
536 "error % d, type %d, bc_not_altro %d, "
537 "bcast %d, board 0x%02x, chip 0x%x, "
538 "channel 0x%02x, instruction 0x%03x",
539 address, error, type, bc_not_altro,
540 bcast,board,chip,channel,instruction));
546 switch(instruction) {
548 case 0x01: break; // First ADC T
549 case 0x02: break; // I 3.3 V
550 case 0x03: break; // I 2.5 V altro digital
551 case 0x04: break; // I 2.5 V altro analog
552 case 0x05: break; // I 2.5 V VA
553 case 0x06: break; // First ADC T
554 case 0x07: break; // I 3.3 V
555 case 0x08: break; // I 2.5 V altro digital
556 case 0x09: break; // I 2.5 V altro analog
557 case 0x0A: break; // I 2.5 V VA
558 case 0x2D: break; // Second ADC T
559 case 0x2E: break; // I 1.5 V VA
560 case 0x2F: break; // I -2.0 V
561 case 0x30: break; // I -2.0 V VA
562 case 0x31: break; // 2.5 V Digital driver
563 case 0x32: break; // Second ADC T
564 case 0x33: break; // I 1.5 V VA
565 case 0x34: break; // I -2.0 V
566 case 0x35: break; // I -2.0 V VA
567 case 0x36: break; // 2.5 V Digital driver
568 case 0x37: break; // Third ADC T
569 case 0x38: break; // Temperature sens. 1
570 case 0x39: break; // Temperature sens. 2
571 case 0x3A: break; // U 2.5 altro digital (m)
572 case 0x3B: break; // U 2.5 altro analog (m)
573 case 0x3C: break; // Third ADC T
574 case 0x3D: break; // Temperature sens. 1
575 case 0x3E: break; // Temperature sens. 2
576 case 0x3F: break; // U 2.5 altro digital (m)
577 case 0x40: break; // U 2.5 altro analog (m)
578 case 0x41: break; // Forth ADC T
579 case 0x42: break; // U 2.5 VA (m)
580 case 0x43: break; // U 1.5 VA (m)
581 case 0x44: break; // U -2.0 VA (m)
582 case 0x45: break; // U -2.0 (m)
583 case 0x46: break; // Forth ADC T
584 case 0x47: break; // U 2.5 VA (m)
585 case 0x48: break; // U 1.5 VA (m)
586 case 0x49: break; // U -2.0 VA (m)
587 case 0x4A: break; // U -2.0 (m)
589 case 0x0B: break; // L1 trigger CouNTer
590 case 0x0C: break; // L2 trigger CouNTer
591 case 0x0D: break; // Sampling CLK CouNTer
592 case 0x0E: break; // DSTB CouNTer
594 case 0x0F: break; // Test mode word
595 case 0x10: break; // Undersampling ratio.
596 // Configuration and status
597 case 0x11: break; // Config/Status Register 0
598 case 0x12: break; // Config/Status Register 1
599 case 0x13: break; // Config/Status Register 2
600 case 0x14: break; // Config/Status Register 3
601 case 0x15: break; // Free
603 case 0x16: break; // Latch L1, L2, SCLK Counters
604 case 0x17: break; // Clear counters
605 case 0x18: break; // Clear CSR1
606 case 0x19: break; // rstb ALTROs
607 case 0x1A: break; // rstb BC
608 case 0x1B: break; // Start conversion
609 case 0x1C: break; // Scan event length
610 case 0x1D: break; // Read event length
611 case 0x1E: break; // Start test mode
612 case 0x1F: break; // Read acquisition memory
614 case 0x20: break; // FMDD status
615 case 0x21: break; // L0 counters
616 case 0x22: break; // FMD: Wait to hold
617 case 0x23: break; // FMD: L1 timeout
618 case 0x24: break; // FMD: L2 timeout
619 case 0x25: // FMD: Shift clk
620 shift_clk[board] = ((data >> 8 ) & 0xFF);
622 case 0x26: // FMD: Strips
623 strip_low[board] = ((data >> 0 ) & 0xFF);
624 strip_high[board] = ((data >> 8 ) & 0xFF);
626 case 0x27: // FMD: Cal pulse
627 pulse_size[board] = ((data >> 8 ) & 0xFF);
629 case 0x28: break; // FMD: Shape bias
630 case 0x29: break; // FMD: Shape ref
631 case 0x2A: break; // FMD: Preamp ref
632 case 0x2B: // FMD: Sample clk
633 sample_clk[board] = ((data >> 8 ) & 0xFF);
635 case 0x2C: break; // FMD: Commands
636 case 0x4B: // FMD: Cal events
637 pulse_length[board] = ((data >> 0 ) & 0xFF);
642 AliFMDDebug(50, ("instruction 0x%x, dataword 0x%x",
643 instruction,dataWord));
650 const UInt_t boards[4] = {0,1,16,17};
651 for(Int_t i=0;i<4;i++) {
652 if(ddl==0 && (i==1 || i==3)) continue;
654 UInt_t chip =0, channel=0;
655 det = map->DDL2Detector(ddl);
656 map->Channel2StripBase(boards[i], chip, channel, ring, sector, strip);
658 UInt_t samplerate = 1;
659 if(sample_clk[boards[i]] == 0) {
661 Int_t sample1 = sample_clk[boards[0]];
662 Int_t sample2 = sample_clk[boards[2]];
663 if(sample1) sample_clk[boards[i]] = sample1;
664 else sample_clk[boards[i]] = sample2;
667 Int_t sample1 = sample_clk[boards[0]];
668 Int_t sample2 = sample_clk[boards[1]];
669 Int_t sample3 = sample_clk[boards[2]];
670 Int_t sample4 = sample_clk[boards[3]];
672 if(sample1 == sample2) agreement++;
673 if(sample1 == sample3) agreement++;
674 if(sample1 == sample4) agreement++;
675 if(sample2 == sample3) agreement++;
676 if(sample2 == sample4) agreement++;
677 if(sample3 == sample4) agreement++;
683 sample_clk[boards[i]] = sample_clk[boards[idx]];
684 shift_clk[boards[i]] = shift_clk[boards[idx]];
685 strip_low[boards[i]] = strip_low[boards[idx]];
686 strip_high[boards[i]] = strip_high[boards[idx]];
687 pulse_length[boards[i]] = pulse_length[boards[idx]];
688 pulse_size[boards[i]] = pulse_size[boards[idx]];
689 AliFMDDebug(0, ("Vote taken for ddl %d, board 0x%x",
695 if(sample_clk[boards[i]])
696 samplerate = shift_clk[boards[i]]/sample_clk[boards[i]];
697 sampleRate->Set(det,ring,sector,0,samplerate);
698 stripRange->Set(det,ring,sector,0,
699 strip_low[boards[i]],strip_high[boards[i]]);
701 AliFMDDebug(20, ("det %d, ring %c, ",det,ring));
702 pulseLength.AddAt(pulse_length[boards[i]],
703 GetHalfringIndex(det,ring,boards[i]/16));
704 pulseSize.AddAt(pulse_size[boards[i]],
705 GetHalfringIndex(det,ring,boards[i]/16));
709 AliFMDDebug(20, (": Board: 0x%02x\n"
710 "\tstrip_low %3d, strip_high %3d\n"
711 "\tshift_clk %3d, sample_clk %3d\n"
712 "\tpulse_size %3d, pulse_length %3d",
714 strip_low[boards[i]], strip_high[boards[i]],
715 shift_clk[boards[i]], sample_clk[boards[i]],
716 pulse_size[boards[i]],pulse_length[boards[i]]));
721 AliFMDParameters::Instance()->SetSampleRate(sampleRate);
722 AliFMDParameters::Instance()->SetStripRange(stripRange);
724 AliFMDDebug(0, ("End of SOD/EOD"));
728 //____________________________________________________________________
730 UInt_t AliFMDRawReader::Get32bitWord(Int_t idx)
732 // This method returns the 32 bit word at a given
733 // position inside the raw data payload.
734 // The 'index' points to the beginning of the next word.
735 // The method is supposed to be endian (platform)
738 AliFatal("Raw data paylod buffer is not yet initialized !");
744 // fRawReader->AddFatalErrorLog(k32bitWordReadErr,Form("pos = %d",index));
746 AliWarning(Form("Invalid raw data payload position (%d) !",index));
751 word = fData[--index] << 24;
752 word |= fData[--index] << 16;
753 word |= fData[--index] << 8;
754 word |= fData[--index] << 0 ;
758 //_____________________________________________________________________
759 Int_t AliFMDRawReader::GetHalfringIndex(UShort_t det, Char_t ring,
762 UShort_t iring = (ring == 'I' ? 1 : 0);
764 Int_t index = (((det-1) << 2) | (iring << 1) | (board << 0));
769 //____________________________________________________________________