]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCDigit.cxx
Fix for backward compatibility of TOF structures (needed for tenders)
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.cxx
index 9ab4bac0cf4a0c68116ba202fde177d84cae5179..dc49e4ffe05b400fb101a9af7acae384f2ad4dab 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-//_________________________________________________________________________
+//**********************************************************************
 //
+//             Class for ZDC digit 
+//           ADC Channels for each PM 
+//        5 for hadronic ZDCs 2 for EM ZDCs
 //
-//   ZDC digit = ADC Channels for each PM 
-//
-//_________________________________________________________________________
+//**********************************************************************
 
 #include "AliZDCDigit.h"
 
@@ -30,26 +31,44 @@ ClassImp(AliZDCDigit)
 {
   // Default constructor 
   
+  Int_t i;
+  for(i=0; i<2; i++) fSector[i] = 0;
+  for(i=0; i<2; i++) fADCValue[i] = 0;  
 }
 
 //____________________________________________________________________________
-AliZDCDigit::AliZDCDigit(Int_t Det, Int_t Quad, Float_t ADCValue) 
+AliZDCDigit::AliZDCDigit(Int_t *Sector, Int_t *ADCValue) 
 {  
-  // constructor with all data 
+  // Constructor 
+  Int_t i;
+  for(i=0; i<2; i++) fSector[i] = Sector[i];
+  for(i=0; i<2; i++) fADCValue[i] = ADCValue[i];  
+}
+
+//____________________________________________________________________________
+AliZDCDigit::AliZDCDigit(const AliZDCDigit & digit):TObject(digit)
+{
+  // Copy constructor
 
+  fSector[0]   = digit.fSector[0];           
+  fSector[1]   = digit.fSector[1];           
+  fADCValue[0] = digit.fADCValue[0];             
+  fADCValue[1] = digit.fADCValue[1];             
 
-  fDetector = Det;
-  fQuadrant = Quad;
-  fADCValue = ADCValue;  
 }
 
 //____________________________________________________________________________
-AliZDCDigit::AliZDCDigit(const AliZDCDigit & digit) 
+AliZDCDigit &AliZDCDigit::operator=(const AliZDCDigit &digit)
 {
-  // copy constructor
-
-  fDetector = digit.fDetector;           
-  fQuadrant = digit.fQuadrant;           
-  fADCValue = digit.fADCValue;             
+  // Assignemnt constructor
+  if(&digit == this) return *this;
 
+  for(int i=0; i<2; i++){
+    fSector[i]   = digit.fSector[i];           
+    fADCValue[i] = digit.fADCValue[i];             
+  }
+  
+  return *this;
 }
+