]> git.uio.no Git - u/mrichter/AliRoot.git/blob - START/AliSTARTdigit.cxx
Updated a bit with:
[u/mrichter/AliRoot.git] / START / AliSTARTdigit.cxx
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 /*
16 $Log$
17 Revision 1.6  2002/10/14 14:57:32  hristov
18 Merging the VirtualMC branch to the main development branch (HEAD)
19
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
26 Revision 1.4  2000/10/13 13:14:08  hristov
27 Bug fixes and code cleaning
28
29 Revision 1.3  2000/07/13 16:41:29  fca
30 New START corrected for coding conventions
31
32 Revision 1.2  2000/03/24 17:40:35  alla
33 New AliSTART
34
35 */ 
36
37 #include <TArrayI.h>
38 #include "AliSTARTdigit.h"
39 #include <Riostream.h>
40
41 ClassImp(AliSTARTdigit)
42
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
155
156 }