]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFRawDataRead.C
Important bugfix. Missing reset of the equipment header data. It was causing a wrong...
[u/mrichter/AliRoot.git] / TOF / AliTOFRawDataRead.C
CommitLineData
571dda3d 1void AliTOFRawDataRead(Int_t iEvent=0)
2{
3 //
4 // To read TOF raw data
5 //
6
d0eb8f39 7 Int_t ii = 0;
571dda3d 8 Int_t indexDDL = 0;
d0eb8f39 9 Int_t detectorIndex[5] = {-1, -1, -1, -1, -1};
571dda3d 10
d0eb8f39 11 AliRawReaderFile reader(iEvent);
12 reader.RewindEvents();
571dda3d 13
d0eb8f39 14 while (reader.NextEvent()) {
571dda3d 15
d0eb8f39 16 for (indexDDL = 0; indexDDL < AliDAQ::NumberOfDdls("TOF"); indexDDL++) {
571dda3d 17
d0eb8f39 18 reader.Reset();
19 AliTOFRawStream stream(&reader);
20 reader.Select("TOF", indexDDL, indexDDL);
571dda3d 21
d0eb8f39 22 //FILE *fpw = fopen("TOFrawDataRead.txt","w");
571dda3d 23
d0eb8f39 24 while(stream.Next()) {
571dda3d 25
d0eb8f39 26 for (ii=0; ii<5; ii++) detectorIndex[ii] = -1;
571dda3d 27
d0eb8f39 28 detectorIndex[0] = (Int_t)stream.GetSector();
29 detectorIndex[1] = (Int_t)stream.GetPlate();
30 detectorIndex[2] = (Int_t)stream.GetStrip();
31 detectorIndex[3] = (Int_t)stream.GetPadZ();
32 detectorIndex[4] = (Int_t)stream.GetPadX();
571dda3d 33
d0eb8f39 34 if (detectorIndex[0]==-1 ||
35 detectorIndex[1]==-1 ||
36 detectorIndex[2]==-1 ||
37 detectorIndex[3]==-1 ||
38 detectorIndex[4]==-1) continue;
39 else {
571dda3d 40
d0eb8f39 41 printf("%2i %2i %2i %2i %2i %2i %1i %2i %1i %2i %7i %8i\n",
42 stream.GetDDL(),stream.GetTRM(),stream.GetTRMchain(),
43 stream.GetTDC(),stream.GetTDCchannel(),
44 stream.GetSector(),stream.GetPlate(),
45 stream.GetStrip(),stream.GetPadZ(),stream.GetPadX(),
46 stream.GetToTbin(),stream.GetTofBin());
47
48 } // end else
49
50 } // end while loop on next stream
51
52 } // endl loop on DDL files
53
54 iEvent++;
55
56 } // end while loop on event
571dda3d 57
58}