]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - START/AliSTARTdigit.cxx
Mods for Mac OS X
[u/mrichter/AliRoot.git] / START / AliSTARTdigit.cxx
index 72fc1477484299bf1327cb9f3c8c11d17ae61014..c2ef8c1d197699d9c9ce1f968303c3b659a3d742 100644 (file)
  * 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 <TArrayI.h>
 #include "AliSTARTdigit.h"
+#include <Riostream.h>
 
 ClassImp(AliSTARTdigit)
 
-AliSTARTdigit::AliSTARTdigit(Int_t Timeav, Int_t Timediff)
-  //:  AliDigit(tracks)
+//------------------------------------
+ AliSTARTdigit::AliSTARTdigit() : TObject()
+{
+  //ctor
+  fTimeAverage=9999;
+  fTimeBestRight=9999;
+  fTimeBestLeft=9999;
+  fSumADCRight=0;
+
+  fTime = new TArrayI(24);  
+  fADC  = new TArrayI(24);  
+}
+//-----------------------------------
+AliSTARTdigit::~AliSTARTdigit() {
+  // destructor
+  delete fTime;
+  delete fADC;
+}
+//-----------------------------------
+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;
+  //  Float_t fProcessKoef=1; // for pb 0.001
+  for (i=0; i<24; i++)
+    {
+      Int_t buf=(o.At(i));
+      fADC->AddAt(buf,i);
+    }
 }