X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFRawDataRead.C;h=90457bf4ab141eea8e2425363003ef4bc2ac6fe2;hb=8c1bd222e73ffe66808d7272356a3b76e42b059c;hp=de24f1e74677f7cf3c88ecc9c0a92ee7c764037c;hpb=362c9d61708912a81d77cb017e1d05fd1f9486a6;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFRawDataRead.C b/TOF/AliTOFRawDataRead.C index de24f1e7467..90457bf4ab1 100644 --- a/TOF/AliTOFRawDataRead.C +++ b/TOF/AliTOFRawDataRead.C @@ -4,45 +4,55 @@ void AliTOFRawDataRead(Int_t iEvent=0) // To read TOF raw data // + Int_t ii = 0; Int_t indexDDL = 0; + Int_t detectorIndex[5] = {-1, -1, -1, -1, -1}; - AliRawReaderFile reader(ievt); + AliRawReaderFile reader(iEvent); + reader.RewindEvents(); - for (indexDDL = 0; indexDDL < 72; indexDDL++) { + while (reader.NextEvent()) { - reader.Reset(); - AliTOFRawStream stream(&reader); - reader.Select("TOF", indexDDL, indexDDL); + for (indexDDL = 0; indexDDL < AliDAQ::NumberOfDdls("TOF"); indexDDL++) { - //FILE *fpw = fopen("TOFrawDataRead.txt","w"); + reader.Reset(); + AliTOFRawStream stream(&reader); + reader.Select("TOF", indexDDL, indexDDL); - while(stream.Next()) { + //FILE *fpw = fopen("TOFrawDataRead.txt","w"); - if (stream.GetSector()==0) { + while(stream.Next()) { - printf("%2i %2i %2i %2i %2i %1i %2i %1i %2i %7i %8i\n", - stream.GetDDL(),stream.GetTRM(), - stream.GetTDC(),stream.GetChannel(), - stream.GetSector(),stream.GetPlate(), - stream.GetStrip(),stream.GetPadZ(),stream.GetPadX(), - stream.GetADCbin(),stream.GetTofBin()); - /* - Int_t iSector = stream.GetSector(); - Int_t iPlate = stream.GetPlate(); - Int_t iStrip = stream.GetStrip(); - Int_t iPadZ = stream.GetPadZ(); - Int_t iPadX = stream.GetPadX(); - Int_t iTof = stream.GetTofBin(); - Int_t iAdc = stream.GetADCbin(); - - fprintf(fpw,"%2i %1i %2i %1i %2i %8i %7i\n", - iSector, iPlate, iStrip, iPadZ, iPadX, iTof, iAdc); - */ + for (ii=0; ii<5; ii++) detectorIndex[ii] = -1; - } + detectorIndex[0] = (Int_t)stream.GetSector(); + detectorIndex[1] = (Int_t)stream.GetPlate(); + detectorIndex[2] = (Int_t)stream.GetStrip(); + detectorIndex[3] = (Int_t)stream.GetPadZ(); + detectorIndex[4] = (Int_t)stream.GetPadX(); - } + if (detectorIndex[0]==-1 || + detectorIndex[1]==-1 || + detectorIndex[2]==-1 || + detectorIndex[3]==-1 || + detectorIndex[4]==-1) continue; + else { - } + printf("%2i %2i %2i %2i %2i %2i %1i %2i %1i %2i %7i %8i\n", + stream.GetDDL(),stream.GetTRM(),stream.GetTRMchain(), + stream.GetTDC(),stream.GetTDCchannel(), + stream.GetSector(),stream.GetPlate(), + stream.GetStrip(),stream.GetPadZ(),stream.GetPadX(), + stream.GetToTbin(),stream.GetTofBin()); + + } // end else + + } // end while loop on next stream + + } // endl loop on DDL files + + iEvent++; + + } // end while loop on event }