1 /**************************************************************************
2 * Copyright(c) 1998-2003, 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 **************************************************************************/
19 //This class contains all the necessary methods to create the Raw Data
20 //files (slides) for the ITS data challenges for:
26 //#include <Riostream.h>
27 #include <TClonesArray.h>
29 #include "AliITSdigit.h"
30 #include "AliITSDDLRawData.h"
31 #include "AliRawDataHeaderSim.h"
32 #include "AliITSRawStreamSPD.h"
33 #include "AliITSRawStreamSDD.h"
34 #include "AliITSDDLModuleMapSDD.h"
35 #include "AliITSRawStreamSSD.h"
36 #include "AliITSIntMap.h"
37 #include "AliBitPacking.h"
39 #include "AliFstream.h"
40 #include "AliITSFOSignalsSPD.h"
42 ClassImp(AliITSDDLRawData)
44 ////////////////////////////////////////////////////////////////////////////////////////
45 AliITSDDLRawData::AliITSDDLRawData():
49 fUseCompressedSDDFormat(0){
54 ////////////////////////////////////////////////////////////////////////////////////////
56 AliITSDDLRawData::AliITSDDLRawData(const AliITSDDLRawData &source) :
58 fVerbose(source.fVerbose),
59 fIndex(source.fIndex),
60 fHalfStaveModule(source.fHalfStaveModule),
61 fUseCompressedSDDFormat(source.fUseCompressedSDDFormat){
65 ////////////////////////////////////////////////////////////////////////////////////////
67 AliITSDDLRawData& AliITSDDLRawData::operator=(const AliITSDDLRawData &source){
69 this->fIndex=source.fIndex;
70 this->fHalfStaveModule=source.fHalfStaveModule;
71 this->fVerbose=source.fVerbose;
72 this->fUseCompressedSDDFormat=source.fUseCompressedSDDFormat;
76 ////////////////////////////////////////////////////////////////////////////////////////
80 void AliITSDDLRawData::GetDigitsSSD(TClonesArray *ITSdigits,Int_t mod,Int_t modR,Int_t ddl,UInt_t *buf){
81 //This method packs the SSD digits in a proper 32 bits structure
82 // Revised by Enrico Fragiacomo
88 Int_t ndigits = ITSdigits->GetEntries();
93 ftxt.open("SSDdigits.txt",ios::app);
95 for (Int_t digit=0;digit<ndigits;digit++) {
96 digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
97 iz=digs->GetCoord1(); // If iz==0, O side and if iz=1 N side
98 ix=digs->GetCoord2(); // Strip Number
99 is=digs->GetCompressedSignal(); // ADC Signal
100 // cout<<" Module:"<<mod-500<<" N/P side:"<<iz<<" Strip Number:"<<ix<<" Amplidute:"<<is-1<<endl;
101 if(is<0) is = 4096 + is;
103 ftxt<<"DDL:"<<ddl<<" Mod: "<<modR<<" N/P: "<<iz<<" Strip: "<<ix<<" Value: "<<is-1<<endl;
108 AliBitPacking::PackWord(word,baseWord,0,11);//ADC data
110 word = (iz==0) ? ix : 1535-ix ; // on N-side 1535-768 -> 0-767
111 AliBitPacking::PackWord(word,baseWord,12,22);//Strip Number
113 word = mod%12; // ADC-number (12 ADCs per AD module)
114 word += ( word<6 ) ? 0 : 2; // ADC range 0-5 and 8-13
115 AliBitPacking::PackWord(word,baseWord,24,27);//ADC Channel
117 word = mod/12+1; // AD-number (AD module index ranges 1-9)
118 AliBitPacking::PackWord(word,baseWord,28,31);//AD slot
120 buf[fIndex]=baseWord;
128 ////////////////////////////////////////////////////////////////////////////////////////
129 //Silicon Drift Detector
132 void AliITSDDLRawData::GetDigitsSDDCompressed(TClonesArray *ITSdigits, Int_t mod, UInt_t *buf){
133 //This method packs the SDD digits in the compressed format (32 bit per digit)
134 // see AliITSRawStreamSDDCompressed for details on the dta format
137 Int_t ndigits = ITSdigits->GetEntries();
140 for (Int_t digit=0;digit<ndigits;digit++) {
141 digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
142 Int_t iz=digs->GetCoord1(); // Anode
143 Int_t ix=digs->GetCoord2(); // Time
144 Int_t is=digs->GetCompressedSignal(); // ADC Signal - 8 bit
156 buf[fIndex]=dataWord;
159 UInt_t finalWord=15<<28;
162 buf[fIndex]=finalWord;
165 //______________________________________________________________________
167 void AliITSDDLRawData::GetDigitsSDD(TClonesArray *ITSdigits,Int_t mod,Int_t modR,Int_t ddl,UInt_t *buf){
168 //This method packs the SDD digits in a proper 32 bits structure
174 Int_t ndigits = ITSdigits->GetEntries();
177 Int_t digarr[512][256];
178 for(Int_t i=0;i<512;i++){
179 for(Int_t j=0;j<256;j++){
183 //word to select the 12 carlos for the 12 modules
184 UInt_t carlosid=0x30000000+mod;
187 buf[fIndex]=carlosid;
193 Bool_t flag = kFALSE;
195 Int_t bitinfo1[4] = {3,8,3,7}; //vector with info on bit for timebin info
196 Int_t wordinfo1[4]= {0,0,0,0}; //vector with word info for timebin info
197 Int_t bitinfo2[2] = {3,18}; //vector with info on bit for EOR (end of row) info
198 Int_t wordinfo2[3]= {1,65593}; //vector with word info for anode info
200 /* for time bin info: word n bits meaning
201 0 3 next info is timebin
202 8 3 next word is 8 bit long
203 tb value 8 timebin value
204 n (2->7) 3 next info is n bit long
205 signal n signal value
207 for anode info: 1 3 next 18 bits are for EOR
208 increments the anode value
210 EOR 18 error codes + other info
215 ftxt.open("SDDdigits.txt",ios::app);
216 for (Int_t digit=0;digit<ndigits;digit++) {
217 digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
218 iz=digs->GetCoord1(); // Anode
219 ix=digs->GetCoord2(); // Time
220 is=digs->GetCompressedSignal(); // ADC Signal
223 ftxt<<"DDL:"<<ddl<<" MID:"<<modR<<" An:"<<iz<<" T:"<<ix<<" A:"<<is<<endl;
224 if (is>255){Error("GetDigitsSDD", "bits words is needed)!!!");}
227 for(Int_t anode=0;anode<512;anode++){
230 AliBitPacking::PackWord(word2,baseWord,first,last);
243 for(Int_t tb=0;tb<256;tb++){
244 if(digarr[anode][tb]!=0){
247 AliBitPacking::PackWord(word2,baseWord,first,last);
253 //non lossy compression as it is done in Carlos
254 //(data are already 10to8bit compressed by AMBRA
256 /* if value < 8 value = value - (1 << 2) (word is 2 bit long)
257 if value < 16 value = value - (1 << 3) (word is 3 bit long)
258 if value < 32 value = value - (1 << 4) (word is 4 bit long)
259 if value < 64 value = value - (1 << 5) (word is 5 bit long)
260 if value <128 value = value - (1 << 6) (word is 6 bit long)
261 if value >=128value = value - (1 << 7) (word is 7 bit long)
264 //if(digarr[anode][tb]<4) continue; // not write <4 cnts above tL
265 if(digarr[anode][tb]<8){
268 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
270 if(digarr[anode][tb]>=8 && digarr[anode][tb]<16){
273 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
275 if(digarr[anode][tb]>=16 && digarr[anode][tb]<32){
278 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
280 if(digarr[anode][tb]>=32 && digarr[anode][tb]<64){
283 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
285 if(digarr[anode][tb]>=64 && digarr[anode][tb]<128){
288 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
290 if(digarr[anode][tb]>=128){
293 wordinfo1[3] = digarr[anode][tb]-(1 << bitinfo1[3]);
296 for(Int_t ie=0;ie<4;ie++){
300 AliBitPacking::PackWord(word2,baseWord,first,last);
305 last = first+bitinfo1[ie]-1;
306 if(first < 30 && last < 30){
307 AliBitPacking::PackWord(wordinfo1[ie],baseWord,first,last);
312 UInt_t w = AliBitPacking::UnpackWord(wordinfo1[ie],0,29-first);
313 AliBitPacking::PackWord(w,baseWord,first,29);
314 Int_t lb = 29-first+1;
315 diff = bitinfo1[ie]-lb;
316 word2 = AliBitPacking::UnpackWord(wordinfo1[ie],lb,lb+diff-1);
318 if(anode<256) word = 2;//channel 0 of carlos
319 else word = 3; //channel 1 of carlos
320 AliBitPacking::PackWord(word,baseWord,30,31);
322 buf[fIndex]=baseWord;
329 word2 = wordinfo1[ie];
332 if(anode<256) word = 2; //channel 0 of carlos
333 else word = 3; //channel 1 of carlos
334 AliBitPacking::PackWord(word,baseWord,30,31);
336 buf[fIndex]=baseWord;
349 for(Int_t i=0;i<2;i++){
352 AliBitPacking::PackWord(word2,baseWord,first,last);
361 if(first < 30 && last < 30){
362 AliBitPacking::PackWord(word,baseWord,first,last); //3 bit code =1 -> next 18 bits for EOR
368 UInt_t w = AliBitPacking::UnpackWord(word,0,29-first);
369 AliBitPacking::PackWord(w,baseWord,first,29);
370 Int_t lb = 29-first+1;
372 word2 = AliBitPacking::UnpackWord(word,lb,lb+diff-1);
374 if(anode<256) word = 2;
376 AliBitPacking::PackWord(word,baseWord,30,31);
378 buf[fIndex]=baseWord;
391 if(anode<256) word = 2;
393 AliBitPacking::PackWord(word,baseWord,30,31);
395 buf[fIndex]=baseWord;
414 ////////////////////////////////////////////////////////////////////////////////////////
418 void AliITSDDLRawData::GetDigitsSPD(TClonesArray *ITSdigits,Int_t mod,Int_t ddl, UInt_t *buf, AliITSFOSignalsSPD* foSignals){
419 //This method packs the SPD digits in a proper 32 structure
420 //Since data is zero suppressed,the coordinates for the chip having zero digits
421 //doesn't get listed in the galice.root file. However the SPD format requires
422 //the empty chip to be written with chip header and chip trailer.
424 Int_t chipLow = AliITSRawStreamSPD::GetOnlineChipFromOffline(mod,0);
425 Int_t chipHigh = AliITSRawStreamSPD::GetOnlineChipFromOffline(mod,159);
427 if (chipLow>chipHigh) {chipLow -= 4; chipHigh += 4;}
428 UInt_t eq = AliITSRawStreamSPD::GetOnlineEqIdFromOffline(mod);
429 UInt_t hs = AliITSRawStreamSPD::GetOnlineHSFromOffline(mod);
431 // create int map to later hold all digits sorted
432 AliITSIntMap* digMap = new AliITSIntMap();
436 Int_t ndigits = ITSdigits->GetEntries(); //number of digits in the current module
437 //cout<<" Number of digits in the current module:"<<ndigits<<" module:"<<mod<<endl;
439 // _______________________________________________________________________
440 // Preprocess the digits - sort them in integer map (Henrik Tydesjo)
441 // Needed to have exact same order as in real raw data
446 if (fVerbose==2) ftxt.open("SPDdigits.txt",ios::app);
447 for (Int_t digit=0; digit<ndigits; digit++) {
448 digs = (AliITSdigit*) ITSdigits->UncheckedAt(digit);
449 /*---------------------------------------------------------------------------
450 * Each module contains 5 read out chips of 256 rows and 32 columns.
451 * So, the cell number in Z direction varies from 0 to 159.
452 * ---------------------------------------------------------------------*/
453 Int_t iz=digs->GetCoord1(); // Cell number in Z direction
454 Int_t ix=digs->GetCoord2(); // Cell number in X direction
456 if(fVerbose==2) ftxt<<"DDL:"<<ddl<<" Mod:"<<mod<<" Row:"<<ix<<" Col:"<<iz<<endl;
457 UInt_t dummyDDL, dummyHS, chip, col, row;
458 AliITSRawStreamSPD::OfflineToOnline(mod,iz,ix,dummyDDL,dummyHS,chip,col,row);
460 // insert digit into map...
461 // (reverse order of cols and rows as in real raw data)
462 digMap->Insert(chip*256*32+(31-col)*256+(255-row),row);
466 // _______________________________________________________________________
467 // Procedure for writing raw data (Henrik Tydesjo)
468 // Reimplemented because of unreadability (5 Mar 2009)
469 // Now also with fast-or signals
470 Int_t previousChip = chipLow-1;
471 Int_t chip = chipLow-1;
472 UInt_t chipHitCount = 0;
475 UInt_t nrHits = digMap->GetNrEntries();
476 for (UInt_t nHit=0; nHit<nrHits; nHit++) {
478 Int_t key = digMap->GetKeyIndex(nHit);
480 Int_t col = 31 - (key%(256*32))/256;
481 Int_t row = digMap->GetValIndex(nHit);
483 // add trailer for previous chip (if there was one...)
484 if (chip>previousChip && previousChip>chipLow-1) {
485 WriteChipTrailer(buf, chipHitCount, foSignals->GetSignal(eq,hs,previousChip), baseWord);
488 // add headers/trailers for chips without hits (if any)
489 for (Int_t ch=previousChip+1; ch<chip; ch++) {
490 WriteChipHeader(ch, hs, baseWord);
491 WriteChipTrailer(buf, 0, foSignals->GetSignal(eq,hs,ch), baseWord);
494 // if new chip, add header
495 if (chip>previousChip) {
496 WriteChipHeader(chip, hs, baseWord);
504 WriteHit(buf,row,col,baseWord);
508 // add trailer for last chip (if there was one...)
509 if (chip>chipLow-1) {
510 WriteChipTrailer(buf, chipHitCount, foSignals->GetSignal(eq,hs,chip), baseWord);
513 // add REMAINING headers/trailers for chips without hits (if any)
514 for (Int_t ch=chip+1; ch<=chipHigh; ch++) {
515 WriteChipHeader(ch, hs, baseWord);
516 WriteChipTrailer(buf, 0, foSignals->GetSignal(eq,hs,ch), baseWord);
518 // _______________________________________________________________________
528 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
530 Int_t AliITSDDLRawData::RawDataSPD(TBranch* branch, AliITSFOSignalsSPD* foSignals){
531 //This method creates the Raw data files for SPD detectors
532 const Int_t kSize=21000; //256*32*5=40960 max number of digits per module
533 UInt_t buf[kSize]; //One buffer cell can contain 2 digits
536 TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
538 AliFstream* outfile; // logical name of the output file
539 AliRawDataHeaderSim header;
542 for(Int_t ddl=0;ddl<AliDAQ::NumberOfDdls("ITSSPD");ddl++){
543 strcpy(fileName,AliDAQ::DdlFileName("ITSSPD",ddl)); //The name of the output file.
544 outfile = new AliFstream(fileName);
545 //write Dummy DATA HEADER
546 UInt_t dataHeaderPosition=outfile->Tellp();
547 outfile->WriteBuffer((char*)(&header),sizeof(header));
548 //Loops over Modules of a particular DDL
549 for (Int_t mod=0; mod<AliITSRawStreamSPD::kModulesPerDDL; mod++){
550 Int_t moduleNumber = AliITSRawStreamSPD::GetModuleNumber(ddl, mod);
552 branch->GetEvent(moduleNumber);
553 //For each Module, buf contains the array of data words in Binary format
554 //fIndex gives the number of 32 bits words in the buffer for each module
555 GetDigitsSPD(digits, moduleNumber, ddl, buf, foSignals);
556 outfile->WriteBuffer((char *)buf,((fIndex+1)*sizeof(UInt_t)));
557 for(Int_t i=0;i<(fIndex+1);i++){
563 //Write REAL DATA HEADER
564 UInt_t currentFilePosition=outfile->Tellp();
565 outfile->Seekp(dataHeaderPosition);
566 header.fSize=currentFilePosition-dataHeaderPosition;
567 outfile->WriteBuffer((char*)(&header),sizeof(header));
574 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
576 Int_t AliITSDDLRawData::RawDataSSD(TBranch* branch){
578 //This method creates the Raw data files for SSD detectors
579 const Int_t kSize=1536;//768*2 Number of stripe * number of sides(N and P)
583 TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
585 AliFstream* outfile; // logical name of the output file
586 AliRawDataHeaderSim header;
589 for(Int_t i=0;i<AliDAQ::NumberOfDdls("ITSSSD");i++){
590 strcpy(fileName,AliDAQ::DdlFileName("ITSSSD",i)); //The name of the output file.
591 outfile = new AliFstream(fileName);
592 //write Dummy DATA HEADER
593 UInt_t dataHeaderPosition=outfile->Tellp();
594 outfile->WriteBuffer((char*)(&header),sizeof(header));
596 //Loops over Modules of a particular DDL
597 for (Int_t mod=0; mod<AliITSRawStreamSSD::kModulesPerDDL; mod++){
598 Int_t moduleNumber = AliITSRawStreamSSD::GetModuleNumber(i, mod);
599 if(moduleNumber!=-1){
601 branch->GetEvent(moduleNumber);
602 //For each Module, buf contains the array of data words in Binary format
603 //fIndex gives the number of 32 bits words in the buffer for each module
604 GetDigitsSSD(digits,mod,moduleNumber,i,buf);
605 outfile->WriteBuffer((char *)buf,((fIndex+1)*sizeof(UInt_t)));
610 //Write REAL DATA HEADER
611 UInt_t currentFilePosition=outfile->Tellp();
612 outfile->Seekp(dataHeaderPosition);
613 header.fSize=currentFilePosition-dataHeaderPosition;
614 header.SetAttribute(0); // valid data
615 outfile->WriteBuffer((char*)(&header),sizeof(header));
622 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
624 Int_t AliITSDDLRawData::RawDataSDD(TBranch* branch, AliITSDDLModuleMapSDD* ddlsdd){
625 //This method creates the Raw data files for SDD detectors
626 const Int_t kSize=131072; //256*512
630 TClonesArray*& digits = * (TClonesArray**) branch->GetAddress();
632 AliFstream* outfile; // logical name of the output file
633 AliRawDataHeaderSim header;
634 UInt_t skippedword, carlosFooterWord,fifoFooterWord,jitterWord;
636 retcode = AliBitPacking::PackWord(0x3FFFFFFF,carlosFooterWord,0,31);
637 retcode = AliBitPacking::PackWord(0x3F1F1F1F,fifoFooterWord,0,31);
638 if(!fUseCompressedSDDFormat) retcode = AliBitPacking::PackWord(0x7F000000,jitterWord,0,31);
639 else retcode = AliBitPacking::PackWord(0x80000000,jitterWord,0,31);
642 for(Int_t i=0;i<AliDAQ::NumberOfDdls("ITSSDD");i++){
643 strcpy(fileName,AliDAQ::DdlFileName("ITSSDD",i)); //The name of the output file.
644 outfile = new AliFstream(fileName);
645 //write Dummy DATA HEADER
646 UInt_t dataHeaderPosition=outfile->Tellp();
647 outfile->WriteBuffer((char*)(&header),sizeof(header));
650 //first 1 "dummy" word to be skipped
651 if(!fUseCompressedSDDFormat){
652 retcode = AliBitPacking::PackWord(0xFFFFFFFF,skippedword,0,31);
653 outfile->WriteBuffer((char*)(&skippedword),sizeof(skippedword));
656 //Loops over Modules of a particular DDL
657 for (Int_t mod=0; mod<AliITSRawStreamSDD::kModulesPerDDL; mod++){
658 Int_t moduleNumber = ddlsdd->GetModuleNumber(i, mod);
659 if(moduleNumber!=-1){
661 branch->GetEvent(moduleNumber);
663 //For each Module, buf contains the array of data words in Binary format
664 //fIndex gives the number of 32 bits words in the buffer for each module
665 // cout<<"MODULE NUMBER:"<<mapSDD[i][mod]<<endl;
666 if(fUseCompressedSDDFormat){
667 GetDigitsSDDCompressed(digits,mod,buf);
668 outfile->WriteBuffer((char *)buf,((fIndex+1)*sizeof(UInt_t)));
670 GetDigitsSDD(digits,mod,moduleNumber,i,buf);
671 outfile->WriteBuffer((char *)buf,((fIndex+1)*sizeof(UInt_t)));
672 for(Int_t iw=0;iw<3;iw++) outfile->WriteBuffer((char*)(&carlosFooterWord),sizeof(carlosFooterWord));
677 // 12 words with FIFO footers (=4 FIFO x 3 3F1F1F1F words per DDL)
678 if(!fUseCompressedSDDFormat){
679 for(Int_t iw=0;iw<12;iw++) outfile->WriteBuffer((char*)(&fifoFooterWord),sizeof(fifoFooterWord));
681 outfile->WriteBuffer((char*)(&jitterWord),sizeof(jitterWord));
682 //Write REAL DATA HEADER
683 UInt_t currentFilePosition=outfile->Tellp();
684 outfile->Seekp(dataHeaderPosition);
685 header.fSize=currentFilePosition-dataHeaderPosition;
686 header.SetAttribute(0); // valid data
687 outfile->WriteBuffer((char*)(&header),sizeof(header));
694 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
696 void AliITSDDLRawData::WriteChipHeader(Int_t ChipAddr,Int_t halfStave,UInt_t &BaseWord){
697 //This method writes a chip header
698 //cout<<"Chip: "<<ChipAddr<<" Half Stave module:"<<halfStave<<endl;
700 AliBitPacking::PackWord(ChipAddr,BaseWord,16,19);
701 // At the moment the event count is always 0 (bits 20-26)
702 AliBitPacking::PackWord(0,BaseWord,20,26);
703 AliBitPacking::PackWord(halfStave,BaseWord,27,29);
704 AliBitPacking::PackWord(0x1,BaseWord,30,31);
706 }//end WriteChipHeader
708 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
710 void AliITSDDLRawData::WriteChipTrailer(UInt_t *buf, Int_t ChipHitCount, Bool_t foBit, UInt_t &BaseWord){
711 //This method writes a chip trailer
713 if((ChipHitCount%2)!=0){
714 AliBitPacking::PackWord(0xC000,BaseWord,16,31);
716 AliBitPacking::PackWord(ChipHitCount,BaseWord,0,11);
717 AliBitPacking::PackWord(0x0,BaseWord,12,12);
718 AliBitPacking::PackWord(foBit,BaseWord,13,13);
719 AliBitPacking::PackWord(0x0,BaseWord,14,15);
721 buf[fIndex]=BaseWord;
724 }//end WriteChipTrailer
726 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
728 void AliITSDDLRawData::WriteHit(UInt_t *buf,Int_t RowAddr,Int_t HitAddr,UInt_t &BaseWord){
729 //This method writs an hit
731 AliBitPacking::PackWord(HitAddr,BaseWord,16,20);
732 AliBitPacking::PackWord(RowAddr,BaseWord,21,28);
733 AliBitPacking::PackWord(2,BaseWord,30,31);
736 AliBitPacking::PackWord(HitAddr,BaseWord,0,4);
737 AliBitPacking::PackWord(RowAddr,BaseWord,5,12);
738 AliBitPacking::PackWord(2,BaseWord,14,15);
740 buf[fIndex]=BaseWord;