]> git.uio.no Git - u/mrichter/AliRoot.git/blame - START/AliSTARTdigit.cxx
Compatibility with HP
[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 **************************************************************************/
ef0750c2 15
88cb7938 16/* $Id$ */
971579f6 17
e73d68f2 18#include <TArrayI.h>
971579f6 19#include "AliSTARTdigit.h"
ef0750c2 20#include <Riostream.h>
c345bb4f 21
971579f6 22ClassImp(AliSTARTdigit)
23
e73d68f2 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//-----------------------------------
38void 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//--------------------------------------------
50void 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//--------------------------------------------
62void 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//--------------------------------------------
72void 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//--------------------------------------------
82void 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//--------------------------------------------
92void 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//--------------------------------------------
102void 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//--------------------------------------------
115void 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//------------------------------------------------------
128void AliSTARTdigit::Print()
129{
130 printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n",
131 fTimeAverage, fTimeDiff);
132 cout<<" BestTimeRigh "<<fTimeBestRight<<
133 " TimeBestLeft "<<fTimeBestLeft<<endl;
134
135
971579f6 136
e73d68f2 137}