]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/comp/AliHLTTPCDataCompressionDescriptor.h
Small data block AliHLTTPCDataCompressionDescriptor with general description of the...
[u/mrichter/AliRoot.git] / HLT / TPCLib / comp / AliHLTTPCDataCompressionDescriptor.h
1 #ifndef ALIHLTTPCDATACOMPRESSIONDESCRIPTOR_H
2 #define ALIHLTTPCDATACOMPRESSIONDESCRIPTOR_H
3
4 #include "Rtypes.h"
5
6 /**
7  * @struct AliHLTTPCDataCompressionDescriptor
8  * The class describes properties of the compressed data
9  * @ingroup alihlt_tpc_datastructs
10  */
11 class AliHLTTPCDataCompressionDescriptor
12 {
13  public:
14
15   AliHLTTPCDataCompressionDescriptor(): fVersion(0), fMergedClustersFlag(1){}
16   ~AliHLTTPCDataCompressionDescriptor(){}
17   AliHLTTPCDataCompressionDescriptor(const AliHLTTPCDataCompressionDescriptor& other)
18     : fVersion(other.fVersion)
19     , fMergedClustersFlag(other.fMergedClustersFlag)
20   {}
21
22   AliHLTTPCDataCompressionDescriptor& operator=(const AliHLTTPCDataCompressionDescriptor& other){ 
23     fVersion = other.fVersion;
24     fMergedClustersFlag = other.fMergedClustersFlag;
25     return *this;
26   }
27
28   Bool_t CheckSize( UInt_t size ) const {
29     if( size<sizeof(UInt_t) ) return 0;
30     if( fVersion==0 ) return ( size==sizeof(AliHLTTPCDataCompressionDescriptor));
31     return 0;
32   }
33   
34   UInt_t GetVersion() const { return fVersion; }
35   Int_t GetMergedClustersFlag() const { return fMergedClustersFlag; }
36   
37   void SetMergedClustersFlag( Int_t flag ){ fMergedClustersFlag=flag; }
38
39  private:
40
41   UInt_t fVersion; // version number
42   Int_t fMergedClustersFlag; // flag tells if the clusters were merged at the branch borders
43 };
44
45 #endif