]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRawStreamSDDv3.cxx
In Open() and GotoEvent() try the ESD operations first, fallback to run-loader.
[u/mrichter/AliRoot.git] / ITS / AliITSRawStreamSDDv3.cxx
index 52555461458ff2a7a0c8d53341fa40d623d56e42..c92f41ff8ddc8cf5f67029de6902405a0f580c9e 100644 (file)
@@ -66,15 +66,15 @@ Bool_t AliITSRawStreamSDDv3::Next()
 // read the next raw digit
 // returns kFALSE if there is no digit left
   // skip the first 8 words
-  while (fSkip < 9) {
+  while (fSkip[0] < 9) {
     if (!fRawReader->ReadNextInt(fData)) return kFALSE;
     if ((fData >> 30) == 0x01) continue;  // JTAG word
-    fSkip++;
+    fSkip[0]++;
   }
 
   Int_t countFoot=0;   
   while (kTRUE) {
-    if ((fChannel < 0) || (fLastBit[fChannel] < fReadBits[fChannel])) {
+    if ((fChannel < 0) || (fLastBit[0][fChannel] < fReadBits[0][fChannel])) {
       if (!fRawReader->ReadNextInt(fData)) return kFALSE;  // read next word
       fChannel = -1;
       if ((fData >> 28) == 0x02) {           // header
@@ -85,9 +85,9 @@ Bool_t AliITSRawStreamSDDv3::Next()
         if(countFoot==3) return kFALSE;         
       } else if ((fData >> 29) == 0x00) {    // error
 
-      if ((fData & 0x00000163) != 0) {
-       Error("Next", "error codes = %8.8x",fData);
-        return kFALSE; 
+       if ((fData & 0x00000163) != 0) {
+         Error("Next", "error codes = %8.8x",fData);
+         return kFALSE; 
        }
       } else if ((fData >> 30) == 0x01) {    // JTAG word
        // ignored
@@ -102,32 +102,32 @@ Bool_t AliITSRawStreamSDDv3::Next()
       
 
       if (fChannel >= 0) {          // add read word to the data
-       fChannelData[fChannel] += 
-         (ULong64_t(fData & 0x3FFFFFFF) << fLastBit[fChannel]);
-       fLastBit[fChannel] += 30;
+       fChannelData[0][fChannel] += 
+         (ULong64_t(fData & 0x3FFFFFFF) << fLastBit[0][fChannel]);
+       fLastBit[0][fChannel] += 30;
       }
 
     } else {  // decode data
-      if (fReadCode[fChannel]) {    // read the next code word
-       fChannelCode[fChannel] = ReadBits();
-       fReadCode[fChannel] = kFALSE;
-       fReadBits[fChannel] = fgkCodeLength[fChannelCode[fChannel]];
+      if (fReadCode[0][fChannel]) {    // read the next code word
+       fChannelCode[0][fChannel] = ReadBits();
+       fReadCode[0][fChannel] = kFALSE;
+       fReadBits[0][fChannel] = fgkCodeLength[fChannelCode[0][fChannel]];
 
       } else {                      // read the next data word
        UInt_t data = ReadBits();
-       fReadCode[fChannel] = kTRUE;
-       fReadBits[fChannel] = 3;
-       if (fChannelCode[fChannel] == 0) {         // set the time bin
-         fTimeBin[fChannel] = data;
-       } else if (fChannelCode[fChannel] == 1) {  // next anode
-         fTimeBin[fChannel] = 0;
-         fAnode[fChannel]++;
+       fReadCode[0][fChannel] = kTRUE;
+       fReadBits[0][fChannel] = 3;
+       if (fChannelCode[0][fChannel] == 0) {         // set the time bin
+         fTimeBin[0][fChannel] = data;
+       } else if (fChannelCode[0][fChannel] == 1) {  // next anode
+         fTimeBin[0][fChannel] = 0;
+         fAnode[0][fChannel]++;
        } else {                                   // ADC signal data
-         fSignal = DecompAmbra(data + (1 << fChannelCode[fChannel]) + 
+         fSignal = DecompAmbra(data + (1 << fChannelCode[0][fChannel]) + 
            fLowThreshold[fChannel]);
-         fCoord1 = fAnode[fChannel];
-         fCoord2 = fTimeBin[fChannel];
-         fTimeBin[fChannel]++;
+         fCoord1 = fAnode[0][fChannel];
+         fCoord2 = fTimeBin[0][fChannel];
+         fTimeBin[0][fChannel]++;
          return kTRUE;
        }
       }
@@ -139,6 +139,9 @@ Bool_t AliITSRawStreamSDDv3::Next()
 
 Int_t AliITSRawStreamSDDv3::GetJitter() {
 
+  // Reads the value of the jitter between L0 and pascal stop
+  // written in the last word of the buffer
+
      if (!fRawReader->ReadNextInt(fData)){
        Error("GetJitter","Jitter word not found!!");
        return -1;  // read last word