+//________________________________________________________________________________
+void AliTRDarrayADC::Reset()
+{
+ //
+ // Reset the array, the old contents are deleted
+ // The array keeps the same dimensions as before
+ //
+
+ memset(fADC,0,sizeof(Short_t)*fNAdim);
+}
+//________________________________________________________________________________
+void AliTRDarrayADC::ConditionalReset(AliTRDSignalIndex* idx)
+{
+ //
+ // Reset the array, the old contents are deleted
+ // The array keeps the same dimensions as before
+ //
+
+ if(idx->GetNoOfIndexes()>25)
+ memset(fADC,0,sizeof(Short_t)*fNAdim);
+ else
+ {
+ Int_t row, col;
+ while(idx->NextRCIndex(row, col)){
+ Int_t colnumb = fgLutPadNumbering[col];
+ memset(&fADC[(row*fNumberOfChannels+colnumb)*fNtime],0,fNtime);
+ }
+ }
+
+}
+
+//________________________________________________________________________________
+void AliTRDarrayADC::CreateLut()
+{
+ //
+ // Initializes the Look Up Table to relate
+ // pad numbering and mcm channel numbering
+ //
+
+ if(fgLutPadNumbering) return;
+
+ fgLutPadNumbering = new Short_t[AliTRDfeeParam::GetNcol()];
+ memset(fgLutPadNumbering,0,sizeof(Short_t)*AliTRDfeeParam::GetNcol());
+
+ for(Int_t mcm=0; mcm<8; mcm++)
+ {
+ Int_t lowerlimit=0+mcm*18;
+ Int_t upperlimit=18+mcm*18;
+ Int_t shiftposition = 1+3*mcm;
+ for(Int_t index=lowerlimit;index<upperlimit;index++)
+ {
+ fgLutPadNumbering[index]=index+shiftposition;
+ }
+ }
+}