1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 /// \class AliTPCClustersRow
19 /// \brief Time Projection Chamber AliTPCClusterRow objects
21 /// - clusters for given segment of TPC
23 /// \author Marian Ivanov , GSI Darmstadt
26 #include "AliClusters.h"
27 #include "AliTPCclusterMI.h"
28 #include "AliTPCClustersRow.h"
29 #include <TDirectory.h>
30 #include <TClonesArray.h>
33 const Int_t kDefSize = 1; ///< defalut size
37 ClassImp(AliTPCClustersRow)
41 //*****************************************************************************
43 //_____________________________________________________________________________
44 AliTPCClustersRow::AliTPCClustersRow()
51 //____________________________________________________________________________
52 AliTPCClustersRow::AliTPCClustersRow(const char *classname) : AliClusters(classname)
54 /// special constructor
59 //_____________________________________________________________________________
60 TObject *AliTPCClustersRow::InsertCluster(const TObject *c)
62 /// Add a simulated cluster copy to the list
65 Error("AliClusters", "class type not specified");
68 if(!fClusters) fClusters=new TClonesArray(fClass->GetName(),1000);
69 TClonesArray &lclusters = *fClusters;
70 return new(lclusters[fNclusters++]) AliTPCclusterMI(*((AliTPCclusterMI*)c));
72 //__________________________________________________________________________
75 TObject *AliTPCClustersRow::Append(){
76 /// create new object return pointer to this object
78 return fClusters->operator[](fClusters->GetEntriesFast());