]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliAltroBunch.h
Temporary mod for CMake
[u/mrichter/AliRoot.git] / RAW / AliAltroBunch.h
CommitLineData
31a920d3 1#ifndef ALIALTROBUNCH_H
2#define ALIALTROBUNCH_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6#include <TObject.h>
7
44443c72 8#define DECODERERROR -3
9
31a920d3 10class AliAltroBunch: public TObject {
11public:
12
13 AliAltroBunch();
14 ~ AliAltroBunch();
44443c72 15 inline const UInt_t* GetData() const { return fData; }
16
17 inline void SetData(UInt_t *data)
18 {
19 fData = data;
20 }
21
22 inline Int_t GetBunchSize() const { return fBunchSize; }
23 inline void SetBunchSize(Int_t size)
24 {
25 fPrewBunchSize = fBunchSize; fBunchSize = size;
26 }
27
28 inline int CheckConsistency()
29 {
30 if( (fPrevEndTimeBin - fPrewBunchSize ) <= fEndTimeBin )
31 {
32 // printf("%s:%d, ERROR conistency check failed\n", __FILE__ , __LINE__ );
33 return DECODERERROR;
34 }
35 else
36 {
37 return kTRUE;
38 }
39 }
40
41 inline UInt_t GetEndTimeBin() const { return fEndTimeBin; }
42 inline void SetEndTimeBin(UInt_t bin) {fPrevEndTimeBin = fEndTimeBin; fEndTimeBin = bin; }
43 inline UInt_t GetStartTimeBin() const { return (fEndTimeBin - (fBunchSize -1)); }
44 inline void SetStartTimeBin(UInt_t bin) { fStartTimeBin = bin; }
31a920d3 45
46private:
31a920d3 47 AliAltroBunch& operator = (const AliAltroBunch& bunch);
48 AliAltroBunch(const AliAltroBunch& bunch);
ac672c4c 49 UInt_t *fData; // pointer to data of current bunch
50 Int_t fBunchSize; // total size of current bunch including timestamp and the size indicator (i.e a bunch with just one sample will have size 3)
51 UInt_t fEndTimeBin; // Time stamp of the last sample in the bunch in entities of sample indexes
52 UInt_t fStartTimeBin; // Time index of the first bin in the bunch
44443c72 53 Int_t fPrewBunchSize;
54 Int_t fPrevEndTimeBin;
55 // bool fIsFirstBunch;
31a920d3 56
57 ClassDef(AliAltroBunch,0) // container class for Altro bunches
58};
59
60#endif
61