LCOV - code coverage report
Current view: top level - ZDC/ZDCbase - AliZDCDigit.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 12 33.3 %
Date: 2016-06-14 17:26:59 Functions: 7 13 53.8 %

          Line data    Source code
       1             : #ifndef ALIZDCDIGIT_H
       2             : #define ALIZDCDIGIT_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : //**********************************************************************
       7             : //
       8             : //              Class for ZDC digit 
       9             : //            ADC Channels for each PM 
      10             : //         5 for hadronic ZDCs 1 for EM ZDCs
      11             : //
      12             : //**********************************************************************
      13             : 
      14             : #include<TObject.h>
      15             : 
      16             : class AliZDCDigit : public TObject {
      17             : 
      18             :  public:
      19             :   
      20             :   AliZDCDigit() ;
      21             :   AliZDCDigit(Int_t *Sector, Int_t *ADCValue);
      22             :   AliZDCDigit(const AliZDCDigit & digit);
      23             :   AliZDCDigit& operator= (const AliZDCDigit &digit);
      24          54 :   virtual ~AliZDCDigit() {}
      25             : 
      26             :   // Getters 
      27       14176 :   Int_t   GetSector(Int_t i)      {return fSector[i];}
      28        2944 :   Int_t   GetADCValue(Int_t i)    {return fADCValue[i];}
      29             : 
      30             :   // Operators
      31             :   // Two digits are equal if they refers to the detector
      32             :   // in the same sub-volume (same procedure as for hits)
      33             :   Int_t operator == (AliZDCDigit &digit){
      34             :     Int_t i;
      35           0 :     for(i=0; i<2; i++) if(fSector[i]!=digit.GetSector(i)) return 0;
      36           0 :     return 1;
      37           0 :   }
      38             :   // Adds the amplitude of digits 
      39             :   virtual AliZDCDigit operator + (AliZDCDigit &digit){
      40           0 :     for(Int_t i = 0; i < 2; i++) fADCValue[i] += digit.fADCValue[i];
      41           0 :     return *this;
      42             :   }
      43             : 
      44             :   // Print method
      45             :   virtual void Print(Option_t *) const {
      46           0 :      printf("\t AliZDCDigit -> Detector %d Quadrant %d: ADC HighGain=  %d ADC LowGain=  %d\n ",
      47           0 :      fSector[0], fSector[1], fADCValue[0], fADCValue[1]);
      48           0 :   }
      49             :   
      50             :  protected:
      51             : 
      52             :   //Data members
      53             :   Int_t  fSector[2];         // Detector and tower in which light is produced
      54             :   Int_t  fADCValue[2];       // ADC channel value (0 = high gain, 1 = low gain)
      55             :     
      56          24 :   ClassDef(AliZDCDigit,4)   // Digits in ZDC 
      57             : 
      58             : } ;
      59             : 
      60             : #endif //  ALIZDCDIGIT_H
      61             : 

Generated by: LCOV version 1.11