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