Change AliTRDdataArrayI to AliTRDdataArray in MakeBranch()
[u/mrichter/AliRoot.git] / TRD / AliTRDarrayI.cxx
CommitLineData
f7336fa3 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
793ff80c 18
19Revision 1.1.4.3 2000/10/06 16:49:46 cblume
20Made Getters const
21
22Revision 1.1.4.2 2000/10/04 16:34:58 cblume
23Replace include files by forward declarations
24
25Revision 1.4 2000/06/09 11:10:07 cblume
26Compiler warnings and coding conventions, next round
27
28Revision 1.3 2000/06/08 18:32:58 cblume
29Make code compliant to coding conventions
30
31Revision 1.2 2000/05/08 16:17:27 cblume
32Merge TRD-develop
33
34Revision 1.1.4.1 2000/05/08 14:35:54 cblume
35Update
36
37Revision 1.4 2000/06/09 11:10:07 cblume
38Compiler warnings and coding conventions, next round
39
dd9a6ee3 40Revision 1.3 2000/06/08 18:32:58 cblume
41Make code compliant to coding conventions
42
8230f242 43Revision 1.2 2000/05/08 16:17:27 cblume
44Merge TRD-develop
45
6f1e466d 46Revision 1.1.4.1 2000/05/08 14:35:54 cblume
47Update
48
49Revision 1.1 2000/02/28 18:57:18 cblume
50Add new TRD classes
51
f7336fa3 52*/
53
54///////////////////////////////////////////////////////////////////////
6f1e466d 55// //
56// Added additional functionality to the original TArrayI. //
57// - Multiple inheritance from TObject //
58// - Function Expand() allows to expand the array without //
59// deleting the array contents //
f7336fa3 60// //
6f1e466d 61// Origin: Marian Ivanov, Uni. of Bratislava, ivanov@fmph.uniba.sk //
f7336fa3 62// //
63///////////////////////////////////////////////////////////////////////
64
65#include "AliTRDarrayI.h"
66
67ClassImp(AliTRDarrayI)
68
6f1e466d 69//_____________________________________________________________________________
f7336fa3 70AliTRDarrayI::~AliTRDarrayI()
71{
72 //
6f1e466d 73 // Default destructor
74 //
75
f7336fa3 76}
77
6f1e466d 78//_____________________________________________________________________________
dd9a6ee3 79void AliTRDarrayI::Copy(TObject &a)
8230f242 80{
81 //
82 // Copy function
83 //
84
85 TObject::Copy(a);
dd9a6ee3 86 TArrayI::Copy(((TArrayI &) a));
8230f242 87
88}
89
8230f242 90//_____________________________________________________________________________
f7336fa3 91void AliTRDarrayI::Expand(Int_t n)
92{
93 //
6f1e466d 94 // Sets the array size of the TArrayI object to <n> integers and copies
95 // the old array.
96 // If n < 0 leave the array unchanged.
97 // The user is responsible for the appropriate size of the array.
f7336fa3 98 //
6f1e466d 99
f7336fa3 100 if (n < 0) return;
6f1e466d 101 fArray = (Int_t*) TStorage::ReAlloc(fArray
102 ,n * sizeof(Int_t)
103 ,fN * sizeof(Int_t));
104 if (fArray != 0) fN = n;
105
f7336fa3 106}
107