]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFRawDataRead.C
Removing the fake copy constructors and assignment operator, moving their declaration...
[u/mrichter/AliRoot.git] / TOF / AliTOFRawDataRead.C
index 912f886351d25fb56c1c2f57c08365d5d06fbdb2..90457bf4ab141eea8e2425363003ef4bc2ac6fe2 100644 (file)
@@ -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(5, 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
 
 }