3 /**************************************************************************
4 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * Author: The ALICE Off-line Project. *
7 * Contributors are mentioned in the code where appropriate. *
9 * Permission to use, copy, modify and distribute this software and its *
10 * documentation strictly for non-commercial purposes is hereby granted *
11 * without fee, provided that the above copyright notice appears in all *
12 * copies and that both the copyright notice and this permission notice *
13 * appear in the supporting documentation. The authors make no claims *
14 * about the suitability of this software for any purpose. It is *
15 * provided "as is" without express or implied warranty. *
16 **************************************************************************/
19 * >> Flat structure representing an ESDTrack <<
21 * To be used in the online and offline calibration schema.
23 * Class provides interface methods for
24 * - Filling from AliESDtrack and AliExternalTrackParam, as well
25 * as clusters from ESD friends (if requested)
26 * - HLT Filling to be added
29 * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli
31 **************************************************************************/
34 #include "AliFlatESDFriendTrack.h"
35 #include "AliExternalTrackParam.h"
36 #include "AliESDfriendTrack.h"
37 #include "AliTPCseed.h"
38 #include "Riostream.h"
40 // _______________________________________________________________________________________________________
41 AliFlatESDFriendTrack::AliFlatESDFriendTrack()
51 // Default constructor
55 #pragma GCC diagnostic ignored "-Weffc++"
56 AliFlatESDFriendTrack::AliFlatESDFriendTrack( AliVConstructorReinitialisationFlag f )
60 // constructor for reinitialisation of vtable
61 if( fTPCseedPointer >= 0 ){
62 AliFlatTPCseed *fp = reinterpret_cast< AliFlatTPCseed* >( fContent + fTPCseedPointer );
66 #pragma GCC diagnostic warning "-Weffc++"
68 void AliFlatESDFriendTrack::Reset()
79 Int_t AliFlatESDFriendTrack::SetFromESDfriendTrack( const AliESDfriendTrack* track, size_t allocatedMemory )
81 if( allocatedMemory < EstimateSize() ) return -1;
83 if( !track ) return 0;
84 SetSkipBit(track->TestSkipBit() );
85 SetTrackParamTPCOut( track->GetTPCOut() );
86 SetTrackParamITSOut( track->GetITSOut() );
87 SetTrackParamTRDIn( track->GetTRDIn() );
88 const AliTPCseed* seedP = NULL;
90 TObject* calibObject = NULL;
91 for (Int_t idx = 0; (calibObject = track->GetCalibObject(idx)); ++idx) {
92 if ((seedP = dynamic_cast<const AliTPCseed*>(calibObject))) {