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 ESD friend <<
21 * To be used in the online and offline calibration schema.
23 * Class provides interface methods for
24 * - Filling from AliESDfriend, but also from HLT
27 * In the online case, the structure can be directly written into a shared
28 * memory, in the offline case, the size has to be estimated first.
31 * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli
33 * ************************************************************************
36 #include "AliFlatESDFriend.h"
37 #include "AliFlatESDFriendTrack.h"
38 #include "Riostream.h"
40 // _______________________________________________________________________________________________________
41 AliFlatESDFriend::AliFlatESDFriend() :
46 fTrackTablePointer(0),
49 // Default constructor
53 void AliFlatESDFriend::Reset()
58 fTrackTablePointer = 0;
60 for( int i=0; i<72; i++ ){
62 fNclustersTPCused[i]=0;
64 // We set size of the fContent array such, that it reaches the end of the AliFlatESDFriend structure.
65 // To be sure that actual GetSize() is always >= size of the structure.
66 // First, it makes the memory alignment better. Second, just for a case..
67 fContentSize = sizeof(AliFlatESDFriend) - (fContent - reinterpret_cast<const Byte_t*>(this));
68 for( UInt_t i=0; i<fContentSize; i++ ) fContent[i]=0;
71 // _______________________________________________________________________________________________________
72 AliFlatESDFriend::AliFlatESDFriend(AliFlatESDSpecialConstructorFlag f) :
80 //special constructor, used to restore the vtable pointer
81 //uses the special dummy constructors of contained objects
83 // the vtable pointer for this AliFlatESDFriend object is already reset when this constructor is called
84 // we should only initialise vtable pointers for all contained objects
86 if(f == AliFlatESDReinitialize){
87 for( int i=0; i<fNTracks; i++ ){
88 AliFlatESDFriendTrack *tr = GetFlatTrackNonConst(i);
89 if( tr ) tr->Reinitialize();
97 void AliFlatESDFriend::Ls() const
99 cout<<"Flat ESD friend: "<<endl;
100 cout<<" N tracks: "<<fNTracks<<endl;
101 cout<<" N track entries: "<<fNTrackEntries<<endl;