]>
Commit | Line | Data |
---|---|---|
cc80f89e | 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 | **************************************************************************/ | |
7665dff6 | 15 | |
88cb7938 | 16 | /* $Id$ */ |
cc80f89e | 17 | |
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // // | |
20 | // Time Projection Chamber AliTPCClusterRow objects | |
21 | // - clusters for given segment of TPC // | |
22 | // | |
23 | // Origin: Marian Ivanov , GSI Darmstadt | |
24 | // // | |
25 | // // | |
26 | /////////////////////////////////////////////////////////////////////////////// | |
73042f01 | 27 | #include "AliTPCcluster.h" |
28 | #include <TClass.h> | |
cc80f89e | 29 | #include "AliClusters.h" |
30 | #include "AliTPCClustersRow.h" | |
c3c63118 | 31 | #include <TDirectory.h> |
32 | #include <TClonesArray.h> | |
cc80f89e | 33 | |
34 | ||
35 | const Int_t kDefSize = 1; //defalut size | |
36 | ||
37 | ||
38 | ClassImp(AliTPCClustersRow) | |
39 | ||
40 | ||
41 | //***************************************************************************** | |
42 | // | |
43 | //_____________________________________________________________________________ | |
44 | AliTPCClustersRow::AliTPCClustersRow() | |
45 | { | |
46 | // | |
47 | //default constructor | |
48 | fNclusters=0; | |
49 | } | |
50 | ||
51 | //_____________________________________________________________________________ | |
73042f01 | 52 | TObject *AliTPCClustersRow::InsertCluster(const TObject *c) |
53 | { | |
54 | // | |
55 | // Add a simulated cluster copy to the list | |
56 | // | |
57 | if (fClass==0) { | |
58 | Error("AliClusters", "class type not specified"); | |
59 | return 0; | |
60 | } | |
61 | if(!fClusters) fClusters=new TClonesArray(fClass->GetName(),1000); | |
62 | TClonesArray &lclusters = *fClusters; | |
63 | return new(lclusters[fNclusters++]) AliTPCcluster(*((AliTPCcluster*)c)); | |
64 | } | |
7665dff6 | 65 | //__________________________________________________________________________ |
73042f01 | 66 | |
cc80f89e | 67 | |
7665dff6 | 68 | TObject *AliTPCClustersRow::Append(){ |
69 | //create new object return pointer to this object | |
70 | return fClusters->operator[](fClusters->GetEntriesFast()); | |
71 | } | |
72 |