LCOV - code coverage report
Current view: top level - HLT/TPCLib/offline - AliHLTTPCOfflineCluster.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 32 3.1 %
Date: 2016-06-14 17:26:59 Functions: 1 13 7.7 %

          Line data    Source code
       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 "TObjArray.h"
      27             : #include <sys/time.h>
      28             : 
      29             : #if __GNUC__ >= 3
      30             : using namespace std;
      31             : #endif
      32             : 
      33           6 : ClassImp(AliHLTTPCOfflineCluster)
      34             : 
      35           0 : AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster()
      36           0 : {
      37             : //constructor  
      38           0 : }
      39             : 
      40           0 : AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliHLTTPCSpacePointData& /*hltCluster*/){
      41             :   
      42           0 : }
      43             : 
      44           0 : AliHLTTPCOfflineCluster::AliHLTTPCOfflineCluster(const AliTPCclusterMI& /*offCluster*/){
      45             :  
      46           0 : }
      47             : 
      48             : AliHLTTPCOfflineCluster& AliHLTTPCOfflineCluster::operator=(const AliTPCclusterMI& /*offCluster*/){
      49           0 :   return *this;
      50             : }
      51             : 
      52           0 : AliHLTTPCOfflineCluster::~AliHLTTPCOfflineCluster(){
      53             : 
      54             : 
      55             :   //destructor  
      56           0 : }
      57             : 
      58             : AliTPCclusterMI* AliHLTTPCOfflineCluster::ConvertHLTToOffline(AliHLTTPCSpacePointData spacePoint){
      59             :    
      60           0 :    AliTPCclusterMI *offCluster = new AliTPCclusterMI();
      61             :    
      62           0 :    offCluster->SetRow((Int_t)spacePoint.fPadRow); // padrow
      63           0 :    offCluster->SetX(spacePoint.fX);            // X coordinate in slice system
      64           0 :    offCluster->SetY(spacePoint.fY);               // Y coordinate in slice system
      65           0 :    offCluster->SetZ(spacePoint.fZ);               // Z coordinate in slice system
      66           0 :    offCluster->SetQ(spacePoint.fCharge);               // charge
      67           0 :    offCluster->SetMax(spacePoint.fQMax);               // max Q (amplitude)
      68           0 :    offCluster->SetSigmaY2(spacePoint.fSigmaY2);   // error in Y direction
      69           0 :    offCluster->SetSigmaZ2(spacePoint.fSigmaZ2);   // error in Z direction
      70             :    //offCluster->SetDetector(0);               // detector/slice
      71             :    //offCluster->SetType(0);                   // default from constructor
      72             :    //offCluster->IsUsed(0);                    // default from constructor
      73             :    //offCluster->SetInfo(NULL);                        // default from constructor
      74             :         
      75           0 :    return offCluster;
      76           0 : }
      77             : 
      78             : 
      79             : AliHLTTPCSpacePointData AliHLTTPCOfflineCluster::ConvertOfflineToHLT(AliTPCclusterMI *offCluster){
      80             : 
      81             :      
      82           0 :    AliHLTTPCSpacePointData spacePoint;
      83             :        
      84           0 :    spacePoint.fPadRow  = offCluster->GetRow();
      85           0 :    spacePoint.fX       = offCluster->GetX(); // these are in the detector system
      86           0 :    spacePoint.fY       = offCluster->GetY(); // the HLT clusters have to be transformed to the slice system
      87           0 :    spacePoint.fZ       = offCluster->GetZ(); // for the X, Y, Z to be consistent with our definitions
      88           0 :    spacePoint.fCharge  = (UInt_t)offCluster->GetQ();
      89           0 :    spacePoint.fQMax    = (UInt_t)offCluster->GetMax();
      90           0 :    spacePoint.fSigmaY2 = offCluster->GetSigmaY2();
      91           0 :    spacePoint.fSigmaZ2 = offCluster->GetSigmaZ2();
      92             :    
      93           0 :    return spacePoint;
      94             :    
      95             : }

Generated by: LCOV version 1.11