]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDarrayI.cxx
Fix compiler warnings (Theodor)
[u/mrichter/AliRoot.git] / TRD / AliTRDarrayI.cxx
index 609e67144a8908ad1a5744c989dca0a091465fb5..605f6880ccb03d36273f3eb00a73520883ae8ea1 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
 
 ///////////////////////////////////////////////////////////////////////
-//   Added additional functionality  to original TArrayI             //
-//   multiple inheritance from TObject to be possible use automatic  //
-//   branch mechanism for tree                                       //
-//   function Expand to be possible expand array without deleting    //
-//   array contents                                                  //
+//                                                                   //  
+// Added additional functionality to the original TArrayI.           //
+//  - Multiple inheritance from TObject                              //
+//  - Function Expand() allows to expand the array without           //
+//    deleting the array contents                                    //
 //                                                                   //
-//  Origin:  Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk // 
+// Origin:  Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk  // 
 //                                                                   //  
 ///////////////////////////////////////////////////////////////////////
 
@@ -32,21 +30,57 @@ $Log$
 
 ClassImp(AliTRDarrayI)
 
+//_____________________________________________________________________________
+AliTRDarrayI::AliTRDarrayI():TArrayI()
+{
+  //
+  // Default constructor
+  //
+
+}
+
+//_____________________________________________________________________________
 AliTRDarrayI::~AliTRDarrayI()
 {
   //
-  //default destructor
+  // Default destructor
+  //
+
 }
 
+//_____________________________________________________________________________
+void AliTRDarrayI::Copy(TObject &a) const
+{
+  //
+  // Copy function
+  //
+
+  TObject::Copy(a);
+  TArrayI::Copy(((TArrayI &) a));
+
+}
+
+//_____________________________________________________________________________
 void AliTRDarrayI::Expand(Int_t n)
 {
   //
-  // Set array size of TArrayI object to n integers and copy old array
-  // If n<0 leave array unchanged.
-  // user are responsible for appopiate size of array
+  // Sets the  array size of the TArrayI object to <n> integers and copies
+  // the old array.
+  // If n < 0 leave the array unchanged.
+  // The user is responsible for the appropriate size of the array.
   //
-  if (n < 0) return;  
-  fArray = (Int_t*)  TStorage::ReAlloc(fArray, n * sizeof(Int_t),fN * sizeof(Int_t));
-  if (fArray!=0) fN= n; 
+
+  if (n < 0) {
+    return;  
+  }
+
+  fArray = (Int_t *) TStorage::ReAlloc(fArray
+                                      ,n *sizeof(Int_t)
+                                      ,fN*sizeof(Int_t));
+
+  if (fArray != 0) {
+    fN = n;
+  }
 }