]>
Commit | Line | Data |
---|---|---|
a2bf19ee | 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 | #include "AliT0LookUpValue.h" | |
16 | ||
17 | ClassImp(AliT0LookUpValue) | |
18 | ||
19 | AliT0LookUpValue:: AliT0LookUpValue(): TObject(), | |
20 | fTRM(-1), | |
21 | fTDC(-1), | |
22 | fChain(-1), | |
23 | fChannel(-1) | |
24 | ||
25 | ||
26 | { | |
27 | ||
28 | /// | |
29 | } | |
30 | ||
31 | AliT0LookUpValue:: AliT0LookUpValue(Int_t trm, Int_t tdc, Int_t chain, Int_t channel) : TObject(), | |
32 | fTRM(trm), | |
33 | fTDC(tdc), | |
34 | fChain(chain), | |
35 | fChannel(channel) | |
36 | { | |
37 | ||
38 | } | |
39 | Bool_t AliT0LookUpValue:: IsEqual(const TObject* obj) const | |
40 | { | |
41 | AliT0LookUpValue *b = ( AliT0LookUpValue*)obj; | |
42 | /* | |
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 ); | |
45 | */ | |
46 | if ( b->GetTRM() == fTRM && | |
47 | b->GetTDC() == fTDC && | |
48 | b->GetChain() == fChain && | |
49 | b->GetChannel() == fChannel ) return kTRUE; | |
50 | else return kFALSE; | |
51 | } | |
52 | ULong_t AliT0LookUpValue:: Hash(void) const | |
53 | { | |
54 | ULong_t hash = 1000*fTRM+100*fTDC+10*fChain+1*fChannel; | |
55 | //printf("hash=%i\n",hash); | |
56 | return hash; | |
57 | } | |
58 | /* | |
59 | void AliT0LookUpValue:: Clear() | |
60 | { | |
61 | fTRM=-1; | |
62 | fTDC=-1; | |
63 | fChain=-1; | |
64 | fChannel=-1; | |
65 | } | |
66 | */ | |
67 | ||
68 | ClassImp(AliT0LookUpKey) | |
69 | ||
092d86a9 | 70 | AliT0LookUpKey::AliT0LookUpKey(): |
71 | TObject(), | |
72 | fKey(0), | |
73 | fName("") | |
a2bf19ee | 74 | { |
75 | ||
76 | } | |
77 | ||
092d86a9 | 78 | AliT0LookUpKey::AliT0LookUpKey(Int_t key): |
79 | TObject(), | |
80 | fKey(key), | |
81 | fName("") | |
a2bf19ee | 82 | { |
83 | ||
84 | } | |
85 | ||
092d86a9 | 86 | AliT0LookUpKey::AliT0LookUpKey(TString name): |
87 | TObject(), | |
88 | fKey(), | |
89 | fName(name) | |
90 | { | |
91 | ||
92 | } | |
a2bf19ee | 93 | |
092d86a9 | 94 | Bool_t AliT0LookUpKey:: IsEqual(const TObject* obj) const |
a2bf19ee | 95 | { |
96 | Int_t k; | |
97 | // printf("IsEqual\n"); | |
98 | k=((AliT0LookUpKey*)obj)->GetKey(); | |
99 | if (k==fKey) return kTRUE; else return kFALSE; | |
100 | } |