]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFRawDataRead.C
Removing the fake copy constructors and assignment operator, moving their declaration...
[u/mrichter/AliRoot.git] / TOF / AliTOFRawDataRead.C
1 void AliTOFRawDataRead(Int_t iEvent=0)
2 {
3   //
4   // To read TOF raw data
5   //
6
7   Int_t ii = 0;
8   Int_t indexDDL = 0;
9   Int_t detectorIndex[5] = {-1, -1, -1, -1, -1};
10
11   AliRawReaderFile reader(iEvent);
12   reader.RewindEvents();
13
14   while (reader.NextEvent()) {
15
16     for (indexDDL = 0; indexDDL < AliDAQ::NumberOfDdls("TOF"); indexDDL++) {
17
18       reader.Reset();
19       AliTOFRawStream stream(&reader);
20       reader.Select("TOF", indexDDL, indexDDL);
21
22       //FILE *fpw = fopen("TOFrawDataRead.txt","w");
23
24       while(stream.Next()) {
25
26         for (ii=0; ii<5; ii++) detectorIndex[ii] = -1;
27
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();
33
34         if (detectorIndex[0]==-1 ||
35             detectorIndex[1]==-1 ||
36             detectorIndex[2]==-1 ||
37             detectorIndex[3]==-1 ||
38             detectorIndex[4]==-1) continue;
39         else {
40
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
57
58 }