]>
Commit | Line | Data |
---|---|---|
2eb38194 | 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 | ||
726d762c | 26 | UShort_t GetADC(Int_t channel) const |
27 | { return fADC[channel][kNEvOfInt/2]; } | |
8094d3d3 | 28 | UShort_t GetPedestal(Int_t channel, Int_t event) const |
29 | { return fADC[channel][event]; } | |
726d762c | 30 | UInt_t GetTime(Int_t channel) const |
31 | { return fTime[channel]; } | |
32 | ||
33 | enum EVZERORawDataParams { | |
34 | kNChannels = 64, | |
8094d3d3 | 35 | kNEvOfInt = 21, // Number of events of interest |
36 | kNScalers = 16, | |
37 | kNBunches = 10 | |
726d762c | 38 | }; |
2eb38194 | 39 | |
40 | enum EVZERORawStreamError { | |
41 | kRawDataSizeErr = 1 | |
42 | }; | |
43 | ||
44 | private: | |
45 | ||
46 | AliVZERORawStream(const AliVZERORawStream& stream); | |
47 | AliVZERORawStream& operator = (const AliVZERORawStream& stream); | |
48 | ||
726d762c | 49 | UInt_t GetNextWord(); |
50 | UShort_t GetNextShort(); | |
51 | ||
52 | ULong64_t fBBScalers[kNChannels]; // 'Beam-Beam' scalers for all channels | |
53 | ULong64_t fBGScalers[kNChannels]; // 'Beam-Gas' scalers for all channels | |
54 | UInt_t fScalers[kNScalers]; // Trigger scalers | |
55 | UInt_t fBunchNumbers[kNBunches]; // Bunch numbers for the previous 10 MB events | |
56 | UShort_t fChargeMB[kNChannels][kNBunches]; // ADC counts for all channels for the previous 10 MB events | |
8094d3d3 | 57 | Bool_t fIsIntMB[kNChannels][kNBunches]; // 'Integrator' flag for all channels for the previous 10 MB events |
726d762c | 58 | Bool_t fIsBBMB[kNChannels][kNBunches]; // 'Beam-Beam' flag for all channels for the previous 10 MB events |
59 | Bool_t fIsBGMB[kNChannels][kNBunches]; // 'Beam-Gas' for all channels for the previous 10 MB events | |
60 | ||
61 | UShort_t fADC[kNChannels][kNEvOfInt]; // ADC counts for all channels and all events of interest | |
8094d3d3 | 62 | Bool_t fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels |
726d762c | 63 | Bool_t fIsBB[kNChannels][kNEvOfInt]; // 'Beam-Beam' flag for all channels |
64 | Bool_t fIsBG[kNChannels][kNEvOfInt]; // 'Beam-Gas' flag for all channels | |
8094d3d3 | 65 | Int_t fTime[kNChannels]; // leading time for all channels |
66 | Int_t fWidth[kNChannels]; // signal width for all channels | |
2eb38194 | 67 | |
726d762c | 68 | UShort_t fTrigger; // VZERO trigger inputs |
69 | UShort_t fTriggerMask; // VZERO trigger inputs mask | |
2eb38194 | 70 | |
726d762c | 71 | Int_t fPosition; // current position in the raw-data payload |
2eb38194 | 72 | |
726d762c | 73 | AliRawReader* fRawReader; // object for reading the raw data |
2eb38194 | 74 | |
726d762c | 75 | UChar_t* fData; // pointer to raw data payload |
2eb38194 | 76 | |
77 | ClassDef(AliVZERORawStream, 0) // class for reading VZERO DDL raw data | |
78 | }; | |
79 | ||
80 | #endif |