LCOV - code coverage report
Current view: top level - EMCAL/EMCALsim - AliEMCALTriggerPatch.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 14 31 45.2 %
Date: 2016-06-14 17:26:59 Functions: 7 12 58.3 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : /*
      17             : 
      18             :  
      19             : 
      20             : Patch object implementation: one patch is made of subregions (Olivier's nomenclature)
      21             : Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
      22             : */
      23             : 
      24             : #include "AliEMCALTriggerPatch.h"
      25             : #include "AliLog.h"
      26             : 
      27          42 : ClassImp(AliEMCALTriggerPatch)
      28             : 
      29             : //____________
      30           0 : AliEMCALTriggerPatch::AliEMCALTriggerPatch() : TObject(),
      31           0 : fPosition(0x0),
      32           0 : fSum(0),
      33           0 : fTime(0),
      34           0 : fPeaks(0)
      35           0 : {
      36             :         // Default constructor
      37           0 : }
      38             : 
      39             : //____________
      40         232 : AliEMCALTriggerPatch::AliEMCALTriggerPatch(Int_t i, Int_t j,  Int_t k, Int_t l) : TObject(),
      41         696 : fPosition(new TVector2(i, j)),
      42         232 : fSum(k),
      43         232 : fTime(l),
      44         232 : fPeaks(0)
      45        1160 : {
      46             :         //
      47         464 : }
      48             : 
      49             : //____________________________________________________________________
      50           0 : AliEMCALTriggerPatch::AliEMCALTriggerPatch(const AliEMCALTriggerPatch& other) : TObject(other), 
      51           0 : fPosition(new TVector2(*other.fPosition)),
      52           0 : fSum(other.fSum),
      53           0 : fTime(other.fTime),
      54           0 : fPeaks(other.fPeaks)
      55           0 : {       
      56             :         // Copy ctor
      57           0 : }
      58             : 
      59             : //____________
      60             : AliEMCALTriggerPatch::~AliEMCALTriggerPatch()
      61        1392 : {       
      62             :         //
      63         696 :         if (fPosition) delete fPosition;
      64         696 : }
      65             : 
      66             : //____________
      67             : void AliEMCALTriggerPatch::SetPeak(Int_t x, Int_t y, Int_t sizeX, Int_t sizeY)
      68             : {
      69             :         //
      70         150 :         if (sizeX * sizeY > 31) AliError("32b limit exceeded!");
      71             :         
      72          75 :         fPeaks = (fPeaks | (1 << (y * sizeX + x)));
      73          75 : }
      74             : 
      75             : //____________
      76             : void AliEMCALTriggerPatch::Print(const Option_t*) const
      77             : {
      78             :         //
      79           0 :         printf("]> Patch at (%2d , %2d) w/ sum %3d time %2d\n",
      80           0 :                    (int)fPosition->X(), (int)fPosition->Y(), fSum, fTime); 
      81           0 : }

Generated by: LCOV version 1.11