]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDmatrix.cxx
Include the new TRD classes
[u/mrichter/AliRoot.git] / TRD / AliTRDmatrix.cxx
index b429bade5695c155801c0ee5d2be6a305776d632..22f95092b2bda2b2516cdbfb3cb6fbca55e36535 100644 (file)
@@ -1,3 +1,31 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/*
+$Log$
+Revision 1.3.4.1  2000/02/28 17:57:47  cblume
+GetTrack returns now -1 if no track is found
+
+Revision 1.3  1999/10/04 14:48:07  fca
+Avoid warnings on non-ansi compiler HP-UX CC
+
+Revision 1.2  1999/09/29 09:24:35  fca
+Introduction of the Copyright and cvs Log
+
+*/
+
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 //  Contains the pixel information for one TRD chamber                       //
@@ -77,7 +105,7 @@ void AliTRDmatrix::AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal
 }
 
 //_____________________________________________________________________________
-void AliTRDmatrix::Draw()
+void AliTRDmatrix::Draw(Option_t *)
 {
   //
   // Draws a 3D view of the detector matrix
@@ -118,6 +146,7 @@ void AliTRDmatrix::DrawRow(Int_t iRow)
   //
 
   if ((iRow < 0) || (iRow >= fRow)) {
+    printf("AliTRDmatrix::DrawRow -- ");
     printf("Index out of bounds (%d/%d)\n",iRow,fRow);
     return;
   }
@@ -153,6 +182,7 @@ void AliTRDmatrix::DrawCol(Int_t iCol)
   //
 
   if ((iCol < 0) || (iCol >= fCol)) {
+    printf("AliTRDmatrix::DrawCol -- ");
     printf("Index out of bounds (%d/%d)\n",iCol,fCol);
     return;
   }
@@ -188,6 +218,7 @@ void AliTRDmatrix::DrawTime(Int_t iTime)
   //
 
   if ((iTime < 0) || (iTime >= fTime)) {
+    printf("AliTRDmatrix::DrawTime -- ");
     printf("Index out of bounds (%d/%d)\n",iTime,fTime);
     return;
   }
@@ -246,7 +277,7 @@ Bool_t AliTRDmatrix::AddTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t track)
       trackSet = kTRUE;
       break;
     }
-    if (pixel->GetTrack(i) ==     0) {
+    if (pixel->GetTrack(i) ==    -1) {
       pixel->SetTrack(i,track);
       trackSet = kTRUE;
       break;
@@ -297,8 +328,9 @@ Int_t AliTRDmatrix::GetTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t iTrack)
   //
 
   if ((iTrack < 0) || (iTrack >= kTrackPixel)) {
-    printf("GetTrack: Index out of bounds (%d)\n",iTrack);
-    return 0;
+    printf("AliTRDmatrix::GetTrack -- ");
+    printf("Index out of bounds (%d)\n",iTrack);
+    return -1;
   }
 
   AliTRDpixel *pixel = GetPixel(iRow,iCol,iTime);
@@ -306,7 +338,7 @@ Int_t AliTRDmatrix::GetTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t iTrack)
     return (pixel->GetTrack(iTrack));
   }
   else {
-    return 0;
+    return -1;
   }
 
 }