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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
22 // Time Projection Chamber AliTPCClusterRow objects
23 // - clusters for given segment of TPC //
25 // Origin: Marian Ivanov , GSI Darmstadt
28 ///////////////////////////////////////////////////////////////////////////////
29 #include "AliTPCcluster.h"
31 #include "AliClusters.h"
32 #include "AliTPCClustersRow.h"
33 #include <TDirectory.h>
34 #include <TClonesArray.h>
37 const Int_t kDefSize = 1; //defalut size
40 ClassImp(AliTPCClustersRow)
43 //*****************************************************************************
45 //_____________________________________________________________________________
46 AliTPCClustersRow::AliTPCClustersRow()
53 //_____________________________________________________________________________
54 TObject *AliTPCClustersRow::InsertCluster(const TObject *c)
57 // Add a simulated cluster copy to the list
60 Error("AliClusters", "class type not specified");
63 if(!fClusters) fClusters=new TClonesArray(fClass->GetName(),1000);
64 TClonesArray &lclusters = *fClusters;
65 return new(lclusters[fNclusters++]) AliTPCcluster(*((AliTPCcluster*)c));
67 //__________________________________________________________________________
70 TObject *AliTPCClustersRow::Append(){
71 //create new object return pointer to this object
72 return fClusters->operator[](fClusters->GetEntriesFast());