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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // HLT TRD cluster finder //
20 ///////////////////////////////////////////////////////////////////////////////
22 #include "AliHLTTRDClusterizer.h"
23 #include "AliTRDgeometry.h"
24 #include "AliTRDcluster.h"
25 #include "AliTRDReconstructor.h"
26 #include <TClonesArray.h>
28 ClassImp(AliHLTTRDClusterizer)
30 //_____________________________________________________________________________
31 AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliTRDReconstructor *const rec)
32 :AliTRDclusterizer(rec)
38 // AliHLTTRDClusterizer default constructor
42 //_____________________________________________________________________________
43 AliHLTTRDClusterizer::AliHLTTRDClusterizer(const Text_t *const name, const Text_t *const title, const AliTRDReconstructor *const rec)
44 : AliTRDclusterizer(name,title,rec)
50 // AliHLTTRDClusterizer constructor
54 //_____________________________________________________________________________
55 AliHLTTRDClusterizer::AliHLTTRDClusterizer(const AliHLTTRDClusterizer& c)
56 : AliTRDclusterizer(c)
62 // AliHLTTRDClusterizer copy constructor
66 //_____________________________________________________________________________
67 AliHLTTRDClusterizer& AliHLTTRDClusterizer::operator=(const AliHLTTRDClusterizer& c)
70 // Assignment operator
78 //_____________________________________________________________________________
79 void AliHLTTRDClusterizer::Copy(TObject& c) const
85 ((AliHLTTRDClusterizer&)c).fClMemBlock = NULL;
86 ((AliHLTTRDClusterizer&)c).fTrMemBlock = NULL;
87 ((AliHLTTRDClusterizer&)c).fTrMemCurrPtr = NULL;
90 //_____________________________________________________________________________
91 void AliHLTTRDClusterizer::AddClusterToArray(AliTRDcluster *cluster)
94 // Add a cluster to the array
97 AliHLTTRDCluster *ptr = &(((AliHLTTRDCluster*)GetClMemBlock())[fNoOfClusters]);
98 new(ptr) AliHLTTRDCluster(cluster);
101 //_____________________________________________________________________________
102 void AliHLTTRDClusterizer::AddTrackletsToArray()
105 // Add the online tracklets of this chamber to the array
108 // memcpy(&(((UInt_t*)GetTrMemBlock())[fNoOfTracklets]),fTrackletContainer[0],256*sizeof(UInt_t));
109 // memcpy(&(((UInt_t*)GetTrMemBlock())[fNoOfTracklets+256]),fTrackletContainer[1],256*sizeof(UInt_t));
111 // fNoOfTracklets += 512;
113 UInt_t* trackletword;
114 AliHLTTRDTrackletWordArray* trklArr = new(fTrMemCurrPtr) AliHLTTRDTrackletWordArray(fDet);
115 fTrMemCurrPtr += sizeof(AliHLTTRDTrackletWordArray);
116 for(Int_t side=0; side<2; side++)
119 trackletword=fTrackletContainer[side];
120 while(trackletword[trkl]>0){
123 memcpy(fTrMemCurrPtr,fTrackletContainer[side],trkl*sizeof(UInt_t));
124 fTrMemCurrPtr += trkl*sizeof(UInt_t);
125 trklArr->fCount += trkl;
128 // fTrackletContainer[0]+=256;
129 // fTrackletContainer[1]+=256;
130 // fNoOfTracklets += 512;