]> git.uio.no Git - u/mrichter/AliRoot.git/blame - START/AliSTARTdigit.cxx
Temporary fix waiting for the real changes
[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;
e73d68f2 42 fTimeBestRight=9999;
43 fTimeBestLeft=9999;
7a18b6a5 44 fSumADCRight=0;
e73d68f2 45
a84dec01 46 fTime = new TArrayI(24);
47 fADC = new TArrayI(24);
e73d68f2 48}
49//-----------------------------------
7a18b6a5 50AliSTARTdigit::~AliSTARTdigit() {
51 // destructor
52 delete fTime;
53 delete fADC;
54}
55//-----------------------------------
a84dec01 56void AliSTARTdigit::SetTime (TArrayI &o)
e73d68f2 57{
0b73602e 58 ////////////////////////////////////////
a84dec01 59 fTime = new TArrayI(24);
e73d68f2 60
61 Int_t i;
a84dec01 62 for (i=0; i<24; i++)
e73d68f2 63 {
64 Int_t buf=o.At(i);
a84dec01 65 fTime->AddAt(buf,i);
e73d68f2 66 }
67}
68//--------------------------------------------
a84dec01 69void AliSTARTdigit::GetTime (TArrayI &o)
e73d68f2 70{
0b73602e 71 //
e73d68f2 72 Int_t i;
a84dec01 73 for (i=0; i<24; i++)
e73d68f2 74 {
a84dec01 75 o[i]=fTime->At(i);
e73d68f2 76 }
77}
78//--------------------------------------------
a84dec01 79void AliSTARTdigit::GetADC (TArrayI &o)
e73d68f2 80{
0b73602e 81 //
e73d68f2 82 Int_t i;
a84dec01 83 for (i=0; i<24; i++)
e73d68f2 84 {
a84dec01 85 o[i]=fADC->At(i);
e73d68f2 86 }
87}
88//--------------------------------------------
a84dec01 89void AliSTARTdigit::SetADC (TArrayI &o)
e73d68f2 90{
0b73602e 91 //
a84dec01 92 fADC = new TArrayI(24);
e73d68f2 93 Int_t i;
94 // Float_t fProcessKoef=1; // for pb 0.001
a84dec01 95 for (i=0; i<24; i++)
e73d68f2 96 {
97 Int_t buf=(o.At(i));
a84dec01 98 fADC->AddAt(buf,i);
e73d68f2 99 }
100}