]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - START/AliSTARTdigit.cxx
preprocessor made by Tomasz and fully his responsibility
[u/mrichter/AliRoot.git] / START / AliSTARTdigit.cxx
index f8a9da6ce7aa14f137993354c926241ece0f044a..4051a0a8750c3544894fde53ca60142755549ba6 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/*
-$Log$
-Revision 1.3  2000/07/13 16:41:29  fca
-New START corrected for coding conventions
 
-Revision 1.2  2000/03/24 17:40:35  alla
-New AliSTART
-
-*/ 
+/* $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 "AliSTARTdigit.h"
+#include "TArrayI.h"
 
 ClassImp(AliSTARTdigit)
 
+//-----------------------------------------------
+  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)
+{
+  //
+  Int_t i;
+  for (i=0; i<24; i++)
+    {
+      o[i]=fTime->At(i);
+    }
+}
+//--------------------------------------------
+void AliSTARTdigit::GetADC (TArrayI &o)
+{
+  //
+  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);
+    }
+}