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