]> git.uio.no Git - u/mrichter/AliRoot.git/blob - VZERO/AliVZERORawStream.h
Applying modification so that LUTs are generated from CDB, which also solves LUT...
[u/mrichter/AliRoot.git] / VZERO / AliVZERORawStream.h
1 #ifndef ALIVZERORAWSTREAM_H
2 #define ALIVZERORAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 ///////////////////////////////////////////////////////////////////////////////
7 ///
8 /// This is a class for reading the VZERO DDL raw data
9 /// The format of the raw data corresponds to the one
10 /// implemented in AliVZEROBuffer class.
11 ///
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include <TObject.h>
15
16 class AliRawReader;
17
18 class AliVZERORawStream: public TObject {
19   public :
20     AliVZERORawStream(AliRawReader* rawReader);
21     virtual ~AliVZERORawStream();
22
23     virtual void             Reset();
24     virtual Bool_t           Next();
25
26     UShort_t                 GetADC(Int_t channel) const
27       { return fADC[channel][kNEvOfInt/2]; }
28     UInt_t                   GetTime(Int_t channel) const
29       { return fTime[channel]; }
30
31     enum EVZERORawDataParams {
32       kNChannels = 64,
33       kNEvOfInt = 21, // Number of events of interest
34       kNScalers = 16,
35       kNBunches = 10
36     };
37
38     enum EVZERORawStreamError {
39       kRawDataSizeErr = 1
40     };
41
42   private:
43
44     AliVZERORawStream(const AliVZERORawStream& stream);
45     AliVZERORawStream& operator = (const AliVZERORawStream& stream);
46
47     UInt_t GetNextWord();
48     UShort_t GetNextShort();
49
50     ULong64_t       fBBScalers[kNChannels];       // 'Beam-Beam' scalers for all channels
51     ULong64_t       fBGScalers[kNChannels];       // 'Beam-Gas' scalers for all channels
52     UInt_t          fScalers[kNScalers];          // Trigger scalers
53     UInt_t          fBunchNumbers[kNBunches];     // Bunch numbers for the previous 10 MB events
54     UShort_t        fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events
55     Bool_t          fIsIntMB[kNChannels][kNBunches];  // 'Interaction' flag for all channels for the previous 10 MB events
56     Bool_t          fIsBBMB[kNChannels][kNBunches];   // 'Beam-Beam' flag for all channels for the previous 10 MB events
57     Bool_t          fIsBGMB[kNChannels][kNBunches];   // 'Beam-Gas' for all channels for the previous 10 MB events
58
59     UShort_t        fADC[kNChannels][kNEvOfInt];   // ADC counts for all channels and all events of interest
60     Bool_t          fIsInt[kNChannels][kNEvOfInt]; // 'Interaction' flag for all channels
61     Bool_t          fIsBB[kNChannels][kNEvOfInt];  // 'Beam-Beam' flag for all channels
62     Bool_t          fIsBG[kNChannels][kNEvOfInt];  // 'Beam-Gas' flag for all channels
63     Int_t           fTime[kNChannels];            // leading time for all channels
64     Int_t           fWidth[kNChannels];           // signal width for all channels
65
66     UShort_t        fTrigger;      // VZERO trigger inputs
67     UShort_t        fTriggerMask;  // VZERO trigger inputs mask
68
69     Int_t           fPosition;     // current position in the raw-data payload
70
71     AliRawReader*   fRawReader;    // object for reading the raw data
72
73     UChar_t*        fData;         // pointer to raw data payload
74
75     ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data
76 };
77
78 #endif