]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsegmentArray.cxx
Remove the last print statements
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArray.cxx
index 5be1a3acfa7a7e2e0054bd2dc77acbbebfb0325e..b94a020acd1bc6d777ba3da16b6edc05dddcbca2 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.8  2001/11/14 10:50:46  cblume
-Changes in digits IO. Add merging of summable digits
+/* $Id$ */
 
-Revision 1.7  2001/03/13 09:30:35  cblume
-Update of digitization. Moved digit branch definition to AliTRD
-
-Revision 1.6  2000/11/01 14:53:21  cblume
-Merge with TRD-develop
-
-Revision 1.1.4.3  2000/10/06 16:49:46  cblume
-Made Getters const
-
-Revision 1.1.4.2  2000/10/04 16:34:58  cblume
-Replace include files by forward declarations
-
-Revision 1.5  2000/10/02 21:28:19  fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.4  2000/06/27 13:08:50  cblume
-Changed to Copy(TObject &A) to appease the HP-compiler
-
-Revision 1.3  2000/06/08 18:32:58  cblume
-Make code compliant to coding conventions
-
-Revision 1.2  2000/05/08 16:17:27  cblume
-Merge TRD-develop
-
-Revision 1.1.4.1  2000/05/08 14:55:03  cblume
-Bug fixes
-
-Revision 1.1  2000/02/28 19:02:32  cblume
-Add new TRD classes
-
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-//                                                                           //
-//  Alice segment manager class                                              //
-//                                                                           //
-///////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  Alice segment manager class                                           //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
 
 #include <TTree.h>
 
 #include "AliRun.h"
 
-#include "AliTRD.h"
 #include "AliTRDgeometry.h"
 #include "AliTRDsegmentArray.h"
 #include "AliTRDdataArray.h"
@@ -68,7 +32,8 @@ Add new TRD classes
 ClassImp(AliTRDsegmentArray)
 
 //_____________________________________________________________________________
-AliTRDsegmentArray::AliTRDsegmentArray():AliTRDsegmentArrayBase()
+AliTRDsegmentArray::AliTRDsegmentArray()
+  :AliTRDsegmentArrayBase()
 {
   //
   // Default constructor
@@ -77,8 +42,8 @@ AliTRDsegmentArray::AliTRDsegmentArray():AliTRDsegmentArrayBase()
 }
 
 //_____________________________________________________________________________
-AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
-                   :AliTRDsegmentArrayBase(classname,n)
+AliTRDsegmentArray::AliTRDsegmentArray(const char *classname, Int_t n)
+  :AliTRDsegmentArrayBase(classname,n)
 {
   //
   // Constructor creating an array of AliTRDdataArray of size <n>
@@ -94,6 +59,7 @@ AliTRDsegmentArray::AliTRDsegmentArray(Text_t *classname, Int_t n)
 
 //_____________________________________________________________________________
 AliTRDsegmentArray::AliTRDsegmentArray(AliTRDsegmentArray &a)
+  :AliTRDsegmentArrayBase(a)
 {
   //
   // AliTRDsegmentArray copy constructor
@@ -115,7 +81,7 @@ AliTRDsegmentArray::~AliTRDsegmentArray()
 }
 
 //_____________________________________________________________________________
-void AliTRDsegmentArray::Copy(TObject &a)
+void AliTRDsegmentArray::Copy(TObject &a) const
 {
   //
   // Copy function
@@ -150,15 +116,18 @@ Bool_t AliTRDsegmentArray::LoadArray(const Char_t *branchname, TTree *tree)
 
   // Connect the digits tree as default
   if (!fTree) {
-    printf("AliTRDsegmentArray::LoadArray -- ");
-    printf("Use default TreeD\n");
+    AliWarning("Use default TreeD\n");
     fTree = gAlice->TreeD();
-    if (!fTree) return kFALSE;
+    if (!fTree) {
+      return kFALSE;
+    }
   }
 
   // Get the branch
   fBranch = fTree->GetBranch(branchname);
-  if (!fBranch) return kFALSE;
+  if (!fBranch) {
+    return kFALSE;
+  }
 
   // Loop through all segments and read them from the tree
   Bool_t status = kTRUE;
@@ -188,15 +157,18 @@ Bool_t AliTRDsegmentArray::StoreArray(const Char_t *branchname, TTree *tree)
 
   // Connect the digits tree as default
   if (!fTree) {
-    printf("AliTRDsegmentArray::StoreArray -- ");
-    printf("Use default TreeD\n");
+    AliWarning("Use default TreeD\n");
     fTree = gAlice->TreeD();
-    if (!fTree) return kFALSE;
+    if (!fTree) {
+      return kFALSE;
+    }
   }
 
   // Get the branch
   fBranch = fTree->GetBranch(branchname);
-  if (!fBranch) return kFALSE;
+  if (!fBranch) {
+    return kFALSE;
+  }
 
   // Loop through all segments and fill them into the tree
   Bool_t status = kTRUE;
@@ -228,7 +200,8 @@ AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t det) const
 
 //_____________________________________________________________________________
 AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla
-                                                , Int_t cha, Int_t sec) const
+                                                , Int_t cha
+                                                , Int_t sec) const
 {
   //
   // Returns the data array for a given detector
@@ -236,15 +209,14 @@ AliTRDdataArray *AliTRDsegmentArray::GetDataArray(Int_t pla
 
   if (gAlice) {
 
-    AliTRDgeometry *geo = ((AliTRD*) gAlice->GetDetector("TRD"))->GetGeometry();  
+    AliTRDgeometry *geo = AliTRDgeometry::GetGeometry(gAlice->GetRunLoader());  
     Int_t det = geo->GetDetector(pla,cha,sec);
     return GetDataArray(det);
 
   }
   else {
 
-    printf("AliTRDsegmentArray::GetDigits -- ");
-    printf("gAlice is not defined\n");
+    AliError("gAlice is not defined\n");
     return NULL;
 
   }