]>
Commit | Line | Data |
---|---|---|
971579f6 | 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 | **************************************************************************/ | |
971579f6 | 15 | /* |
16 | $Log$ | |
ef0750c2 | 17 | Revision 1.6 2002/10/14 14:57:32 hristov |
18 | Merging the VirtualMC branch to the main development branch (HEAD) | |
19 | ||
b9d0a01d | 20 | Revision 1.4.12.1 2002/07/24 09:50:10 alibrary |
21 | Updating VirtualMC | |
22 | ||
23 | Revision 1.5 2002/07/23 11:48:05 alla | |
24 | new Digits structure | |
25 | ||
e73d68f2 | 26 | Revision 1.4 2000/10/13 13:14:08 hristov |
27 | Bug fixes and code cleaning | |
28 | ||
528332ba | 29 | Revision 1.3 2000/07/13 16:41:29 fca |
30 | New START corrected for coding conventions | |
31 | ||
ef51244a | 32 | Revision 1.2 2000/03/24 17:40:35 alla |
33 | New AliSTART | |
34 | ||
971579f6 | 35 | */ |
36 | ||
e73d68f2 | 37 | #include <TArrayI.h> |
971579f6 | 38 | #include "AliSTARTdigit.h" |
ef0750c2 | 39 | #include <Riostream.h> |
c345bb4f | 40 | |
971579f6 | 41 | ClassImp(AliSTARTdigit) |
42 | ||
e73d68f2 | 43 | //------------------------------------ |
44 | AliSTARTdigit::AliSTARTdigit() : TObject() | |
45 | { | |
46 | fTimeAverage=9999; | |
47 | fTimeDiff=9999; | |
48 | fTimeBestRight=9999; | |
49 | fTimeBestLeft=9999; | |
50 | ||
51 | fTimeRight = new TArrayI(12); | |
52 | fTimeLeft = new TArrayI(12); | |
53 | fADCRight = new TArrayI(12); | |
54 | fADCLeft = new TArrayI(12); | |
55 | } | |
56 | //----------------------------------- | |
57 | void AliSTARTdigit::SetTimeRight (TArrayI &o) | |
58 | { | |
59 | fTimeRight = new TArrayI(12); | |
60 | ||
61 | Int_t i; | |
62 | for (i=0; i<12; i++) | |
63 | { | |
64 | Int_t buf=o.At(i); | |
65 | fTimeRight->AddAt(buf,i); | |
66 | } | |
67 | } | |
68 | //-------------------------------------------- | |
69 | void AliSTARTdigit::SetTimeLeft (TArrayI &o) | |
70 | { | |
71 | ||
72 | fTimeLeft = new TArrayI(12); | |
73 | Int_t i; | |
74 | for (i=0; i<12; i++) | |
75 | { | |
76 | Int_t buf=o.At(i); | |
77 | fTimeLeft->AddAt(buf,i); | |
78 | } | |
79 | } | |
80 | //-------------------------------------------- | |
81 | void AliSTARTdigit::GetTimeLeft (TArrayI &o) | |
82 | { | |
83 | ||
84 | Int_t i; | |
85 | for (i=0; i<12; i++) | |
86 | { | |
87 | o[i]=fTimeLeft->At(i); | |
88 | } | |
89 | } | |
90 | //-------------------------------------------- | |
91 | void AliSTARTdigit::GetTimeRight (TArrayI &o) | |
92 | { | |
93 | ||
94 | Int_t i; | |
95 | for (i=0; i<12; i++) | |
96 | { | |
97 | o[i]=fTimeRight->At(i); | |
98 | } | |
99 | } | |
100 | //-------------------------------------------- | |
101 | void AliSTARTdigit::GetADCLeft (TArrayI &o) | |
102 | { | |
103 | ||
104 | Int_t i; | |
105 | for (i=0; i<12; i++) | |
106 | { | |
107 | o[i]=fADCLeft->At(i); | |
108 | } | |
109 | } | |
110 | //-------------------------------------------- | |
111 | void AliSTARTdigit::GetADCRight (TArrayI &o) | |
112 | { | |
113 | ||
114 | Int_t i; | |
115 | for (i=0; i<12; i++) | |
116 | { | |
117 | o[i]=fADCRight->At(i); | |
118 | } | |
119 | } | |
120 | //-------------------------------------------- | |
121 | void AliSTARTdigit::SetADCLeft (TArrayI &o) | |
122 | { | |
123 | ||
124 | fADCLeft = new TArrayI(12); | |
125 | Int_t i; | |
126 | // Float_t fProcessKoef=1; // for pb 0.001 | |
127 | for (i=0; i<12; i++) | |
128 | { | |
129 | Int_t buf=(o.At(i)); | |
130 | fADCLeft->AddAt(buf,i); | |
131 | } | |
132 | } | |
133 | //-------------------------------------------- | |
134 | void AliSTARTdigit::SetADCRight (TArrayI &o) | |
135 | { | |
136 | ||
137 | // Float_t fProcessKoef=1; // for pb 0.001 | |
138 | fADCRight = new TArrayI(12); | |
139 | Int_t i; | |
140 | for (i=0; i<12; i++) | |
141 | { | |
142 | Int_t buf=(o.At(i)); | |
143 | fADCRight->AddAt(buf,i); | |
144 | } | |
145 | } | |
146 | //------------------------------------------------------ | |
147 | void AliSTARTdigit::Print() | |
148 | { | |
149 | printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n", | |
150 | fTimeAverage, fTimeDiff); | |
151 | cout<<" BestTimeRigh "<<fTimeBestRight<< | |
152 | " TimeBestLeft "<<fTimeBestLeft<<endl; | |
153 | ||
154 | ||
971579f6 | 155 | |
e73d68f2 | 156 | } |