1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 Patch object implementation: one patch is made of subregions (Olivier's nomenclature)
21 Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
24 #include "AliEMCALTriggerPatch.h"
27 ClassImp(AliEMCALTriggerPatch)
30 AliEMCALTriggerPatch::AliEMCALTriggerPatch() : TObject(),
36 // Default constructor
40 AliEMCALTriggerPatch::AliEMCALTriggerPatch(Int_t i, Int_t j, Int_t k, Int_t l) : TObject(),
41 fPosition(new TVector2(i, j)),
49 //____________________________________________________________________
50 AliEMCALTriggerPatch::AliEMCALTriggerPatch(const AliEMCALTriggerPatch& other) : TObject(other),
51 fPosition(new TVector2(*other.fPosition)),
60 AliEMCALTriggerPatch::~AliEMCALTriggerPatch()
63 if (fPosition) delete fPosition;
67 void AliEMCALTriggerPatch::SetPeak(Int_t x, Int_t y, Int_t sizeX, Int_t sizeY)
70 if (sizeX * sizeY > 31) AliError("32b limit exceeded!");
72 fPeaks = (fPeaks | (1 << (y * sizeX + x)));
76 void AliEMCALTriggerPatch::Print(const Option_t*) const
79 printf("]> Patch at (%2d , %2d) w/ sum %3d time %2d\n",
80 (int)fPosition->X(), (int)fPosition->Y(), fSum, fTime);