* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.2 2000/03/24 17:40:35 alla
-New AliSTART
-*/
-#include <iostream.h>
-#include <fstream.h>
+/* $Id$ */
+/////////////////////////////////////////////////////////////////////////
+// Class AliSTARTdigit for START digits
+// fTimeRight - right side TOF signal
+// fTimeLeft - left side TOF signal
+// fTimeBestRight - TOF first particle on the right side
+// TimeBestLeft - TOF first particle on the left side
+// fTimeAverage = (fTimeBestRight + TimeBestLeft ) /2. START signal
+// fTimeDiff = fTimeBestRight - TimeBestLeft
+//
+///////////////////////////////////////////////////////////////////////
-#include "AliRun.h"
-#include "AliSTART.h"
#include "AliSTARTdigit.h"
+#include "TArrayI.h"
ClassImp(AliSTARTdigit)
-AliSTARTdigit::AliSTARTdigit(Int_t Timeav, Int_t Timediff)
- //: AliDigit(tracks)
+//-----------------------------------------------
+ AliSTARTdigit::AliSTARTdigit() :TObject()
+{
+
+ fTimeAverage = 99999;
+ fTimeDiff = 99999;
+ fBestTimeRight = 99999;
+ fBestTimeLeft = 99999;
+
+ fTime = new TArrayI(24);
+ fADC = new TArrayI(24);
+ fTimeAmp = new TArrayI(24);
+ fADCAmp = new TArrayI(24);
+}
+
+//-----------------------------------
+AliSTARTdigit::~AliSTARTdigit() {
+ // destructor
+ delete fTime;
+ delete fADC;
+ delete fTimeAmp;
+ delete fADCAmp;
+}
+//-----------------------------------
+void AliSTARTdigit::SetTime (TArrayI &o)
+{
+ ////////////////////////////////////////
+ fTime = new TArrayI(24);
+
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ Int_t buf=o.At(i);
+ fTime->AddAt(buf,i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::GetTime (TArrayI &o)
{
//
- // Create START digit
- // The creator for the AliSTARTdigit class. This routine fills the
- // AliSTARTdigit data members from the array digits. The array of track
- // numbers are passed to the AliDigit creator. The order of the elements
- // in the digits array are fEvent = digits[0], fAmplitude = digits[1],
- // fTimeAverage = digits[1], fTimeDiff = digits[1], and fDet = digits[4].
- // Therefore the array digits is expected to be at least 5 elements long.
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ o[i]=fTime->At(i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::GetADC (TArrayI &o)
+{
//
- Timeav = fTimeAverage;
- Timediff = fTimeDiff;
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ o[i]=fADC->At(i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::SetADC (TArrayI &o)
+{
+ //
+ fADC = new TArrayI(24);
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ Int_t buf=(o.At(i));
+ fADC->AddAt(buf,i);
+ }
+}
+//-----------------------------------
+void AliSTARTdigit::SetTimeAmp (TArrayI &o)
+{
+ ////////////////////////////////////////
+ fTimeAmp = new TArrayI(24);
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ Int_t buf=o.At(i);
+ fTimeAmp->AddAt(buf,i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::GetTimeAmp (TArrayI &o)
+{
+ //
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ o[i]=fTimeAmp->At(i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::GetADCAmp (TArrayI &o)
+{
+ //
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ o[i]=fADCAmp->At(i);
+ }
+}
+//--------------------------------------------
+void AliSTARTdigit::SetADCAmp (TArrayI &o)
+{
+ //
+ fADCAmp = new TArrayI(24);
+ Int_t i;
+ for (i=0; i<24; i++)
+ {
+ Int_t buf=(o.At(i));
+ fADCAmp->AddAt(buf,i);
+ }
}