get tables from the aliroot directory if they are not in the current one
[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$ */
0b73602e 17/////////////////////////////////////////////////////////////////////////
18// Class AliSTARTdigit for START digits
19// fTimeRight - right side TOF signal
20// fTimeLeft - left side TOF signal
21// fTimeBestRight - TOF first particle on the right side
22// TimeBestLeft - TOF first particle on the left side
23// fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. START signal
24// fTimeDiff = fTimeBestRight - TimeBestLeft
25//
26///////////////////////////////////////////////////////////////////////
971579f6 27
0b73602e 28
29
30
e73d68f2 31#include <TArrayI.h>
971579f6 32#include "AliSTARTdigit.h"
ef0750c2 33#include <Riostream.h>
c345bb4f 34
971579f6 35ClassImp(AliSTARTdigit)
36
e73d68f2 37//------------------------------------
38 AliSTARTdigit::AliSTARTdigit() : TObject()
39{
0b73602e 40 //ctor
e73d68f2 41 fTimeAverage=9999;
42 fTimeDiff=9999;
43 fTimeBestRight=9999;
44 fTimeBestLeft=9999;
45
46 fTimeRight = new TArrayI(12);
47 fTimeLeft = new TArrayI(12);
48 fADCRight = new TArrayI(12);
49 fADCLeft = new TArrayI(12);
50}
51//-----------------------------------
52void AliSTARTdigit::SetTimeRight (TArrayI &o)
53{
0b73602e 54 ////////////////////////////////////////
e73d68f2 55 fTimeRight = new TArrayI(12);
56
57 Int_t i;
58 for (i=0; i<12; i++)
59 {
60 Int_t buf=o.At(i);
61 fTimeRight->AddAt(buf,i);
62 }
63}
64//--------------------------------------------
65void AliSTARTdigit::SetTimeLeft (TArrayI &o)
66{
0b73602e 67 //
e73d68f2 68 fTimeLeft = new TArrayI(12);
69 Int_t i;
70 for (i=0; i<12; i++)
71 {
72 Int_t buf=o.At(i);
73 fTimeLeft->AddAt(buf,i);
74 }
75}
76//--------------------------------------------
77void AliSTARTdigit::GetTimeLeft (TArrayI &o)
78{
0b73602e 79 //
e73d68f2 80 Int_t i;
81 for (i=0; i<12; i++)
82 {
83 o[i]=fTimeLeft->At(i);
84 }
85}
86//--------------------------------------------
87void AliSTARTdigit::GetTimeRight (TArrayI &o)
88{
0b73602e 89 //
e73d68f2 90 Int_t i;
91 for (i=0; i<12; i++)
92 {
93 o[i]=fTimeRight->At(i);
94 }
95}
96//--------------------------------------------
97void AliSTARTdigit::GetADCLeft (TArrayI &o)
98{
0b73602e 99 //
e73d68f2 100 Int_t i;
101 for (i=0; i<12; i++)
102 {
103 o[i]=fADCLeft->At(i);
104 }
105}
106//--------------------------------------------
107void AliSTARTdigit::GetADCRight (TArrayI &o)
108{
0b73602e 109 //
e73d68f2 110 Int_t i;
111 for (i=0; i<12; i++)
112 {
113 o[i]=fADCRight->At(i);
114 }
115}
116//--------------------------------------------
117void AliSTARTdigit::SetADCLeft (TArrayI &o)
118{
0b73602e 119 //
e73d68f2 120 fADCLeft = new TArrayI(12);
121 Int_t i;
122 // Float_t fProcessKoef=1; // for pb 0.001
123 for (i=0; i<12; i++)
124 {
125 Int_t buf=(o.At(i));
126 fADCLeft->AddAt(buf,i);
127 }
128}
129//--------------------------------------------
130void AliSTARTdigit::SetADCRight (TArrayI &o)
131{
132
133 // Float_t fProcessKoef=1; // for pb 0.001
134 fADCRight = new TArrayI(12);
135 Int_t i;
136 for (i=0; i<12; i++)
137 {
138 Int_t buf=(o.At(i));
139 fADCRight->AddAt(buf,i);
140 }
141}
142//------------------------------------------------------
143void AliSTARTdigit::Print()
144{
0b73602e 145 //
e73d68f2 146 printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n",
147 fTimeAverage, fTimeDiff);
148 cout<<" BestTimeRigh "<<fTimeBestRight<<
149 " TimeBestLeft "<<fTimeBestLeft<<endl;
150
151
971579f6 152
e73d68f2 153}