* 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 //
// //
///////////////////////////////////////////////////////////////////////
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;
+ }
+
}