]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/offline/AliHLTTPCOfflineCluster.cxx
The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / HLT / TPCLib / offline / AliHLTTPCOfflineCluster.cxx
CommitLineData
cdfe3c01 1// $Id$
2
3//**************************************************************************
4//* This file is property of and copyright by the ALICE HLT Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* *
7//* Primary Authors: Kalliopi Kanaki<Kalliopi.Kanaki@ift.uib.no> *
8//* for The ALICE HLT Project. *
9//* *
10//* Permission to use, copy, modify and distribute this software and its *
11//* documentation strictly for non-commercial purposes is hereby granted *
12//* without fee, provided that the above copyright notice appears in all *
13//* copies and that both the copyright notice and this permission notice *
14//* appear in the supporting documentation. The authors make no claims *
15//* about the suitability of this software for any purpose. It is *
16//* provided "as is" without express or implied warranty. *
17//**************************************************************************
18
19/** @file AliHLTTPCOfflineCluster.cxx
20 @author Kalliopi Kanaki
21 @date
22 @brief Cluster converter from offline to HLT format and back
23*/
24
25#include "AliHLTTPCOfflineCluster.h"
26#include "AliHLTTPCTransform.h"
27#include "TObjArray.h"
28#include <sys/time.h>
29
30#if __GNUC__ >= 3
31using namespace std;
32#endif
33
34ClassImp(AliHLTTPCOfflineCluster)
35
36AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster()
37{
38//constructor
39}
40
0e588049 41AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliHLTTPCSpacePointData& /*hltCluster*/){
cdfe3c01 42
43}
44
0e588049 45AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliTPCclusterMI& /*offCluster*/){
cdfe3c01 46
47}
48
0e588049 49AliHLTTPCOfflineCluster& AliHLTTPCOfflineCluster::operator=(const AliTPCclusterMI& /*offCluster*/){
598c3e82 50 return *this;
cdfe3c01 51}
52
53AliHLTTPCOfflineCluster::~AliHLTTPCOfflineCluster(){
54
55
56 //destructor
57}
58
59AliTPCclusterMI* AliHLTTPCOfflineCluster::ConvertHLTToOffline(AliHLTTPCSpacePointData spacePoint){
60
61 AliTPCclusterMI *offCluster = new AliTPCclusterMI();
62
63 offCluster->SetPad(spacePoint.fX); // pad
64 offCluster->SetRow((Int_t)spacePoint.fPadRow); // row
65 offCluster->SetTimeBin(spacePoint.fZ); // time bin
66 offCluster->SetQ(spacePoint.fCharge); // charge
a912b63b 67 offCluster->SetMax(spacePoint.fQMax); // max Q (amplitude)
3a3550fa 68 //offCluster->SetDetector(0); // detector/slice
69 //offCluster->SetType(0); // default from constructor
70 //offCluster->IsUsed(0); // default from constructor
71 //offCluster->SetInfo(NULL); // default from constructor
cdfe3c01 72
73 return offCluster;
cdfe3c01 74}
75
76
77AliHLTTPCSpacePointData AliHLTTPCOfflineCluster::ConvertOfflineToHLT(AliTPCclusterMI *offCluster){
78
79
80 AliHLTTPCSpacePointData spacePoint = { 0.,0.,0.,0,0,0.,0.,0,0,kFALSE,0 };
81
82 spacePoint.fX = offCluster->GetPad();
83 spacePoint.fPadRow = offCluster->GetRow();
84 spacePoint.fZ = offCluster->GetTimeBin();
0e588049 85 spacePoint.fCharge = (UInt_t)offCluster->GetQ();
a912b63b 86 spacePoint.fQMax = (UInt_t)offCluster->GetMax();
cdfe3c01 87
88 return spacePoint;
89
90}