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 Revision 1.19.1 2008/09/19 preghenella
19 Decode method updated:
20 it reads the CDH from the rawReader and sends it to the decoder;
21 LoadRawDataBuffers modified:
22 it corrects tof hit infos per ddlBC and deltaBC offsets
23 (in case of the static member fgApplyBCCorrections
24 has been setted to kTRUE);
25 Added static member fgApplyBCCorrections (kTRUE by default)
26 and the related static method ApplyBCCorrections;
28 Revision 1.19 2007/05/18 13:07:53 decaro
29 Error messages stored in the global raw-reader error log (Cvetan, Chiara)
31 Revision 1.18 2007/05/08 11:53:29 arcelli
32 Improved class flexibility for further use (R.Preghenella)
34 Revision 1.17 2007/05/03 08:53:50 decaro
35 Coding convention: RS3 violation -> suppression
37 Revision 1.16 2007/05/03 08:22:22 decaro
38 Coding convention: RN17 violation -> suppression
40 Revision 1.15 2007/04/30 15:22:06 arcelli
41 Change TOF digit Time, Tot etc to int type
43 Revision 1.14 2007/04/27 11:11:53 arcelli
44 updates for the new decoder
46 Revision 1.13 2007/03/16 11:46:35 decaro
47 Coding convention: RN17 rule violation -> suppression
49 Revision 1.12 2007/02/22 09:43:45 decaro
50 Added AliTOFRawStream::GetIndex method for online calibration (C.Zampolli)
52 Revision 1.11 2007/02/20 15:57:00 decaro
53 Raw data update: to read the TOF raw data defined in UNPACKED mode
55 Revision 1.10 2006/12/15 14:01:38 cvetan
58 Revision 1.9 2006/10/13 11:22:27 arcelli
59 remove warnings due to uninitialized AliTOFtdcDigit data members
61 Revision 1.8 2006/08/22 13:30:17 arcelli
62 removal of effective c++ warnings (C.Zampolli)
64 Revision 1.7 2006/08/10 14:46:54 decaro
65 TOF raw data format: updated version
67 Revision 1.6.1 2006/06/28 A. De Caro, R. Preghenella:
68 Update TOF raw data format
69 according to the final version
70 (see the ALICE internal note in preparation
71 'ALICE TOF raw data format')
72 Added the methods for the correspoonding numbering
73 between the equipment IDs and the volume IDs:
78 Revision 0.02 2005/07/28 A. De Caro:
79 Update format TOF raw data
81 Correction of few wrong corrispondences
82 between 'software' and 'hardware' numberings
84 Revision 0.01 2005/07/22 A. De Caro
85 Implement methods Next()
93 ////////////////////////////////////////////////////////////////////////
95 // This class provides access to TOF raw data in DDL files. //
97 // It loops over all TOF raw data given by the AliRawReader. //
99 ////////////////////////////////////////////////////////////////////////
102 #include "Riostream.h"
104 #include "TClonesArray.h"
108 #include "AliRawReader.h"
110 #include "AliTOFGeometry.h"
111 #include "AliTOFrawData.h"
112 #include "AliTOFRawMap.h"
113 #include "AliTOFRawStream.h"
114 //#include "AliTOFCableLengthMap.h"
116 #include "AliTOFHitData.h"
118 #include "AliRawEventHeaderBase.h"
119 #include "AliRawDataHeader.h"
121 ClassImp(AliTOFRawStream)
123 const Int_t AliTOFRawStream::fgkddlBCshift[72] =
145 Bool_t AliTOFRawStream::fgApplyBCCorrections = kTRUE;
146 //_____________________________________________________________________________
147 AliTOFRawStream::AliTOFRawStream(AliRawReader* rawReader):
148 fRawReader(rawReader),
150 fDecoder(new AliTOFDecoder()),
175 fInsideTRMchain0(kFALSE),
176 fInsideTRMchain1(kFALSE),
177 fLocalEventCounterDRM(-1),
178 fLocalEventCounterLTM(-1),
179 fLocalEventCounterTRM(0x0),
180 fLocalEventCounterChain(0x0),
182 fCableLengthMap(0x0),
186 // create an object to read TOF raw digits
189 for (Int_t i=0;i<AliDAQ::NumberOfDdls("TOF");i++){
190 fDataBuffer[i]=new AliTOFHitDataBuffer();
191 fPackedDataBuffer[i]=new AliTOFHitDataBuffer();
194 fTOFrawData = new TClonesArray("AliTOFrawData",1000);
195 fTOFrawData->SetOwner();
198 fRawReader->Select("TOF");
200 fLocalEventCounterTRM = new Int_t[13];
201 fLocalEventCounterChain = new Int_t*[13];
202 fChainBunchID = new Int_t*[13];
203 for (Int_t j=0;j<13;j++){
204 fLocalEventCounterTRM[j] = -1;
205 fLocalEventCounterChain[j] = new Int_t[2];
206 fChainBunchID[j] = new Int_t[2];
207 for (Int_t k=0;k<2;k++){
208 fLocalEventCounterChain[j][k] = -1;
209 fChainBunchID[j][k] = -1;
213 fCableLengthMap = new AliTOFCableLengthMap();
215 fEventID = (Int_t)fRawReader->GetBCID(); //bunch crossing
219 //_____________________________________________________________________________
220 AliTOFRawStream::AliTOFRawStream():
223 fDecoder(new AliTOFDecoder()),
248 fInsideTRMchain0(kFALSE),
249 fInsideTRMchain1(kFALSE),
250 fLocalEventCounterDRM(-1),
251 fLocalEventCounterLTM(-1),
252 fLocalEventCounterTRM(0x0),
253 fLocalEventCounterChain(0x0),
255 fCableLengthMap(0x0),
261 for (Int_t i=0;i<AliDAQ::NumberOfDdls("TOF");i++){
262 fDataBuffer[i]=new AliTOFHitDataBuffer();
263 fPackedDataBuffer[i]=new AliTOFHitDataBuffer();
266 fTOFrawData = new TClonesArray("AliTOFrawData",1000);
267 fTOFrawData->SetOwner();
269 fLocalEventCounterTRM = new Int_t[13];
270 fLocalEventCounterChain = new Int_t*[13];
271 fChainBunchID = new Int_t*[13];
272 for (Int_t j=0;j<13;j++){
273 fLocalEventCounterTRM[j] = -1;
274 fLocalEventCounterChain[j] = new Int_t[2];
275 fChainBunchID[j] = new Int_t[2];
276 for (Int_t k=0;k<2;k++){
277 fLocalEventCounterChain[j][k] = -1;
278 fChainBunchID[j][k] = -1;
282 fCableLengthMap = new AliTOFCableLengthMap();
286 //_____________________________________________________________________________
287 AliTOFRawStream::AliTOFRawStream(const AliTOFRawStream& stream) :
291 fDecoder(new AliTOFDecoder()),
316 fInsideTRMchain0(kFALSE),
317 fInsideTRMchain1(kFALSE),
318 fLocalEventCounterDRM(-1),
319 fLocalEventCounterLTM(-1),
320 fLocalEventCounterTRM(0x0),
321 fLocalEventCounterChain(0x0),
323 fCableLengthMap(0x0),
330 fRawReader = stream.fRawReader;
332 fTOFrawData = stream.fTOFrawData;
336 fTRMchain = stream.fTRMchain;
338 fTDCchannel = stream.fTDCchannel;
339 fTime = stream.fTime;
341 fLeadingEdge = stream.fLeadingEdge;
342 fTrailingEdge = stream.fTrailingEdge;
344 fErrorFlag = stream.fErrorFlag;
346 fSector = stream.fSector;
347 fPlate = stream.fPlate;
348 fStrip = stream.fStrip;
349 fPadX = stream.fPadX;
350 fPadZ = stream.fPadZ;
352 fPackedDigits = stream.fPackedDigits;
354 fWordType = stream.fWordType;
355 fSlotID = stream.fSlotID;
357 fPSbit = stream.fPSbit;
358 fTDCerrorFlag = stream.fTDCerrorFlag;
359 fInsideDRM = stream.fInsideDRM;
360 fInsideTRM = stream.fInsideTRM;
361 fInsideLTM = stream.fInsideLTM;
362 fInsideTRMchain0 = stream.fInsideTRMchain0;
363 fInsideTRMchain1 = stream.fInsideTRMchain1;
365 for (Int_t i=0;i<AliDAQ::NumberOfDdls("TOF");i++){
366 fDataBuffer[i]= new AliTOFHitDataBuffer(*stream.fDataBuffer[i]);
367 fPackedDataBuffer[i]= new AliTOFHitDataBuffer(*stream.fPackedDataBuffer[i]);
370 fTOFrawData = new TClonesArray(*stream.fTOFrawData);
372 fLocalEventCounterDRM = stream.fLocalEventCounterDRM;
373 fLocalEventCounterLTM = stream.fLocalEventCounterLTM;
374 for (Int_t j=0;j<13;j++){
375 fLocalEventCounterTRM[j] = stream.fLocalEventCounterTRM[j];
376 for (Int_t k=0;k<2;k++){
377 fLocalEventCounterChain[j][k] = stream.fLocalEventCounterChain[j][k];
378 fChainBunchID[j][k] = stream.fChainBunchID[j][k];
382 fCableLengthMap = stream.fCableLengthMap;
384 fEventID = stream.fEventID;
388 //_____________________________________________________________________________
389 AliTOFRawStream& AliTOFRawStream::operator = (const AliTOFRawStream& stream)
392 // assignment operator
395 fRawReader = stream.fRawReader;
397 fTOFrawData = stream.fTOFrawData;
401 fTRMchain = stream.fTRMchain;
403 fTDCchannel = stream.fTDCchannel;
404 fTime = stream.fTime;
406 fLeadingEdge = stream.fLeadingEdge;
407 fTrailingEdge = stream.fTrailingEdge;
408 fErrorFlag = stream.fErrorFlag;
410 fSector = stream.fSector;
411 fPlate = stream.fPlate;
412 fStrip = stream.fStrip;
413 fPadX = stream.fPadX;
414 fPadZ = stream.fPadZ;
416 fPackedDigits = stream.fPackedDigits;
418 fWordType = stream.fWordType;
419 fSlotID = stream.fSlotID;
421 fPSbit = stream.fPSbit;
422 fTDCerrorFlag = stream.fTDCerrorFlag;
423 fInsideDRM = stream.fInsideDRM;
424 fInsideTRM = stream.fInsideTRM;
425 fInsideLTM = stream.fInsideLTM;
426 fInsideTRMchain0 = stream.fInsideTRMchain0;
427 fInsideTRMchain1 = stream.fInsideTRMchain1;
429 for (Int_t i=0;i<AliDAQ::NumberOfDdls("TOF");i++){
430 fDataBuffer[i] = stream.fDataBuffer[i];
431 fPackedDataBuffer[i] = stream.fPackedDataBuffer[i];
434 fTOFrawData = stream.fTOFrawData;
436 fLocalEventCounterDRM = stream.fLocalEventCounterDRM;
437 fLocalEventCounterLTM = stream.fLocalEventCounterLTM;
438 for (Int_t j=0;j<13;j++){
439 fLocalEventCounterTRM[j] = stream.fLocalEventCounterTRM[j];
440 for (Int_t k=0;k<2;k++){
441 fLocalEventCounterChain[j][k] = stream.fLocalEventCounterChain[j][k];
442 fChainBunchID[j][k] = stream.fChainBunchID[j][k];
446 fCableLengthMap = stream.fCableLengthMap;
448 fEventID = stream.fEventID;
454 //_____________________________________________________________________________
455 AliTOFRawStream::~AliTOFRawStream()
461 for (Int_t i=0;i<72;i++){
462 delete fDataBuffer[i];
463 delete fPackedDataBuffer[i];
468 fTOFrawData->Clear();
471 delete [] fLocalEventCounterTRM;
472 for (Int_t ii=0; ii<2; ii++) {
473 delete [] fLocalEventCounterChain[ii];
474 delete [] fChainBunchID[ii];
476 delete fCableLengthMap;
481 //_____________________________________________________________________________
483 void AliTOFRawStream::LoadRawData(Int_t indexDDL)
489 fTOFrawData->Clear();
491 TClonesArray &arrayTofRawData = *fTOFrawData;
495 // create raw data map
496 AliTOFRawMap *rawMap = new AliTOFRawMap(fTOFrawData);
499 Int_t slot[4] = {-1, -1, -1, -1};
501 fLocalEventCounterDRM = -1;
502 fLocalEventCounterLTM = -1;
503 for (Int_t ii=0; ii<13; ii++)
504 fLocalEventCounterTRM[ii] = -1;
505 for (Int_t ii=0; ii<13; ii++)
506 for (Int_t jj=0; jj<2; jj++)
507 fLocalEventCounterChain[ii][jj] = -1;
510 fRawReader->Select("TOF", indexDDL, indexDDL);
512 Bool_t signal = kFALSE;
514 AliTOFrawData *rawDigit = NULL;
518 signal = (fSector!=-1 && fPlate!=-1 && fStrip!=-1 && fPadZ!=-1 && fPadX!=-1);
520 AliDebug(2,Form(" %2i %1i %2i %1i %2i", fSector, fPlate, fStrip, fPadZ, fPadX));
525 slot[3] = fTDCchannel;
527 if (rawMap->TestHit(slot) != kEmpty) {
529 rawDigit = static_cast<AliTOFrawData*>(rawMap->GetHit(slot));
531 if (rawDigit->GetLeading()!=-1 && rawDigit->GetTrailing()==-1 &&
532 fLeadingEdge==-1 && fTrailingEdge!=-1) {
534 rawDigit->Update(fTime, fToT, fLeadingEdge, fTrailingEdge, fPSbit, fACQ, fErrorFlag);
536 else if ( ((rawDigit->GetTOF()!=-1 || rawDigit->GetLeading()!=-1 || rawDigit->GetTrailing()!=-1) &&
537 (fLeadingEdge!=-1 || fTrailingEdge!=-1 || fTime!=-1) )
542 new (arrayTofRawData[fPackedDigits++]) AliTOFrawData(fTRM, fTRMchain, fTDC, fTDCchannel, fTime, fToT, fLeadingEdge, fTrailingEdge, fPSbit, fACQ, fErrorFlag);
544 rawMap->SetHit(slot);
552 new (arrayTofRawData[fPackedDigits++]) AliTOFrawData(fTRM, fTRMchain, fTDC, fTDCchannel, fTime, fToT, fLeadingEdge, fTrailingEdge, fPSbit, fACQ, fErrorFlag);
554 rawMap->SetHit(slot);
556 } // else if (rawMap->TestHit(slot) == kEmpty)
560 } // closed -> while (Next())
566 //_____________________________________________________________________________
567 Bool_t AliTOFRawStream::Next()
570 // Read next 32-bit word in TOF raw data files
571 // returns kFALSE if there is no word left
578 if (!fRawReader->ReadNextInt(data)) return kFALSE;
580 if (fSector!=-1 && fPlate!=-1 && fStrip!=-1 && fPadZ!=-1 && fPadX!=-1) {
592 fDDL = fRawReader->GetDDLID();
594 fWordType = GetField(data,WORD_TYPE_MASK,WORD_TYPE_POSITION);
596 switch (fWordType) { // switch word type
598 case GLOBAL_HEADER_TYPE: // global header
599 fSlotID = GetField(data, HEADER_SLOT_ID_MASK, HEADER_SLOT_ID_POSITION);
603 switch (fSlotID) { // switch global header slot ID
605 case DRM_ID_NUMBER: //DRM global header
606 if (fInsideDRM) { // unexpected DRM global headers -> exit
609 fInsideDRM = kTRUE; // DRM global header accepted
612 case LTM_ID_NUMBER: // LTM global header
613 if (fInsideLTM) { // unexpected LTM global headers -> exit
616 fInsideLTM = kTRUE; // LTM global header accepted
626 case 10: //TRM header
627 case 11: //TRM header
628 case 12: //TRM header
629 if (fInsideTRM) { // unexpected TRM global headers -> exit
632 fInsideTRM = kTRUE; // TRM global header accepted
633 fACQ = GetField(data,TRM_ACQ_BITS_MASK,TRM_ACQ_BITS_POSITION);
636 default: // unexpected global header slot ID
639 } //end switch global header slot id
644 case GLOBAL_TRAILER_TYPE: // global trailer
645 fSlotID = GetField(data,HEADER_SLOT_ID_MASK,HEADER_SLOT_ID_POSITION);
647 switch (fSlotID) { // switch global trailer slot ID
649 case DRM_ID_NUMBER: // DRM global trailer
650 if (!fInsideDRM) { // unexpected DRM global trailers -> exit
654 //AliInfo(Form(" DRM local event counter = %i", GetField(data,dummy,4)));
655 fLocalEventCounterDRM = GetField(data,dummy,4);
656 fInsideDRM = kFALSE; // DRM global trailer accepted
659 fInsideTRMchain0 = kFALSE;
660 fInsideTRMchain1 = kFALSE;
680 case LTM_ID_NUMBER: // LTM global trailer
681 if (!fInsideLTM) { // unexpected LTM global trailer -> exit
685 //AliInfo(Form(" LTM local event counter = %i", GetField(data,dummy,16)));
686 fLocalEventCounterLTM = GetField(data,dummy,16);
687 fInsideLTM = kFALSE; // LTM global trailer accepted
689 case 15: //TRM global trailer
690 if (!fInsideTRM) { // unexpected TRM global trailers -> exit
694 //AliInfo(Form(" TRM local event counter = %i", GetField(data,dummy,16)));
695 fLocalEventCounterTRM[fTRM] = GetField(data,dummy,16);
696 fInsideTRM = kFALSE; // TRM global trailer accepted
698 default: // unexpected global trailer slot ID
700 } //end switch global trailer slot id
706 case ERROR_TYPE: // TDC error
707 fTDC = GetField(data,TRM_TDC_ERROR_TDC_ID_MASK,TRM_TDC_ERROR_TDC_ID_POSITION);
708 fTDCerrorFlag = GetField(data,TRM_TDC_ERROR_FLAGS_MASK,TRM_TDC_ERROR_FLAGS_POSITION);
712 case FILLER_TYPE: // filler
716 default: // other word types
718 if (fInsideTRM) { // inside TRM
720 switch (fWordType) { // switch word type inside TRM
721 case TRM_CHAIN0_HEADER_TYPE: // TRM chain0 header
722 if (fInsideTRMchain0) { // unexpected TRM chain0 header
725 fInsideTRMchain0 = kTRUE;
728 //AliInfo(Form(" chain bunch ID = %i", GetField(data,dummy,4)));
729 fChainBunchID[fTRM][fTRMchain] = GetField(data,dummy,4);
731 case TRM_CHAIN0_TRAILER_TYPE: // TRM chain0 trailer
732 if (!fInsideTRMchain0) { // unexpected TRM chain0 trailer
736 //AliInfo(Form(" chain local event counter = %i", GetField(data,dummy,16)));
737 fLocalEventCounterChain[fTRM][fTRMchain] = GetField(data,dummy,16);
738 fInsideTRMchain0 = kFALSE;
741 case TRM_CHAIN1_HEADER_TYPE: // TRM chain1 header
742 if (fInsideTRMchain1) { // unexpected TRM chain1 header
745 fInsideTRMchain1 = kTRUE;
748 //AliInfo(Form(" chain bunch ID = %i", GetField(data,dummy,4)));
749 fChainBunchID[fTRM][fTRMchain] = GetField(data,dummy,4);
751 case TRM_CHAIN1_TRAILER_TYPE: // TRM chain1 trailer
752 if (!fInsideTRMchain1) { // unexpected TRM chain1 trailer
756 //AliInfo(Form(" chain local event counter = %i", GetField(data,dummy,16)));
757 fLocalEventCounterChain[fTRM][fTRMchain] = GetField(data,dummy,16);
758 fInsideTRMchain1 = kFALSE;
761 } // end switch word type inside TRM
763 } // end if (fInsideTRM)
767 ((fInsideTRMchain0&&!fInsideTRMchain1) || (!fInsideTRMchain0&&fInsideTRMchain1))
768 && fWordType!=TRM_CHAIN0_HEADER_TYPE && fWordType!=TRM_CHAIN0_TRAILER_TYPE
769 && fWordType!=TRM_CHAIN1_HEADER_TYPE && fWordType!=TRM_CHAIN1_TRAILER_TYPE
770 ){ // inside TRM chains
772 fPSbit = GetField(data,TRM_PS_BITS_MASK,TRM_PS_BITS_POSITION);
773 fTDC = GetField(data,TRM_TDC_ID_MASK,TRM_TDC_ID_POSITION);
774 fTDCchannel = GetField(data,TRM_CHAN_MASK,TRM_CHAN_POSITION);
775 fErrorFlag = GetField(data,TRM_E_BIT_MASK,TRM_E_BIT_POSITION);
784 switch (fPSbit) { // switch fPSbit bits inside TRM chains
786 case 0: // packing ok, digit time and TOT
787 fToT = GetField(data,TRM_TOT_WIDTH_MASK, TRM_TOT_WIDTH_POSITION);
788 fTime = GetField(data,TRM_DIGIT_TIME_MASK,TRM_DIGIT_TIME_POSITION)
790 fCableLengthMap->GetCableTimeShiftBin(fDDL, fTRM, fTRMchain, fTDC)*/
792 if (fgApplyBCCorrections) {
793 AliDebug(2,"Apply nominal DDL BC time-shift correction");
794 AliDebug(2,"Apply deltaBC time-shift correction");
795 AliDebug(2,Form(" fChainBunchID[%d][%d] = %d ,fEventID = %d",fTRM,fTRMchain,fChainBunchID[fTRM][fTRMchain],fEventID));
797 (Int_t)(fgkddlBCshift[fDDL]*25./AliTOFGeometry::TdcBinWidth()*1.E+03)
799 (Int_t)((fChainBunchID[fTRM][fTRMchain]-fEventID)*25./AliTOFGeometry::TdcBinWidth()*1.E+03);
803 case 1: // leading edge digit, long digit time, no TOT
806 fLeadingEdge = GetField(data,TRM_LONG_DIGIT_TIME_MASK,TRM_LONG_DIGIT_TIME_POSITION)
808 fCableLengthMap->GetCableTimeShiftBin(fDDL, fTRM, fTRMchain, fTDC)*/
810 if (fgApplyBCCorrections) {
811 AliDebug(2,"Apply nominal DDL BC time-shift correction");
812 AliDebug(2,"Apply deltaBC time-shift correction");
813 AliDebug(2,Form(" fChainBunchID[%d][%d] = %d ,fEventID = %d",fTRM,fTRMchain,fChainBunchID[fTRM][fTRMchain],fEventID));
815 (Int_t)(fgkddlBCshift[fDDL]*25./AliTOFGeometry::TdcBinWidth()*1.E+03)
817 (Int_t)((fChainBunchID[fTRM][fTRMchain]-fEventID)*25./AliTOFGeometry::TdcBinWidth()*1.E+03);
821 case 2: // trailing edge digit, long digit time, no TOT
824 fTrailingEdge = GetField(data,TRM_LONG_DIGIT_TIME_MASK,TRM_LONG_DIGIT_TIME_POSITION)
826 fCableLengthMap->GetCableTimeShiftBin(fDDL, fTRM, fTRMchain, fTDC)*/
828 if (fgApplyBCCorrections) {
829 AliDebug(2,"Apply nominal DDL BC time-shift correction");
830 AliDebug(2,"Apply deltaBC time-shift correction");
831 AliDebug(2,Form(" fChainBunchID[%d][%d] = %d ,fEventID = %d",fTRM,fTRMchain,fChainBunchID[fTRM][fTRMchain],fEventID));
833 (Int_t)(fgkddlBCshift[fDDL]*25./AliTOFGeometry::TdcBinWidth()*1.E+03)
835 (Int_t)((fChainBunchID[fTRM][fTRMchain]-fEventID)*25./AliTOFGeometry::TdcBinWidth()*1.E+03);
839 case 3: // TOT overflow
840 fToT = GetField(data,TRM_TOT_WIDTH_MASK, TRM_TOT_WIDTH_POSITION);
841 fTime = GetField(data,TRM_DIGIT_TIME_MASK,TRM_DIGIT_TIME_POSITION)
843 fCableLengthMap->GetCableTimeShiftBin(fDDL, fTRM, fTRMchain, fTDC)*/
845 if (fgApplyBCCorrections) {
846 AliDebug(2,"Apply nominal DDL BC time-shift correction");
847 AliDebug(2,"Apply deltaBC time-shift correction");
848 AliDebug(2,Form(" fChainBunchID[%d][%d] = %d ,fEventID = %d",fTRM,fTRMchain,fChainBunchID[fTRM][fTRMchain],fEventID));
850 (Int_t)(fgkddlBCshift[fDDL]*25./AliTOFGeometry::TdcBinWidth()*1.E+03)
852 (Int_t)((fChainBunchID[fTRM][fTRMchain]-fEventID)*25./AliTOFGeometry::TdcBinWidth()*1.E+03);
856 } // end switch PS bits inside TRM chains
858 } // end if is inside TRM chains
860 } // end switch on fWordType
866 //_____________________________________________________________________________
868 void AliTOFRawStream::SetSector()
871 // Evaluate the TOF sector number -> [ 0;17]
872 // corresponding to the TOF equipment IDs:
875 // fTRMchain -> [ 0; 1]
877 // fTDCchannel -> [ 0; 7]
882 if (!(fDDL==-1)) iSector = Int_t((Float_t)(fDDL)/AliTOFGeometry::NDDL());
887 //_____________________________________________________________________________
890 void AliTOFRawStream::SetPlate()
893 // Evaluate the TOF plate number ->[ 0; 4]
894 // corresponding to the TOF equipment IDs:
897 // fTRMchain -> [ 0; 1]
899 // fTDCchannel -> [ 0; 7]
903 if (!(fDDL==-1 || fTRM==-1 || fTDC==-1
905 iPlate = Equip2VolNplate(GetDDLnumberPerSector(fDDL), fTRM, fTDC);
910 //_____________________________________________________________________________
912 void AliTOFRawStream::SetStrip()
915 // Evaluate the TOF strip number per module -> [ 0; 14/18]
916 // corresponding to the TOF equipment IDs:
919 // fTRMchain -> [ 0; 1]
921 // fTDCchannel -> [ 0; 7]
926 if (!(fDDL==-1 || fTRM==-1 || fTDC==-1
927 || fSector==-1 || fPlate==-1))
928 iStrip = Equip2VolNstrip(GetDDLnumberPerSector(fDDL), fTRM, fTDC);
933 //_____________________________________________________________________________
935 void AliTOFRawStream::SetPadZ()
938 // Evaluate the TOF padRow number per strip -> [ 0; 1]
939 // corresponding to the TOF equipment IDs:
942 // fTRMchain -> [ 0; 1]
944 // fTDCchannel -> [ 0; 7]
949 if (!(fDDL==-1 || fTRM==-1 || fTRMchain==-1 || fTDC==-1 || fTDCchannel==-1
950 || fSector==-1 || fPlate==-1 || fStrip==-1))
952 Int_t iPadAlongTheStrip = Equip2VolNpad(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel);
953 if (iPadAlongTheStrip!=-1)
954 iPadZ = iPadAlongTheStrip%AliTOFGeometry::NpadZ();
957 //iPadZ = Equip2VolNpad(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel)%AliTOFGeometry::NpadZ();
958 //iPadZ = Equip2VolNpadZ(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel);
963 //_____________________________________________________________________________
965 void AliTOFRawStream::SetPadX()
968 // Evaluate the TOF pad number per strip padRow -> [ 0;47]
969 // corresponding to the TOF equipment IDs:
972 // fTRMchain -> [ 0; 1]
974 // fTDCchannel -> [ 0; 7]
979 if (!(fDDL==-1 || fTRM==-1 || fTRMchain==-1 || fTDC==-1 || fTDCchannel==-1
980 || fSector==-1 || fPlate==-1 || fStrip==-1))
982 Int_t iPadAlongTheStrip = Equip2VolNpad(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel);
983 if (iPadAlongTheStrip!=-1)
984 iPadX = (Int_t)(iPadAlongTheStrip/(Float_t(AliTOFGeometry::NpadZ())));
987 //iPadX = (Int_t)(Equip2VolNpad(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel)/(Float_t(AliTOFGeometry::NpadZ())));
988 //iPadX = Equip2VolNpadX(GetDDLnumberPerSector(fDDL), fTRMchain, fTDC, fTDCchannel);
994 //----------------------------------------------------------------------------
995 Int_t AliTOFRawStream::GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const
1001 return ((word & fieldMask) >> fieldPosition);
1004 //----------------------------------------------------------------------------
1005 Int_t AliTOFRawStream::Equip2VolNplate(Int_t iDDL, Int_t nTRM, Int_t nTDC)
1008 // Returns the TOF plate number [0;4]
1009 // corresponding to the TOF equipment ID numbers:
1010 // iDDL -> DDL number per sector [0;3]
1011 // nTRM -> TRM number [3;12]
1012 // nTDC -> TDC number [0;14]
1018 if (nTRM>=4 && nTRM<7) {
1020 } else if (nTRM==7) {
1021 if (nTDC<12) iPlate = 0;
1023 } else if (nTRM>=8 && nTRM<11) {
1025 } else if (nTRM==11) {
1026 if (nTDC<9) iPlate = 1;
1028 }else if (nTRM==12) {
1032 } else if (iDDL==1) {
1035 if (nTDC<3) iPlate = 0;
1036 } else if (nTRM>=4 && nTRM<7) {
1038 } else if (nTRM==7) {
1039 if (nTDC<6) iPlate = 1;
1041 } else if (nTRM>=8 && nTRM<11) {
1043 } else if (nTRM==11) {
1044 if (nTDC<9) iPlate = 2;
1046 } else if (nTRM==12) {
1050 } else if (iDDL==2) {
1052 if (nTRM>=4 && nTRM<7) {
1054 } else if (nTRM==7) {
1055 if (nTDC<12) iPlate = 4;
1057 } else if (nTRM>=8 && nTRM<11) {
1059 } else if (nTRM==11) {
1060 if (nTDC<9) iPlate = 3;
1062 }else if (nTRM==12) {
1066 } else if (iDDL==3) {
1069 if (nTDC<3) iPlate = 4;
1070 } else if (nTRM>=4 && nTRM<7) {
1072 } else if (nTRM==7) {
1073 if (nTDC<6) iPlate = 3;
1075 } else if (nTRM>=8 && nTRM<11) {
1077 } else if (nTRM==11) {
1078 if (nTDC<9) iPlate = 2;
1080 } else if (nTRM==12) {
1090 //----------------------------------------------------------------------------
1091 Int_t AliTOFRawStream::Equip2VolNstrip(Int_t iDDL, Int_t nTRM, Int_t nTDC)
1094 // Returns the TOF strip number per module:
1095 // [0;14], in the central plates,
1096 // [0;18], in the intermediate and external plates
1097 // corresponding to the TOF equipment ID numbers:
1098 // iDDL -> DDL number per sector [0;3]
1099 // nTRM -> TRM number [3;12]
1100 // nTDC -> TDC number [0;14]
1107 if (nTRM== 4) iStrip = (Int_t)(nTDC/3.);
1108 else if (nTRM== 5) iStrip = 5 + (Int_t)(nTDC/3.);
1109 else if (nTRM== 6) iStrip = 10 + (Int_t)(nTDC/3.);
1110 else if (nTRM== 7) {
1111 if (nTDC<12) iStrip = 15 + (Int_t)(nTDC/3.);
1112 else iStrip = (Int_t)(nTDC/3.) - 4;
1114 else if (nTRM== 8) iStrip = 1 + (Int_t)(nTDC/3.);
1115 else if (nTRM== 9) iStrip = 6 + (Int_t)(nTDC/3.);
1116 else if (nTRM==10) iStrip = 11 + (Int_t)(nTDC/3.);
1117 else if (nTRM==11) {
1118 if (nTDC<9) iStrip = 16 + (Int_t)(nTDC/3.);
1119 else iStrip = (Int_t)(nTDC/3.) - 3;
1121 else if (nTRM==12) iStrip = 2 + (Int_t)(nTDC/3.);
1123 } else if (iDDL==1) {
1125 if (nTRM==3 && nTDC<3) iStrip = (Int_t)(nTDC/3.);
1126 else if (nTRM== 4) iStrip = 5 - (Int_t)(nTDC/3.);
1127 else if (nTRM== 5) iStrip = 10 - (Int_t)(nTDC/3.);
1128 else if (nTRM== 6) iStrip = 15 - (Int_t)(nTDC/3.);
1129 else if (nTRM== 7) {
1130 if (nTDC<6) iStrip = 1 - (Int_t)(nTDC/3.);
1131 else iStrip = 20 - (Int_t)(nTDC/3.);
1133 else if (nTRM== 8) iStrip = 6 - (Int_t)(nTDC/3.);
1134 else if (nTRM== 9) iStrip = 11 - (Int_t)(nTDC/3.);
1135 else if (nTRM==10) iStrip = 16 - (Int_t)(nTDC/3.);
1136 else if (nTRM==11) {
1137 if (nTDC<9) iStrip = 2 - (Int_t)(nTDC/3.);
1138 else iStrip = 21 - (Int_t)(nTDC/3.);
1140 else if (nTRM==12) iStrip = 7 - (Int_t)(nTDC/3.);
1142 } else if (iDDL==2) {
1144 if (nTRM== 4) iStrip = 18 - (Int_t)(nTDC/3.);
1145 else if (nTRM== 5) iStrip = 18 - ( 5 + (Int_t)(nTDC/3.));
1146 else if (nTRM== 6) iStrip = 18 - (10 + (Int_t)(nTDC/3.));
1147 else if (nTRM== 7) {
1148 if (nTDC<12) iStrip = 18 - (15 + (Int_t)(nTDC/3.));
1149 else iStrip = 18 - ((Int_t)(nTDC/3.) - 4);
1151 else if (nTRM== 8) iStrip = 18 - ( 1 + (Int_t)(nTDC/3.));
1152 else if (nTRM== 9) iStrip = 18 - ( 6 + (Int_t)(nTDC/3.));
1153 else if (nTRM==10) iStrip = 18 - (11 + (Int_t)(nTDC/3.));
1154 else if (nTRM==11) {
1155 if (nTDC<9) iStrip = 18 - (16 + (Int_t)(nTDC/3.));
1156 else iStrip = 14 - ((Int_t)(nTDC/3.) - 3);
1158 else if (nTRM==12) iStrip = 14 - ( 2 + (Int_t)(nTDC/3.));
1160 } else if (iDDL==3) {
1162 if (nTRM==3 && nTDC<3) iStrip = 18 - (Int_t)(nTDC/3.);
1163 else if (nTRM== 4) iStrip = 18 - ( 5 - (Int_t)(nTDC/3.));
1164 else if (nTRM== 5) iStrip = 18 - (10 - (Int_t)(nTDC/3.));
1165 else if (nTRM== 6) iStrip = 18 - (15 - (Int_t)(nTDC/3.));
1166 else if (nTRM== 7) {
1167 if (nTDC<6) iStrip = 18 - (1 - (Int_t)(nTDC/3.));
1168 else iStrip = 18 - (20 - (Int_t)(nTDC/3.));
1170 else if (nTRM== 8) iStrip = 18 - ( 6 - (Int_t)(nTDC/3.));
1171 else if (nTRM== 9) iStrip = 18 - (11 - (Int_t)(nTDC/3.));
1172 else if (nTRM==10) iStrip = 18 - (16 - (Int_t)(nTDC/3.));
1173 else if (nTRM==11) {
1174 if (nTDC<9) iStrip = 14 - ( 2 - (Int_t)(nTDC/3.));
1175 else iStrip = 18 - (21 - (Int_t)(nTDC/3.));
1177 else if (nTRM==12) iStrip = 14 - ( 7 - (Int_t)(nTDC/3.));
1185 //----------------------------------------------------------------------------
1186 Int_t AliTOFRawStream::Equip2VolNpad(Int_t iDDL, Int_t iChain, Int_t nTDC,
1190 // Returns the TOF pad number per strip [0;95]
1191 // corresponding to the TOF equipment ID numbers:
1192 // iDDL -> DDL number per sector [0;3]
1193 // iChain -> TRM chain number [0;1]
1194 // nTDC -> TDC number [0;14]
1195 // iCH -> TDC channel number [0;7]
1198 Int_t iPadAlongTheStrip = -1;
1201 //Int_t iTDClocal = nTDC%3 + (1-iChain)*3;
1202 //if (iDDL==0 || iDDL==3) iTDClocal = 5 - iTDClocal;
1203 //else if (iDDL==1 || iDDL==2) iTDClocal = 6 + (5 - iTDClocal);
1206 Int_t iTDClocal = -1;
1207 Int_t iTDClocal03 = nTDC%3 + (1-iChain)*3;
1208 Int_t iTDClocal12 = 2-nTDC%3 + iChain*3;
1209 if (iDDL==0 || iDDL==3) iTDClocal = 5 - iTDClocal03;
1210 else if (iDDL==1 || iDDL==2) iTDClocal = 6 + (5 - iTDClocal12);
1212 Int_t iCHlocal = iCH;
1213 if (iDDL==0 || iDDL==3) iCHlocal = 7 - iCH;
1215 iPadAlongTheStrip = iTDClocal*AliTOFGeometry::NCh() + iCHlocal;
1217 if (((iDDL==1 || iDDL==2) && iPadAlongTheStrip< AliTOFGeometry::NpadX()) ||
1218 ((iDDL==0 || iDDL==3) && iPadAlongTheStrip>=AliTOFGeometry::NpadX())) {
1219 std::cerr << "Problems with the padX number!" << endl;
1220 //AliWarning("Problems with the padX number!");
1222 return iPadAlongTheStrip;
1226 //----------------------------------------------------------------------------
1227 Int_t AliTOFRawStream::Equip2VolNpadX(Int_t iDDL, Int_t iChain, Int_t nTDC,
1231 // Returns the TOF padX number [0;47]
1232 // corresponding to the TOF equipment ID numbers:
1233 // iDDL -> DDL number per sector [0;3]
1234 // iChain -> TRM chain number [0;1]
1235 // nTDC -> TDC number [0;14]
1236 // iCH -> TDC channel number [0;7]
1239 Int_t iPadX = (Int_t)(AliTOFRawStream::Equip2VolNpad(iDDL, iChain, nTDC, iCH)/
1240 (Float_t(AliTOFGeometry::NpadZ())));
1246 //----------------------------------------------------------------------------
1247 Int_t AliTOFRawStream::Equip2VolNpadZ(Int_t iDDL, Int_t iChain, Int_t nTDC,
1251 // Returns the TOF padZ number [0;1]
1252 // corresponding to the TOF equipment ID numbers:
1253 // iDDL -> DDL number per sector [0;3]
1254 // iChain -> TRM chain number [0;1]
1255 // nTDC -> TDC number [0;14]
1256 // iCH -> TDC channel number [0;7]
1259 Int_t iPadZ = AliTOFRawStream::Equip2VolNpad(iDDL, iChain, nTDC, iCH)%AliTOFGeometry::NpadZ();
1265 //----------------------------------------------------------------------------
1266 Int_t AliTOFRawStream::GetSectorNumber(Int_t nDDL) const
1269 // Returns the sector number [0;17]
1270 // corresponing to the assigned DRM/DDL number [0;71]
1273 Int_t iSector = Int_t((Float_t)(nDDL)/AliTOFGeometry::NDDL());
1278 //----------------------------------------------------------------------------
1279 Int_t AliTOFRawStream::GetDDLnumberPerSector(Int_t nDDL) const
1282 // Return the DRM/DDL number per sector [0;3]
1283 // corresponing to the assigned DRM/DDL number [0;71]
1286 Int_t iDDL = nDDL%AliTOFGeometry::NDDL();
1292 //----------------------------------------------------------------------------
1293 void AliTOFRawStream::EquipmentId2VolumeId(AliTOFHitData *hitData, Int_t *volume) const
1295 EquipmentId2VolumeId(hitData->GetDDLID(),hitData->GetSlotID(),hitData->GetChain(),hitData->GetTDC(),hitData->GetChan(),volume);
1297 //----------------------------------------------------------------------------
1298 void AliTOFRawStream::EquipmentId2VolumeId(Int_t nDDL, Int_t nTRM, Int_t iChain,
1299 Int_t nTDC, Int_t iCH,
1300 Int_t *volume) const
1304 // nDDL (variable in [0;71]) -> number of the DDL file
1305 // nTRM (variable in [3;12]) -> number of the TRM slot
1306 // iChain (variable in [0; 1]) -> number of the TRM chain
1307 // nTDC (variable in [0;14]) -> number of the TDC
1308 // iCH (variable in [0; 7]) -> number of the TDC channel
1311 // sector number, i.e. volume[0] (variable in [0,17])
1312 // plate number, i.e. volume[1] (variable in [0, 5])
1313 // strip number, i.e. volume[2] (variable in [0,14/18])
1314 // padX number, i.e. volume[3] (variable in [0,47])
1315 // padZ number, i.e. volume[4] (variable in [0, 1])
1318 Int_t iDDL = GetDDLnumberPerSector(nDDL);
1320 Int_t iSector = GetSectorNumber(nDDL);
1322 Int_t iPlate = Equip2VolNplate(iDDL, nTRM, nTDC);
1325 fRawReader->AddMajorErrorLog(kPlateError,"plate = -1");
1326 AliWarning("Problems with the plate number!");
1329 Int_t iStrip = Equip2VolNstrip(iDDL, nTRM, nTDC);
1332 fRawReader->AddMajorErrorLog(kStripError,"strip = -1");
1333 AliWarning("Problems with the strip number!");
1336 Int_t iPadAlongTheStrip = Equip2VolNpad(iDDL, iChain, nTDC, iCH);
1337 if (iPadAlongTheStrip==-1){
1339 fRawReader->AddMajorErrorLog(kPadAlongStripError,"pad = -1");
1340 AliWarning("Problems with the pad number along the strip!");
1343 Int_t iPadX = (Int_t)(iPadAlongTheStrip/(Float_t(AliTOFGeometry::NpadZ())));
1344 Int_t iPadZ = iPadAlongTheStrip%AliTOFGeometry::NpadZ();
1346 //Int_t iPadX = (Int_t)(Equip2VolNpad(iDDL, iChain, nTDC, iCH)/(Float_t(AliTOFGeometry::NpadZ())));
1347 //Int_t iPadZ = Equip2VolNpad(iDDL, iChain, nTDC, iCH)%AliTOFGeometry::NpadZ();
1349 //Int_t iPadX = Equip2VolNpadX(iDDL, iChain, nTDC, iCH);
1350 //Int_t iPadZ = Equip2VolNpadZ(iDDL, iChain, nTDC, iCH);
1352 volume[0] = iSector;
1359 //-----------------------------------------------------------------------------
1360 Bool_t AliTOFRawStream::DecodeDDL(Int_t nDDLMin, Int_t nDDLMax, Int_t verbose = 0) {
1362 // To decode raw data for DDL number in [nDDLmin; nDDLmax]
1365 //check and fix valid DDL range
1368 fRawReader->AddMinorErrorLog(kDDLMinError);
1369 AliWarning("Wrong DDL range: setting first DDL ID to 0");
1373 fRawReader->AddMinorErrorLog(kDDLMaxError);
1374 AliWarning("Wrong DDL range: setting last DDL ID to 71");
1377 //select required DDLs
1378 fRawReader->Select("TOF", nDDLMin, nDDLMax);
1381 AliInfo(Form("Selected TOF DDL range: %d-%d", nDDLMin, nDDLMax));
1383 return(Decode(verbose));
1385 //-----------------------------------------------------------------------------
1386 Bool_t AliTOFRawStream::Decode(Int_t verbose = 0) {
1388 // New decoder method
1391 Int_t currentEquipment;
1393 const AliRawDataHeader *currentCDH;
1396 UChar_t *data = 0x0;
1398 //loop and read DDL headers
1399 while(fRawReader->ReadHeader()){
1401 //memory leak prevention (actually data should be always 0x0 here)
1405 //get equipment infos
1406 currentEquipment = fRawReader->GetEquipmentId();
1407 currentDDL = fRawReader->GetDDLID();
1408 currentCDH = fRawReader->GetDataHeader();
1409 const Int_t kDataSize = fRawReader->GetDataSize();
1410 const Int_t kDataWords = kDataSize / 4;
1411 data = new UChar_t[kDataSize];
1414 AliInfo(Form("Found equipment # %d header (DDL # %d): %d bytes (%d words)", currentEquipment, currentDDL, kDataSize, kDataWords));
1417 AliInfo(Form("Reading equipment #%d (DDL # %d) data...", currentEquipment, currentDDL));
1419 //read equipment payload
1420 if (!fRawReader->ReadNext(data, kDataSize))
1422 fRawReader->AddMajorErrorLog(kDDLdataReading);
1424 AliWarning("Error while reading DDL data. Go to next equipment");
1431 AliInfo(Form("Equipment # %d (DDL # %d) data has been readed", currentEquipment, currentDDL));
1434 //set up the decoder
1435 fDecoder->SetVerbose(verbose);
1436 fDecoder->SetDataBuffer(fDataBuffer[currentDDL]);
1437 fDecoder->SetPackedDataBuffer(fPackedDataBuffer[currentDDL]);
1440 if (fDecoder->Decode((UInt_t *)data, kDataWords, currentCDH) == kTRUE) {
1441 fRawReader->AddMajorErrorLog(kDDLDecoder,Form("DDL # = %d",currentDDL));
1442 AliWarning(Form("Error while decoding DDL # %d: decoder returned with errors", currentDDL));
1450 fRawReader->Reset();
1453 AliInfo("All done");
1458 //---------------------------------------------------------------------------
1460 AliTOFRawStream::ResetBuffers()
1463 // To reset the buffers
1466 for (Int_t iDDL = 0; iDDL < AliDAQ::NumberOfDdls("TOF"); iDDL++){
1467 ResetDataBuffer(iDDL);
1468 ResetPackedDataBuffer(iDDL);
1472 //---------------------------------------------------------------------------
1474 AliTOFRawStream::LoadRawDataBuffers(Int_t indexDDL, Int_t verbose)
1477 // To load the buffers
1480 fTOFrawData->Clear();
1484 AliInfo(Form("Decoding raw data for DDL # %d ...", indexDDL));
1486 if (DecodeDDL(indexDDL, indexDDL, verbose) != 0){ //decode DDL
1487 fRawReader->AddMajorErrorLog(kDDLDecoder,Form("DDL # = %d",indexDDL));
1488 AliWarning(Form("Error while decoding DDL # %d", indexDDL));
1493 AliInfo(Form("Done. %d packed %s been found.", fPackedDataBuffer[indexDDL]->GetEntries(), fPackedDataBuffer[indexDDL]->GetEntries() > 1 ? "hits have" : "hit has"));
1495 AliTOFHitData *hitData; //hit data pointer
1498 AliInfo("Filling TClonesArray ...");
1501 if (fgApplyBCCorrections) {
1502 AliInfo("Apply nominal DDL BC time-shift correction");
1503 AliInfo("Apply deltaBC time-shift correction");
1506 //loop over DDL packed hits
1507 for (Int_t iHit = 0; iHit < fPackedDataBuffer[indexDDL]->GetEntries(); iHit++){
1508 hitData = fPackedDataBuffer[indexDDL]->GetHit(iHit); //get hit data
1509 Int_t hitACQ = hitData->GetACQ();
1510 Int_t hitPS = hitData->GetPS();
1511 Int_t hitSlotID = hitData->GetSlotID();
1512 Int_t hitChain = hitData->GetChain();
1513 Int_t hitTDC = hitData->GetTDC();
1514 Int_t hitChan = hitData->GetChan();
1515 Int_t hitTimeBin = hitData->GetTimeBin();
1516 Int_t hitTOTBin = hitData->GetTOTBin();
1518 if (fgApplyBCCorrections) {
1519 /* DDL BC shift time correction */
1520 hitTimeBin += fgkddlBCshift[indexDDL];
1521 /* deltaBC shift time correction */
1522 hitTimeBin += hitData->GetDeltaBunchID();
1525 Int_t hitLeading = hitData->GetTimeBin();
1526 Int_t hitTrailing = -1;
1527 Int_t hitError = -1;
1529 TClonesArray &arrayTofRawData = *fTOFrawData;
1530 new (arrayTofRawData[fPackedDigits++]) AliTOFrawData(hitSlotID, hitChain, hitTDC, hitChan, hitTimeBin, hitTOTBin, hitLeading, hitTrailing, hitPS, hitACQ, hitError);
1537 AliInfo("Resetting buffers ...");
1539 fDataBuffer[indexDDL]->Reset();
1540 fPackedDataBuffer[indexDDL]->Reset();