Using common HLT track data format for TRD tracks (Theodor)
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDClusterizer.cxx
CommitLineData
dc2e6604 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// //
18// HLT TRD cluster finder //
19// //
20///////////////////////////////////////////////////////////////////////////////
21
22#include "AliHLTTRDClusterizer.h"
23#include "AliTRDgeometry.h"
24#include "AliTRDcluster.h"
25#include "AliTRDReconstructor.h"
26#include <TClonesArray.h>
27
18ada816 28ClassImp(AliHLTTRDClusterizer)
dc2e6604 29
30//_____________________________________________________________________________
31AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliTRDReconstructor *const rec)
32 :AliTRDclusterizer(rec)
33 , fMemBlock(NULL)
34{
35 //
36 // AliHLTTRDClusterizer default constructor
37 //
38}
39
40//_____________________________________________________________________________
41AliHLTTRDClusterizer::AliHLTTRDClusterizer(const Text_t *const name, const Text_t *const title, const AliTRDReconstructor *const rec)
42 : AliTRDclusterizer(name,title,rec)
43 , fMemBlock(NULL)
44{
45 //
46 // AliHLTTRDClusterizer constructor
47 //
48}
49
50//_____________________________________________________________________________
51AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c)
52 : AliTRDclusterizer(c)
53 , fMemBlock(NULL)
54{
55 //
56 // AliHLTTRDClusterizer copy constructor
57 //
58}
59
60//_____________________________________________________________________________
61AliHLTTRDClusterizer& AliHLTTRDClusterizer::operator=(const AliHLTTRDClusterizer& c)
62{
63 //
64 // Assignment operator
65 //
66
67 if(this!=&c)
68 c.Copy(*this);
69 return *this;
70}
71
72//_____________________________________________________________________________
73void AliHLTTRDClusterizer::Copy(TObject& c) const
74{
75 //
76 // Copy function
77 //
78
79 ((AliHLTTRDClusterizer&)c).fMemBlock = NULL;
80}
81
82//_____________________________________________________________________________
83void AliHLTTRDClusterizer::AddClusterToArray(AliTRDcluster *cluster)
84{
85 //
86 // Add a cluster to the array
87 //
88
89 AliHLTTRDCluster *ptr = &(((AliHLTTRDCluster*)GetMemBlock())[fNoOfClusters]);
90 new(ptr) AliHLTTRDCluster(cluster);
91}