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 **************************************************************************/
15 #include "AliT0LookUpValue.h"
17 ClassImp(AliT0LookUpValue)
19 AliT0LookUpValue:: AliT0LookUpValue(): TObject(),
31 AliT0LookUpValue:: AliT0LookUpValue(Int_t trm, Int_t tdc, Int_t chain, Int_t channel) : TObject(),
39 Bool_t AliT0LookUpValue:: IsEqual(const TObject* obj) const
41 AliT0LookUpValue *b = ( AliT0LookUpValue*)obj;
43 printf("IsEqual %i %i\n %i %i\n %i %i\n %i %i\n \n",b->GetTRM(), fTRM,
44 b->GetTDC(), fTDC, b->GetChain(), fChain, b->GetChannel(), fChannel );
46 if ( b->GetTRM() == fTRM &&
47 b->GetTDC() == fTDC &&
48 b->GetChain() == fChain &&
49 b->GetChannel() == fChannel ) return kTRUE;
52 ULong_t AliT0LookUpValue:: Hash(void) const
54 ULong_t hash = 1000*fTRM+100*fTDC+10*fChain+1*fChannel;
55 //printf("hash=%i\n",hash);
59 ClassImp(AliT0LookUpKey)
61 AliT0LookUpKey::AliT0LookUpKey():
69 AliT0LookUpKey::AliT0LookUpKey(Int_t key):
77 AliT0LookUpKey::AliT0LookUpKey(TString name):
85 Bool_t AliT0LookUpKey:: IsEqual(const TObject* obj) const
88 // printf("IsEqual\n");
89 k=((AliT0LookUpKey*)obj)->GetKey();
90 if (k==fKey) return kTRUE; else return kFALSE;