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