+void AliITSDDLRawData::GetDigitsSDDCompressed(TClonesArray *ITSdigits, Int_t mod, UInt_t *buf){
+//This method packs the SDD digits in the compressed format (32 bit per digit)
+// see AliITSRawStreamSDDCompressed for details on the dta format
+
+ UInt_t dataWord=0;
+ Int_t ndigits = ITSdigits->GetEntries();
+ AliITSdigit *digs;
+ if(ndigits){
+ for (Int_t digit=0;digit<ndigits;digit++) {
+ digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
+ Int_t iz=digs->GetCoord1(); // Anode
+ Int_t ix=digs->GetCoord2(); // Time
+ Int_t is=digs->GetSignal(); // ADC Signal - 10 bit
+ dataWord=mod<<27;
+ Int_t sid=0;
+ if(iz>=256){
+ sid=1;
+ iz-=256;
+ }
+ dataWord+=sid<<26;
+ dataWord+=iz<<18;
+ dataWord+=ix<<10;
+ dataWord+=is;
+ fIndex++;
+ buf[fIndex]=dataWord;
+ }
+ }
+ UInt_t finalWord=15<<28;
+ finalWord+=mod;
+ fIndex++;
+ buf[fIndex]=finalWord;
+}
+
+//______________________________________________________________________
+