]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0LookUpValue.cxx
reading timedelay for 0 channel before cycle
[u/mrichter/AliRoot.git] / T0 / AliT0LookUpValue.cxx
CommitLineData
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
17ClassImp(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/*
43printf("IsEqual %i %i\n %i %i\n %i %i\n %i %i\n \n",b->GetTRM(), fTRM,
44b->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}
52ULong_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}
a2bf19ee 58
59ClassImp(AliT0LookUpKey)
60
092d86a9 61 AliT0LookUpKey::AliT0LookUpKey():
62 TObject(),
63 fKey(0),
64 fName("")
a2bf19ee 65 {
66
67 }
68
092d86a9 69 AliT0LookUpKey::AliT0LookUpKey(Int_t key):
70 TObject(),
71 fKey(key),
72 fName("")
a2bf19ee 73 {
74
75 }
76
092d86a9 77 AliT0LookUpKey::AliT0LookUpKey(TString name):
78 TObject(),
79 fKey(),
80 fName(name)
81 {
82
83 }
a2bf19ee 84
092d86a9 85Bool_t AliT0LookUpKey:: IsEqual(const TObject* obj) const
a2bf19ee 86{
87 Int_t k;
88// printf("IsEqual\n");
89 k=((AliT0LookUpKey*)obj)->GetKey();
90 if (k==fKey) return kTRUE; else return kFALSE;
91}