]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCDigit.h
ALIROOT-5634 Install all needed files
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigit.h
index c8e78910425840c4a9ab84c7e01dc6150c8fbde6..948d4d1513dc248f1ea1cde55a6632daf58394a1 100644 (file)
@@ -20,24 +20,31 @@ class AliZDCDigit : public TObject {
   AliZDCDigit() ;
   AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
   AliZDCDigit(const AliZDCDigit & digit);
+  AliZDCDigit& operator= (const AliZDCDigit &digit);
   virtual ~AliZDCDigit() {}
 
   // Getters 
-  const Int_t   GetSector(Int_t i)       {return fSector[i];}
-  const Int_t   GetADCValue(Int_t i)      {return fADCValue[i];}
+  Int_t   GetSector(Int_t i)     {return fSector[i];}
+  Int_t   GetADCValue(Int_t i)    {return fADCValue[i];}
 
   // Operators
   // Two digits are equal if they refers to the detector
   // in the same sub-volume (same procedure as for hits)
-  const Int_t operator == (AliZDCDigit &digit) {
+  Int_t operator == (AliZDCDigit &digit){
     Int_t i;
     for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
     return 1;
   }
   // Adds the amplitude of digits 
-  virtual AliZDCDigit& operator + (AliZDCDigit &digit) {
+  virtual AliZDCDigit operator + (AliZDCDigit &digit){
     for(Int_t i = 0; i < 2; i++) fADCValue[i] += digit.fADCValue[i];
-    return *this ;
+    return *this;
+  }
+
+  // Print method
+  virtual void Print(Option_t *) const {
+     printf("\t AliZDCDigit -> Detector %d Quadrant %d: ADC HighGain=  %d ADC LowGain=  %d\n ",
+     fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
   }
   
  protected:
@@ -45,12 +52,6 @@ class AliZDCDigit : public TObject {
   //Data members
   Int_t  fSector[2];         // Detector and tower in which light is produced
   Int_t  fADCValue[2];       // ADC channel value (0 = high gain, 1 = low gain)
-
-  // Print method
-  virtual void Print(Option_t *) const {
-     printf(" -> DIGIT: Detector =  %d Quadrant =  %d ADCCh high gain=  %d ADCCh low gain=  %d\n ",
-     fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
-  }
     
   ClassDef(AliZDCDigit,4)   // Digits in ZDC