]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZERO.cxx
fix of a minor bug in the tracklet constructor
[u/mrichter/AliRoot.git] / VZERO / AliVZERO.cxx
index 10dd35881c840afd090ab224a759ce4a71e144c1..a6adecc57fe987a360847b25fd2cb4bf04b5d13d 100755 (executable)
@@ -125,14 +125,6 @@ AliVZERO::~AliVZERO()
         fDigits=0; }
 }
 
-//_____________________________________________________________________________
-void AliVZERO::BuildGeometry()
-{
-  //
-  // Builds simple ROOT TNode geometry for event display
-  //
-}
 //_____________________________________________________________________________
 void AliVZERO::CreateGeometry()
 {
@@ -148,17 +140,6 @@ void AliVZERO::CreateMaterials()
   //
 }
 
-//_____________________________________________________________________________
-Int_t AliVZERO::DistanceToPrimitive(Int_t /*px*/, Int_t /*py*/)
-{
-  //
-  // Calculates the distance from the mouse to the VZERO on the screen
-  // Dummy routine
-  //
-  
-  return 9999;
-}
 //_____________________________________________________________________________
 void AliVZERO::Init()
 {
@@ -322,6 +303,7 @@ void AliVZERO::Digits2Raw()
    UInt_t ADC[64];
    Int_t PMNumber[64];
    UInt_t Time[64];
+   Bool_t Integrator[64];
   
    for (Int_t i = 0; i < nEntries; i++) {
      fVZERO->ResetDigits();
@@ -331,10 +313,13 @@ void AliVZERO::Digits2Raw()
      if(ndig == 0) continue;
      if(verbose == 2) {ftxt.open("VZEROdigits.txt",ios::app);}
      for(Int_t k=0; k<ndig; k++){
-         AliVZEROdigit* fVZERODigit = (AliVZEROdigit*) VZEROdigits->At(k);                     
-        ADC[k]       = (UInt_t) fVZERODigit->ADC();
-        PMNumber[k]  = fVZERODigit->PMNumber();
-        Time[k]      = (UInt_t) fVZERODigit->Time();
+         AliVZEROdigit* fVZERODigit = (AliVZEROdigit*) VZEROdigits->At(k);
+         // Convert aliroot channel k into FEE channel iChannel before writing data
+        Int_t iChannel = buffer->GetOnlineChannel(k);          
+        ADC[iChannel]       = (UInt_t) fVZERODigit->ADC();
+        PMNumber[iChannel]  = fVZERODigit->PMNumber();
+        Time[iChannel]      = (UInt_t) fVZERODigit->Time();
+        Integrator[iChannel]= fVZERODigit->Integrator(); 
          if(verbose == 1) { cout <<"DDL: "<<fileName<< "\tdigit number: "<< k<<"\tPM number: "
                            <<PMNumber[k]<<"\tADC: "<< ADC[k] << "\tTime: "<< Time[k] << endl;} 
         if(verbose == 2) {
@@ -354,15 +339,15 @@ void AliVZERO::Digits2Raw()
   
       for(Int_t iChannel_Offset = iCIU*8; iChannel_Offset < (iCIU*8)+8; iChannel_Offset=iChannel_Offset+4) { 
          for(Int_t iChannel = iChannel_Offset; iChannel < iChannel_Offset+4; iChannel++) {
-             buffer->WriteChannel(iChannel, ADC[iChannel], Time[iChannel]);       
+             buffer->WriteChannel(iChannel, ADC[iChannel], Time[iChannel], Integrator[iChannel]);       
          }
          buffer->WriteBeamFlags(); 
          buffer->WriteMBInfo(); 
          buffer->WriteMBFlags();   
          buffer->WriteBeamScalers(); 
       } 
-      for(Int_t kChannel = kChannel=0; kChannel < 8; kChannel++) {
-          buffer->WriteTiming(kChannel, ADC[kChannel], Time[kChannel]); 
+      for(Int_t iChannel=0; iChannel < 8; iChannel++) {
+          buffer->WriteTiming(iChannel, ADC[iChannel], Time[iChannel]); 
       }
 
     // End of decoding of one CIU card
@@ -419,6 +404,7 @@ Bool_t AliVZERO::Raw2SDigits(AliRawReader* rawReader){
 
   timer.Stop();
   timer.Print();
+  return kTRUE;
 }