- virtual Int_t ProduceHcDataV1andV2(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
- virtual Int_t ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent);
- //virtual Int_t ProduceHcDataV3(AliTRDdataArrayS *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize);
- void WriteIntermediateWords(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // writes tracklet-endmarker and additional words between tracklet and raw-data
+ virtual Int_t ProduceHcData(AliTRDarrayADC *digits, Int_t side, Int_t det, UInt_t *buf, Int_t maxSize, Bool_t newEvent, Bool_t newSM);
+ void ProduceSMIndexData(UInt_t *buf, Int_t& nw); // SM index words and header - real data format
+ void WriteIntermediateWords(UInt_t *buf, Int_t& nw, Int_t& of, const Int_t& maxSize, const Int_t& det, const Int_t& side); // real data format
+ void AssignStackMask(UInt_t *buf, Int_t nStack); // re-assignment of stack mask in the SM index word
+ void AssignLinkMask(UInt_t *buf, Int_t nLayer); // re-assignment of link mask in the stack index word
+ Int_t AddStackIndexWords(UInt_t *buf, Int_t nStack, Int_t nMax); // add stack index words and stack header when there is no data for the stack
+ Bool_t ShiftWords(UInt_t *buf, Int_t nStart, Int_t nWords, Int_t nMax); // shifts n words