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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 /// This is a class for reading the HMPID raw data
19 /// The format of the raw data corresponds to the one
20 /// which was documented by Paolo Martinengo.
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliHMPIDRawStream.h"
25 #include "AliRawReader.h"
28 ClassImp(AliHMPIDRawStream)
30 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31 AliHMPIDRawStream::AliHMPIDRawStream(AliRawReader* rawReader) :
40 fRawReader(rawReader),
54 fNumOfErr = new Int_t*[kNDDL]; // Store the numner of errors for a given error type and a given DD
55 for(Int_t i=0;i<kNDDL;i++) {
56 fNumOfErr[i] = new Int_t [kSumErr];
59 fnDDLInStream=new Int_t[kNDDL];
60 fnDDLOutStream=new Int_t[kNDDL];
61 for(Int_t iddl=0;iddl<kNDDL;iddl++) { fnDDLInStream[iddl]=-1;fnDDLOutStream[iddl]=-1;}
63 for(Int_t iddl=0;iddl<kNDDL;iddl++)
64 for(Int_t ierr=0; ierr < kSumErr; ierr++) fNumOfErr[iddl][ierr]=0; //reset errors
66 fRawReader->Select("HMPID");
71 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
72 AliHMPIDRawStream::AliHMPIDRawStream() :
95 fNumOfErr = new Int_t*[kNDDL]; // Store the numner of errors for a given error type and a given DD
96 for(Int_t i=0;i<kNDDL;i++) {
97 fNumOfErr[i] = new Int_t [kSumErr];
99 fnDDLInStream=new Int_t[kNDDL];
100 fnDDLOutStream=new Int_t[kNDDL];
101 for(Int_t iddl=0;iddl<kNDDL;iddl++) { fnDDLInStream[iddl]=-1;fnDDLOutStream[iddl]=-1;}
104 for(Int_t iddl=0;iddl<kNDDL;iddl++)
105 for(Int_t ierr=0; ierr < kSumErr; ierr++) fNumOfErr[iddl][ierr]=0; //reset errors
109 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
110 AliHMPIDRawStream::~AliHMPIDRawStream()
126 for(Int_t i=0;i<kNDDL;i++) delete [] fNumOfErr[i];
129 delete [] fnDDLInStream;
130 delete [] fnDDLOutStream;
132 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
133 void AliHMPIDRawStream::Reset()
135 // reset raw stream params
136 // Reinitalize the containers
142 if (fRawReader) fRawReader->Reset();
144 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
145 Bool_t AliHMPIDRawStream::Turbo()
148 Int_t row,dilogic;UInt_t pad;
149 Int_t cntGlob = fRawReader->GetDataSize()/4;
153 for(Int_t i=1;i<cntGlob;i++) {
154 if(!GetWord(1)) return kFALSE;
155 if (((fWord >> kbit27) & 1)) continue;
156 UInt_t statusControlRow = 0x32a8;
157 UInt_t rowControlWord = fWord >> kbit0 & 0xfbff;
158 if(rowControlWord == statusControlRow) continue;
160 row = (fWord >> kbit22) & 0x1f;
161 dilogic = (fWord >> kbit18) & 0xf; //dilogic info in raw word is between bits: 18...21
163 pad = (fWord >> kbit12) & 0x3f; //pad info in raw word is between bits: 12...17
164 if(!CheckPad(pad)) continue;
165 Int_t charge = fWord & 0xfff;
166 if(GetPad(fDDLNumber,row,dilogic,pad)<0) continue;
167 fPad[fNPads] = GetPad(fDDLNumber,row,dilogic,pad);
168 fCharge[fNPads] = charge;
170 if(charge==0) fNumOfErr[fDDLNumber][kPedQZero]++;
172 //Printf("Size: %i DDL %i row %i dilogic %i pad %i fPos %i fNPads: %i Charge: %d Word %4.4x GoodW: %i",cntGlob,fDDLNumber,row,dilogic,pad,fPosition,fNPads,fCharge[fNPads-1],fWord,gw++);
175 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
176 Bool_t AliHMPIDRawStream::Next()
178 // read next DDL raw data from the HMPID raw data stream
179 // return kFALSE in case of error or no data left
180 AliDebug(1,"Start.");
182 if (!fRawReader->ReadNextData(fData)) return kFALSE;
183 } while (fRawReader->GetDataSize() == 0);
185 Int_t runNumber = fRawReader->GetRunNumber();
187 Int_t ddlArray[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13};
189 // next line: fix for link chamber2 cables inversion for period LHC11d, LHC11e, LHC11f and LHC11h.
191 if(runNumber>=156620 && runNumber<=170593) {ddlArray[4] = 5; ddlArray[5] = 4;}
192 else {ddlArray[4] = 4; ddlArray[5] = 5;}
195 Event type is selected as in $ALICE_ROOT/RAW/event.h
196 #define START_OF_RUN ((eventTypeType) 1)
197 #define END_OF_RUN ((eventTypeType) 2)
198 #define START_OF_RUN_FILES ((eventTypeType) 3)
199 #define END_OF_RUN_FILES ((eventTypeType) 4)
200 #define START_OF_BURST ((eventTypeType) 5)
201 #define END_OF_BURST ((eventTypeType) 6)
202 #define PHYSICS_EVENT ((eventTypeType) 7) <<---------------
203 #define CALIBRATION_EVENT ((eventTypeType) 8)
204 #define EVENT_FORMAT_ERROR ((eventTypeType) 9)
205 #define START_OF_DATA ((eventTypeType)10)
206 #define END_OF_DATA ((eventTypeType)11)
207 #define SYSTEM_SOFTWARE_TRIGGER_EVENT ((eventTypeType)12)
208 #define DETECTOR_SOFTWARE_TRIGGER_EVENT ((eventTypeType)13)
209 #define EVENT_TYPE_MIN 1
210 #define EVENT_TYPE_MAX 13
214 Bool_t status=kFALSE;
217 if (fRawReader->GetDDLID()>=0)
218 fDDLNumber = ddlArray[fRawReader->GetDDLID()];
221 AliWarning(Form("fDDLNumber not a acceptable value %i",fDDLNumber));
225 if(fRawReader->GetType() == 7 || fRawReader->GetType() == 8 ) { //New: Select Physics events, Old: Raw data size is not 0 and not 47148 (pedestal)
226 fnDDLInStream[fDDLNumber]=1; fnDDLOutStream[fDDLNumber]=0;
228 fLDCNumber = fRawReader->GetLDCId();
229 fTimeStamp = fRawReader->GetTimestamp();
231 AliDebug(1,Form("DDL %i started to be decoded!",fDDLNumber));
232 fRawDataSize=fRawReader->GetDataSize()/4;
233 DelVars(); //We have to delete the variables initialized in the InitVars before recall IntiVars!!!
234 InitVars(fRawDataSize); //To read the charge and pads we cannot delete before the status return
236 if(fTurbo==kTRUE) status=Turbo();
237 else status = ReadHMPIDRawData();
239 if(status) AliDebug(1,Form("Event DDL %i successfully decoded!.",fDDLNumber));
240 else AliDebug(1,Form("Event DDL %i ERROR in decoding!.",fDDLNumber));
241 //DumpData(fRawReader->GetDataSize());
245 if(status==kTRUE) {fnDDLOutStream[fDDLNumber]++; }//Printf("fnDDLOutStream[%d]=%d",fDDLNumber,fnDDLOutStream[fDDLNumber]); } //Count the number of events when the DDL was succesfully decoded
247 // return status; // temporary solution...
250 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
251 void AliHMPIDRawStream::InitVars(Int_t n)
257 fCharge = new Int_t[n];
260 fPos = new Int_t[4*n+4]; //reset debug
261 for(Int_t ie = 0 ; ie < 4*n+4; ie++) fPos[ie] = 0; //initialize for 0, otherwise the position is considered filled and will not be updated for the dump
264 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
265 void AliHMPIDRawStream::DelVars()
270 //Clean the initvars!!!!!!!!
272 if (fCharge) { delete [] fCharge; fCharge = 0x0; }
273 if (fPad) { delete [] fPad; fPad = 0x0; }
274 if (fPos) { delete [] fPos; fPos = 0x0; }
280 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
281 Bool_t AliHMPIDRawStream::ReadHMPIDRawData()
283 //Here the loop on the decoding the raw bank
284 //for one ddl starts.
285 //It returns: kFALSE if any error occurs
287 Int_t cntGlob = fRawReader->GetDataSize()/4;
288 if(cntGlob==0) {fNumOfErr[fDDLNumber][kRawDataSizeErr]++; return kFALSE; }
294 if(!GetWord(cnt)) return kFALSE;
298 while (cnt>20) { //counter limit is changed from 0 to 20 to take into account (skipp) the 5 extra words in the equipment header
299 nwSeg = (fWord >> kbit8) & 0xfff;
300 if(!CheckSegment()) return kFALSE;
301 if(!ReadSegment(cntSegment)) return kFALSE;
303 if(nwSeg != cntSegment) {AliDebug(1,Form("Error in Segment counters: %i different wrt %i",nwSeg,cntSegment)); return kFALSE;}
304 if(!GetWord(cntSegment+1,kBwd)) return kFALSE;
311 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
312 Bool_t AliHMPIDRawStream::ReadSegment(Int_t &cntSegment)
315 //It returns: kFALSE if any error occurs
317 cntSegment = (fWord >> kbit8) & 0xfff;
318 Int_t cnt = cntSegment;
322 if(!GetWord(cnt,kBwd)) return kFALSE;
326 cntRow = (fWord >> kbit16) & 0xfff;
327 if(!CheckRowMarker()) return kFALSE;
328 if(!ReadRow(nwRow)) return kFALSE;
330 if(nwRow != cntRow) {AliDebug(1,Form("Error in Row counters: %i different wrt %i",nwRow,cntRow)); return kFALSE;}
331 if(!GetWord(cntRow+1)) return kFALSE;
341 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
342 Bool_t AliHMPIDRawStream::ReadRow(Int_t &cntRow)
345 //It returns: kFALSE if any error occurs
352 cntRow = (fWord >> kbit16) & 0xfff;
355 if(!GetWord(cntRow)) return kFALSE;
359 if(!CheckEoE(nwDil)) return kFALSE;
360 if(!ReadDilogic(cntDilogic)) return kFALSE;
362 if(nwDil != cntDilogic) {AliDebug(1,Form("Error in Dilogic counters: %i different wrt %i",nwDil,cntDilogic));return kFALSE;}
364 if(!GetWord(1,kBwd)) return kFALSE; // go to next Dilogic bank...
366 // Printf(" cnt %i cntDilogic %i ",cnt,cntDilogic);
374 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
375 Bool_t AliHMPIDRawStream::ReadDilogic(Int_t &cntDilogic)
377 // Read the dilogic bank
378 //It returns: kFALSE if any error occurs
381 cntDilogic = fWord & 0x7f;
383 Int_t cnt = cntDilogic;
385 // Printf(" cnt DILOGIC %i at %i word %08X",cnt,fPosition,fWord);
387 for(Int_t iDil=0;iDil<cntDilogic;iDil++) {
388 UInt_t dilogic = 0, row = 0;
389 if(!GetWord(1,kBwd)) return kFALSE;
390 //check on row number
392 row = (fWord >> kbit22) & 0x1f;
393 if(!CheckRow(row)) continue;
394 //check dilogic number
395 dilogic = (fWord >> kbit18) & 0xf; //dilogic info in raw word is between bits: 18...21
396 if(!CheckDilogic(dilogic)) continue;
398 UInt_t pad = (fWord >> kbit12) & 0x3f; //pad info in raw word is between bits: 12...17
399 if(!CheckPad(pad)) continue;
400 Int_t charge = fWord & 0xfff;
401 if(GetPad(fDDLNumber,row,dilogic,pad)<0) continue;
402 fPad[fNPads] = GetPad(fDDLNumber,row,dilogic,pad);
403 fCharge[fNPads] = charge;
408 AliDebug(1,Form("If PEDESTAL run -> WARNING: ZERO charge is read from DDL: %d row: %d dil: %d pad: %d",fDDLNumber,row,dilogic,pad));
409 fNumOfErr[fDDLNumber][kPedQZero]++;
417 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
418 Bool_t AliHMPIDRawStream::CheckSegment()
420 // Check the segment marker
421 //It returns: kFALSE if any error occurs
424 UInt_t markSegment = 0xAB0;
427 UInt_t segWord = GetWord();
428 if ((segWord >> 20) != statusSegWord) {
429 fRawReader->AddMajorErrorLog(kBadSegWordErr);
430 AliDebug(1,Form("Wrong segment word signature: %x, expected 0xab0!",(segWord >> 20)));
431 fNumOfErr[kBadSegWordErr]++;
435 UInt_t segMarker = (fWord >> kbit20) & 0xfff;
436 if (segMarker != markSegment ) {
437 //fRawReader->AddMajorErrorLog(kWrongSegErr,Form("Segment marker %0X wrong (expected %0X) at %i in word %0X!",segMarker,markSegment,fPosition,fWord));
438 AliDebug(1,Form("Segment marker %X wrong (expected %0X)! at %i in word %0X!",segMarker,markSegment,fPosition,fWord));
439 fNumOfErr[fDDLNumber][kWrongSegErr]++;
443 UInt_t segAddress = fWord & 0xff;
444 if (segAddress<1 ||segAddress>3) {
445 //fRawReader->AddMajorErrorLog(kWrongSegErr,Form("Segment address %d not in the valid range [1-3] at %i in word %0X",segAddress,fPosition,fWord));
446 AliDebug(1,Form("Segment address %d not in the valid range [1-3]",segAddress));
447 fNumOfErr[fDDLNumber][kWrongSegErr]++;
450 // Printf("Segment Marker found at %i! Number of segment is %i",fPosition,segAddress);
453 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
454 Bool_t AliHMPIDRawStream::CheckRow(UInt_t row)
456 //check on row number
457 //It returns: kFALSE if any error occurs
459 // Printf("ROW %i word %0X",row,fWord);
460 if(row>=1 && row <=kNRows) return kTRUE;
462 //fRawReader->AddMajorErrorLog(kWrongRowErr,Form("row %d",row));
463 AliDebug(1,Form("Wrong row index: %d, expected (1 -> %d) word %0X at %i...",row,kNRows,fWord,fPosition));
464 fNumOfErr[fDDLNumber][kWrongRowErr]++;
467 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
468 Bool_t AliHMPIDRawStream::CheckDilogic(UInt_t dilogic)
470 //check dilogic number
471 //It returns: kFALSE if any error occurs
473 if (dilogic>= 1 && dilogic <=kNDILOGICAdd) return kTRUE;
475 //fRawReader->AddMajorErrorLog(kWrongDilogicErr,Form("dil %d",dilogic));
476 AliDebug(1,Form("Wrong DILOGIC index: %d, expected (1 -> %d)!",dilogic,kNDILOGICAdd));
477 fNumOfErr[fDDLNumber][kWrongDilogicErr]++;
478 //dilogic = iDILOGIC;
481 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
482 Bool_t AliHMPIDRawStream::CheckPad(UInt_t pad)
485 //It returns: kFALSE if any error occurs
487 if (pad < kNPadAdd) return kTRUE;
489 //fRawReader->AddMajorErrorLog(kWrongPadErr,Form("pad %d",pad));
490 AliDebug(1,Form("Wrong pad index: %d, expected (0 -> %d)!",pad,kNPadAdd));
491 fNumOfErr[fDDLNumber][kWrongPadErr]++;
494 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
495 Bool_t AliHMPIDRawStream::CheckEoE(Int_t &nDil)
497 //check the End of Event
498 //It returns: kFALSE if any error occurs
500 if (!((fWord >> kbit27) & 0x1)) { //check 27th bit in EoE. It must be 1!
501 //fRawReader->AddMajorErrorLog(kEoEFlagErr);
502 AliDebug(1,Form("Missing end-of-event flag! (%08X) at %i",fWord,fPosition));
503 fNumOfErr[fDDLNumber][kEoEFlagErr]++;
506 nDil = fWord & 0x7f; //nDil=EoE word count
507 if(nDil < 0 || nDil > 48 ) {
509 //fRawReader->AddMajorErrorLog(kEoESizeErr,Form("EoE size=%d",nDil));
510 AliDebug(1,Form("Wrong end-of-event word-count: %08X",fWord));
511 fNumOfErr[fDDLNumber][kEoESizeErr]++;
514 // UInt_t da = (eOfEvent >> 18) & 0xf;
515 // if (cntData!=0 && da != dilogic) {
516 // fRawReader->AddMajorErrorLog(kEoEDILOGICErr,Form("eoe dil %d != %d",da,dilogic));
517 // AliDebug(1,Form("Wrong DILOGIC address found in end-of-event: %d, expected %d!",da,dilogic));
518 // fNumOfErr[kEoEDILOGICErr]++;
519 // return kFALSE; AliQAChecker::Instance()->Run(AliQAv1::kHMPID, task, obj) ;
522 // UInt_t ca = (eOfEvent >> 22) & 0x1f;
523 // if (cntData!=0 && ca != row) {
524 // fRawReader->AddMajorErrorLog(kEoERowErr,Form("eoe row %d != %d",ca,row));
525 // AliDebug(1,Form("Wrong row index found in end-of-event: %d, expected %d!",ca,row));
526 // fNumOfErr[kEoERowErr]++;
531 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
532 Bool_t AliHMPIDRawStream::CheckRowMarker()
534 //check the row marker
535 //It returns: kFALSE if any error occurs
537 UInt_t nMAXwordsInRow = 0x1EA;
538 UInt_t statusControlRow = 0x32a8; // 0x36a8 for zero suppression
539 //First check on row marker
540 UInt_t rowControlWord = fWord >> kbit0 & 0xfbff;
542 if(rowControlWord != statusControlRow) {
543 //fRawReader->AddMajorErrorLog(kRowMarkerErr);
544 AliDebug(1,Form("Wrong row marker %x expected 0x32a8!",rowControlWord));
545 fNumOfErr[fDDLNumber][kRowMarkerErr]++;
548 //Second check on row marker
549 UInt_t wordsInRow = fWord >> kbit16 & 0x0fff; // Number of words after the row marker, bit 10 is skipped in this check
551 if (wordsInRow > nMAXwordsInRow) {
552 //fRawReader->AddMajorErrorLog(kRowMarkerSizeErr);
553 AliDebug(1,Form(" FATAL: Number of words %x in a row exceeds the expected value: 0x1EA !",wordsInRow));
554 fNumOfErr[fDDLNumber][kRowMarkerSizeErr]++;
560 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
561 Bool_t AliHMPIDRawStream::GetWord(Int_t n,EDirection dir)
563 // This method returns the n-th 32 bit word
564 // inside the raw data payload.
565 // The method is supposed to be endian (platform)
570 AliError("fPosition < 0 !!! Event skipped.");
571 fRawReader->AddMajorErrorLog(kRawDataSizeErr,"fPosition<0");
575 if(dir==kBwd) n = -n;
578 if(fPosition==-4) return kTRUE;
580 if(fPosition<0 || fPosition > fRawReader->GetDataSize()) {
581 AliWarning(Form("fPosition out of boundaries %i",fPosition));
587 fWord |= fData[fPosition++];
588 fWord |= fData[fPosition++] << 8;
589 fWord |= fData[fPosition++] << 16;
590 fWord |= fData[fPosition++] << 24;
594 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
595 void AliHMPIDRawStream::DumpData(Int_t nw)
597 //just a simple raw data dump
598 // in () is the position in bytes
600 for(Int_t i=0;i<nw;i+=4) {
601 if(!(i%16)) printf(" \n %8i) ",i);
602 printf("%02X%02X%02X%02X [ %06i ] ",fData[i+3],fData[i+2],fData[i+1],fData[i+0],fPos[i]);
604 Printf(" \n -----end of dump ----------- ");
606 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
607 void AliHMPIDRawStream::StorePosition()
609 //just for debug purpose
610 // it stores the position
611 //read for the first time
612 // Printf("@@@@@@@@@ fPos: %x fPosition: %d",fPos,fPosition);
613 if(fPos[fPosition]!=0) {
614 // Printf("Position already stored!!! Value %i at address %i",fPos[fPosition],fPosition);
618 fPos[fPosition] = fiPos;
619 // if(stDeb)Printf("%i - Actual position %i",iPos,fPosition);
621 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++