]> git.uio.no Git - u/mrichter/AliRoot.git/blob - START/AliSTARTdigit.cxx
Log replaced by Id
[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 /* $Id$ */
17
18 #include <TArrayI.h>
19 #include "AliSTARTdigit.h"
20 #include <Riostream.h>
21
22 ClassImp(AliSTARTdigit)
23
24 //------------------------------------
25  AliSTARTdigit::AliSTARTdigit() : TObject()
26 {
27   fTimeAverage=9999;
28   fTimeDiff=9999;
29   fTimeBestRight=9999;
30   fTimeBestLeft=9999;
31
32   fTimeRight = new TArrayI(12);  
33   fTimeLeft  = new TArrayI(12);  
34   fADCRight = new TArrayI(12);  
35   fADCLeft  = new TArrayI(12);  
36 }
37 //-----------------------------------
38 void AliSTARTdigit::SetTimeRight (TArrayI &o)
39 {
40   fTimeRight = new TArrayI(12);  
41
42   Int_t i;
43   for (i=0; i<12; i++)
44     {
45       Int_t buf=o.At(i);
46       fTimeRight->AddAt(buf,i);
47     }
48 }
49 //--------------------------------------------
50 void AliSTARTdigit::SetTimeLeft (TArrayI &o)
51 {
52
53   fTimeLeft  = new TArrayI(12);  
54   Int_t i;
55   for (i=0; i<12; i++)
56     {
57       Int_t buf=o.At(i);
58       fTimeLeft->AddAt(buf,i);
59     }
60 }
61 //--------------------------------------------
62 void AliSTARTdigit::GetTimeLeft (TArrayI &o)
63 {
64
65   Int_t i;
66   for (i=0; i<12; i++)
67     {
68       o[i]=fTimeLeft->At(i);
69     }
70 }
71 //--------------------------------------------
72 void AliSTARTdigit::GetTimeRight (TArrayI &o)
73 {
74
75   Int_t i;
76   for (i=0; i<12; i++)
77     {
78       o[i]=fTimeRight->At(i);
79     }
80 }
81 //--------------------------------------------
82 void AliSTARTdigit::GetADCLeft (TArrayI &o)
83 {
84
85   Int_t i;
86   for (i=0; i<12; i++)
87     {
88       o[i]=fADCLeft->At(i);
89     }
90 }
91 //--------------------------------------------
92 void AliSTARTdigit::GetADCRight (TArrayI &o)
93 {
94
95  Int_t i;
96   for (i=0; i<12; i++)
97     {
98       o[i]=fADCRight->At(i);
99     }
100 }
101 //--------------------------------------------
102 void AliSTARTdigit::SetADCLeft (TArrayI &o)
103 {
104
105   fADCLeft  = new TArrayI(12);  
106   Int_t i;
107   //  Float_t fProcessKoef=1; // for pb 0.001
108   for (i=0; i<12; i++)
109     {
110       Int_t buf=(o.At(i));
111       fADCLeft->AddAt(buf,i);
112     }
113 }
114 //--------------------------------------------
115 void AliSTARTdigit::SetADCRight (TArrayI &o)
116 {
117
118   //  Float_t fProcessKoef=1; // for pb 0.001
119   fADCRight  = new TArrayI(12);  
120   Int_t i;
121   for (i=0; i<12; i++)
122     {
123       Int_t buf=(o.At(i));
124       fADCRight->AddAt(buf,i);
125     }
126 }
127 //------------------------------------------------------
128 void AliSTARTdigit::Print()
129 {
130   printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n",
131          fTimeAverage, fTimeDiff);
132   cout<<" BestTimeRigh "<<fTimeBestRight<<
133     " TimeBestLeft "<<fTimeBestLeft<<endl;
134
135
136
137 }