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 **************************************************************************/
16 //_________________________________________________________________________
17 // Digit class for PHOS that contains an absolute ID and an energy
18 //*-- Author : Laurent Aphecetche SUBATECH
19 //////////////////////////////////////////////////////////////////////////////
21 // --- ROOT system ---
23 // --- Standard library ---
27 // --- AliRoot header files ---
29 #include "AliPHOSDigit.h"
32 ClassImp(AliPHOSDigit)
34 //____________________________________________________________________________
35 AliPHOSDigit::AliPHOSDigit(Int_t id, Int_t DigEnergy) : AliDigitNew( ), fId(id),fAmp(DigEnergy)
37 // This part should be a true Digitization, but is not for the moment.
43 //____________________________________________________________________________
44 Bool_t AliPHOSDigit::operator==(AliPHOSDigit const &Digit) const
46 if ( fId == Digit.fId )
52 //____________________________________________________________________________
53 AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const &Digit)
60 //____________________________________________________________________________
61 ostream& operator << ( ostream& out , const AliPHOSDigit& Digit)
63 out << "ID " << Digit.fId << " Energy = " << Digit.fAmp ;
68 //____________________________________________________________________________
69 Int_t AliPHOSDigit::Compare(TObject * obj)
73 AliPHOSDigit * digit = (AliPHOSDigit *)obj ;
75 Int_t iddiff = fId - digit->GetId() ;
79 else if ( iddiff < 0 )