Ensure vacuum inside the beam pipe for upgrade (Mario)
[u/mrichter/AliRoot.git] / T0 / AliT0digit.cxx
CommitLineData
dc7ca31d 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// Class AliT0digit for T0 digits
c41ceaac 19// fTimeA - right side TOF signal
20// fTimeC - left side TOF signal
21// fTimeBestA - TOF first particle on the right side
22// TimeBestC - TOF first particle on the left side
23// fTimeAverage = (fTimeBestA + TimeBestC ) /2. T0 signal
24// fTimeDiff = fTimeBestA - TimeBestC
dc7ca31d 25//
26///////////////////////////////////////////////////////////////////////
27
28#include "AliT0digit.h"
29#include "TArrayI.h"
30
31ClassImp(AliT0digit)
32
33//-----------------------------------------------
c41ceaac 34 AliT0digit::AliT0digit() :TObject(),
35 fTimeCFD(new TArrayI(24)),
36 fQT0( new TArrayI(24)),
37 fTimeLED( new TArrayI(24)),
38 fQT1( new TArrayI(24)),
39 fTimeAverage(99999),
40 fTimeDiff(99999),
41 fBestTimeA(99999),
42 fBestTimeC (99999),
a9ab7568 43 fSumMult(0),
44 fRefPoint(0)
dc7ca31d 45
c41ceaac 46{
47 //
dc7ca31d 48}
49
c41ceaac 50//_____________________________________________________________________________
51
dc7ca31d 52AliT0digit::~AliT0digit() {
53 // destructor
c41ceaac 54 delete fTimeCFD;
55 delete fQT0;
56 delete fTimeLED;
57 delete fQT1;
dc7ca31d 58}
59//-----------------------------------
c41ceaac 60void AliT0digit::SetTimeCFD (TArrayI &o)
dc7ca31d 61{
62 ////////////////////////////////////////
69776907 63 if(fTimeCFD)delete fTimeCFD;
c41ceaac 64 fTimeCFD = new TArrayI(24);
dc7ca31d 65
66 Int_t i;
67 for (i=0; i<24; i++)
68 {
69 Int_t buf=o.At(i);
c41ceaac 70 fTimeCFD->AddAt(buf,i);
dc7ca31d 71 }
72}
73//--------------------------------------------
c41ceaac 74void AliT0digit::GetTimeCFD (TArrayI &o)
dc7ca31d 75{
76 //
77 Int_t i;
78 for (i=0; i<24; i++)
79 {
c41ceaac 80 o[i]=fTimeCFD->At(i);
dc7ca31d 81 }
82}
83//--------------------------------------------
c41ceaac 84void AliT0digit::GetQT0 (TArrayI &o)
dc7ca31d 85{
86 //
87 Int_t i;
88 for (i=0; i<24; i++)
89 {
c41ceaac 90 o[i]=fQT0->At(i);
dc7ca31d 91 }
92}
93//--------------------------------------------
c41ceaac 94void AliT0digit::SetQT0 (TArrayI &o)
dc7ca31d 95{
96 //
69776907 97 if(fQT0)delete fQT0;
c41ceaac 98 fQT0 = new TArrayI(24);
dc7ca31d 99 Int_t i;
100 for (i=0; i<24; i++)
101 {
102 Int_t buf=(o.At(i));
c41ceaac 103 fQT0->AddAt(buf,i);
dc7ca31d 104 }
105}
106//-----------------------------------
c41ceaac 107void AliT0digit::SetTimeLED (TArrayI &o)
dc7ca31d 108{
109 ////////////////////////////////////////
69776907 110 if(fTimeLED)delete fTimeLED;
c41ceaac 111 fTimeLED = new TArrayI(24);
dc7ca31d 112
113 Int_t i;
114 for (i=0; i<24; i++)
115 {
116 Int_t buf=o.At(i);
c41ceaac 117 fTimeLED->AddAt(buf,i);
dc7ca31d 118 }
119}
120//--------------------------------------------
c41ceaac 121void AliT0digit::GetTimeLED (TArrayI &o)
dc7ca31d 122{
123 //
124 Int_t i;
125 for (i=0; i<24; i++)
126 {
c41ceaac 127 o[i]=fTimeLED->At(i);
dc7ca31d 128 }
129}
130//--------------------------------------------
c41ceaac 131void AliT0digit::GetQT1 (TArrayI &o)
dc7ca31d 132{
133 //
134 Int_t i;
135 for (i=0; i<24; i++)
136 {
c41ceaac 137 o[i]=fQT1->At(i);
dc7ca31d 138 }
139}
140//--------------------------------------------
c41ceaac 141void AliT0digit::SetQT1 (TArrayI &o)
dc7ca31d 142{
143 //
69776907 144 if(fQT1)delete fQT1;
c41ceaac 145 fQT1 = new TArrayI(24);
dc7ca31d 146 Int_t i;
147 for (i=0; i<24; i++)
148 {
149 Int_t buf=(o.At(i));
c41ceaac 150 fQT1->AddAt(buf,i);
dc7ca31d 151 }
152}