]> 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 f8a9da6ce7aa14f137993354c926241ece0f044a..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.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 <TArrayI.h>
 #include "AliSTARTdigit.h"
+#include <Riostream.h>
 
 ClassImp(AliSTARTdigit)
 
+//------------------------------------
+ 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)
+{
+  //
+  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;
+  //  Float_t fProcessKoef=1; // for pb 0.001
+  for (i=0; i<24; i++)
+    {
+      Int_t buf=(o.At(i));
+      fADC->AddAt(buf,i);
+    }
+}