]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliFlatTPCseed.h
Merge remote-tracking branch 'origin/master' into flatdev
[u/mrichter/AliRoot.git] / HLT / global / AliFlatTPCseed.h
1 #ifndef ALIFLATTPCSEED_H
2 #define ALIFLATTPCSEED_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               *
6  * Primary Authors : Sergey Gorbunov, Jochen Thaeder, Chiara Zampolli     */
7
8 /*
9  * See implementation file for documentation
10  */
11
12
13 #include "Rtypes.h"
14
15 #include "AliFlatTPCCluster.h"
16 #include "AliVfriendTrack.h"
17 #include "AliVMisc.h"
18 #include "AliFlatExternalTrackParam.h"
19
20 class AliESDtrack;
21 class AliESDfriendTrack;
22 class AliExternalTrackParam;
23 class AliTrackPointArray;
24 class AliTPCseed;
25
26 class AliFlatTPCseed  
27 {
28  public:
29
30   // --------------------------------------------------------------------------------
31   // -- Constructor / Destructors
32   AliFlatTPCseed();
33   ~AliFlatTPCseed() {}
34  
35   // constructor and method for reinitialisation of virtual table  
36   AliFlatTPCseed( AliVConstructorReinitialisationFlag );
37   void Reinitialize() { new (this) AliFlatTPCseed( AliVReinitialize ); }
38
39   // -- Set methods
40  
41   void Reset();
42
43   void SetFromTPCseed( const AliTPCseed *p );
44   void GetTPCseed( AliTPCseed *p ) const;
45
46   Int_t GetLabel() const { return fLabel; }
47   Int_t GetNClusters() const { return fNTPCClusters; }
48
49   // --------------------------------------------------------------------------------
50   // -- Size methods
51
52   static size_t EstimateSize(){
53     return sizeof(AliFlatTPCseed) + 160*sizeof(AliFlatTPCCluster);
54   }
55
56   size_t GetSize() const { return fContent -  reinterpret_cast<const Byte_t*>(this) + fContentSize; }
57
58  private: 
59
60   AliFlatTPCseed(const AliFlatTPCseed &);
61   AliFlatTPCseed& operator=(const AliFlatTPCseed& ); 
62
63   // --------------------------------------------------------------------------------
64
65   ULong64_t fContentSize;                      // Size of this object
66   
67   // --------------------------------------------------------------------------------
68   
69   AliFlatExternalTrackParam fParam;
70   Int_t fLabel;
71   Int_t fNTPCClusters;
72   Byte_t fContent[1];                  // Variale size object, which contains all data
73
74 };
75
76 inline AliFlatTPCseed::AliFlatTPCseed()
77   :
78   fContentSize(0),
79   fParam(),
80   fLabel(-1),
81   fNTPCClusters(0)
82 {
83   // constructor
84   fContent[0]=0;
85 }
86
87 #pragma GCC diagnostic ignored "-Weffc++" 
88 inline AliFlatTPCseed::AliFlatTPCseed( AliVConstructorReinitialisationFlag  )
89 {
90   // reinitialise vtable
91   fParam.Reinitialize();
92   AliFlatTPCCluster *clusters = reinterpret_cast< AliFlatTPCCluster* >( fContent );  
93   for( Int_t ic=0; ic<fNTPCClusters; ic++ ){
94     clusters[ic].Reinitialize();
95   }
96 }
97 #pragma GCC diagnostic warning "-Weffc++" 
98
99
100 inline void AliFlatTPCseed::Reset()
101 {
102   // Reset
103   fContentSize = 0;
104   fNTPCClusters = 0;
105   fLabel=-1;
106 }
107
108 #endif